home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
MediaPortal 1 Plugins
Popular Plugins
My TVSeries
LMH need help! Help plz ... How select episodes in Online Rating sort order
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="ajs" data-source="post: 1238571" data-attributes="member: 68833"><p>I try,</p><p>[code=csharp] else if (CurrentFacade.Type == LatestsFacadeType.Rated)</p><p> {</p><p> SQLCondition conditions = new SQLCondition();</p><p> conditions.Add(new DBOnlineEpisode(), DBOnlineEpisode.cSeriesID, 0, SQLConditionType.GreaterThan);</p><p> conditions.Add(new DBOnlineEpisode(), DBOnlineEpisode.cHidden, 0, SQLConditionType.Equal);</p><p> conditions.Add(new DBOnlineEpisode(), DBOnlineEpisode.cRating, 0, SQLConditionType.GreaterThan);</p><p></p><p> episodes = DBEpisode.Get(conditions, false);</p><p> if (episodes != null && episodes.Count > 0)</p><p> {</p><p> episodes.OrderByDescending(ep => ep[DBOnlineEpisode.cRating]);</p><p> }</p><p> }[/code]</p><p>But result wrong, first elements - Special episodes without rating at all <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite3" alt=":(" title="Frown :(" loading="lazy" data-shortname=":(" /></p><p></p><p>I try to show conditions to log, and look ... SQL with:</p><p>[CODE=csharp]conditions.AddOrderItem(DBOnlineEpisode.Q(DBOnlineEpisode.cRating), SQLCondition.orderType.Descending);[/CODE]</p><p>Because no order field (OnlineEpisode Rating) in select ... Only LocalEpisode field ...</p></blockquote><p></p>
[QUOTE="ajs, post: 1238571, member: 68833"] I try, [code=csharp] else if (CurrentFacade.Type == LatestsFacadeType.Rated) { SQLCondition conditions = new SQLCondition(); conditions.Add(new DBOnlineEpisode(), DBOnlineEpisode.cSeriesID, 0, SQLConditionType.GreaterThan); conditions.Add(new DBOnlineEpisode(), DBOnlineEpisode.cHidden, 0, SQLConditionType.Equal); conditions.Add(new DBOnlineEpisode(), DBOnlineEpisode.cRating, 0, SQLConditionType.GreaterThan); episodes = DBEpisode.Get(conditions, false); if (episodes != null && episodes.Count > 0) { episodes.OrderByDescending(ep => ep[DBOnlineEpisode.cRating]); } }[/code] But result wrong, first elements - Special episodes without rating at all :( I try to show conditions to log, and look ... SQL with: [CODE=csharp]conditions.AddOrderItem(DBOnlineEpisode.Q(DBOnlineEpisode.cRating), SQLCondition.orderType.Descending);[/CODE] Because no order field (OnlineEpisode Rating) in select ... Only LocalEpisode field ... [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
MediaPortal 1 Plugins
Popular Plugins
My TVSeries
LMH need help! Help plz ... How select episodes in Online Rating sort order
Contact us
RSS
Top
Bottom