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
Development
Improvement Suggestions
Fix Recordings to respect Recording limit
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="azeroth" data-source="post: 1140451" data-attributes="member: 152992"><p><strong>Summary:</strong></p><p></p><p>Stop recording new episodes when limit is reached for until I watch/keep until/until I delete KeepMethod types.</p><p>I think that the episode limit should always restrict recording. Right now if you have any of the three keep types above, the recorder will record every episode as if no limit was applied.</p><p></p><p><strong>Area:</strong></p><p>TV Server</p><p></p><p><strong>Description:</strong></p><p></p><p>Just check for episode count before starting a recording for the above types.</p><p></p><p><strong>Template code:</strong></p><p></p><p>Scheduler.cs</p><p>New helper Method:</p><p>[code]private bool IsEpisodeMaxReached(Schedule schedule)</p><p> {</p><p> IList<Recording> recordings = Recording.ListAll();</p><p> var episodeManagement = new EpisodeManagement();</p><p> List<Recording> episodes = episodeManagement.GetEpisodes(schedule.ProgramName, recordings);</p><p> if (episodes.Count >= schedule.MaxAirings && (schedule.KeepMethod == (int)KeepMethodType.Always || schedule.KeepMethod == (int)KeepMethodType.UntilWatched))</p><p> {</p><p> return true;</p><p> }</p><p> return false;</p><p> }[/code]</p><p></p><p>in StartAnyDueRecordings() method</p><p>[code]...</p><p>if (IsEpisodeUnrecorded(schedule.ScheduleType, newRecording) && !IsEpisodeMaxReached(schedule))</p><p>...</p><p>[/code]</p><p></p><p></p><p><strong>Summary:</strong></p><p></p><p>This code is untested but seems like it should do the trick.</p><p>Also an [won't be recorded] icon could be added to the guide to show that it wont be recorded because it will exceed the limit. I didn't dig this far though.</p></blockquote><p></p>
[QUOTE="azeroth, post: 1140451, member: 152992"] [B]Summary:[/B] Stop recording new episodes when limit is reached for until I watch/keep until/until I delete KeepMethod types. I think that the episode limit should always restrict recording. Right now if you have any of the three keep types above, the recorder will record every episode as if no limit was applied. [B]Area:[/B] TV Server [B]Description:[/B] Just check for episode count before starting a recording for the above types. [B]Template code:[/B] Scheduler.cs New helper Method: [code]private bool IsEpisodeMaxReached(Schedule schedule) { IList<Recording> recordings = Recording.ListAll(); var episodeManagement = new EpisodeManagement(); List<Recording> episodes = episodeManagement.GetEpisodes(schedule.ProgramName, recordings); if (episodes.Count >= schedule.MaxAirings && (schedule.KeepMethod == (int)KeepMethodType.Always || schedule.KeepMethod == (int)KeepMethodType.UntilWatched)) { return true; } return false; }[/code] in StartAnyDueRecordings() method [code]... if (IsEpisodeUnrecorded(schedule.ScheduleType, newRecording) && !IsEpisodeMaxReached(schedule)) ... [/code] [B]Summary:[/B] This code is untested but seems like it should do the trick. Also an [won't be recorded] icon could be added to the guide to show that it wont be recorded because it will exceed the limit. I didn't dig this far though. [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
Development
Improvement Suggestions
Fix Recordings to respect Recording limit
Contact us
RSS
Top
Bottom