NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 4 5 6 7 8 93 Next »
Custom recording rules

 
  • 0 Vote(s) - 0 Average
Custom recording rules
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 56,786
Threads: 998
Joined: May 2006
#1
2012-10-06, 09:59 PM (This post was last modified: 2012-10-06, 10:07 PM by mvallevand.)
I have an earlier request to only record HD channels open (if that is what no response means) but it might never happen which might be find. Looking over the For The Record options I found an option "NotOnChannels" that got me thinking I might be able to make myself a utility or even work via UJB's NEWA to add more option there and to avoid more options to NextPVR. I assume advancedRules get merged with another string, Is this the one you use?

Code:
select * from EPG_EVENT where title=? and end_time>? order by start_time @time

For information I have broken down the NextPVR options and the other options in FTR that need a custom rule

Code:
AroundTime Record the timeslot closest to the given start time (usually combined with TitleEquals). StartingBetween Record a program when its start time is between the two given times. OnDate Record on this specific date (mutually exclusive with DaysOfWeek). DaysOfWeek Record on these days of the week (mutually exclusive with OnDate), with second optional starting date argument. TitleEquals Record program with the given title. TitleStartsWith Record program who's title starts with the given text. ManualSchedule If this rule is added the schedule is a manual schedule with the given datetime and duration (ScheduleTime) arguments. When this rule is specified the TvChannels rule must be present with exactly one channel. The DaysOfWeek rule with one argument is optional, and no other rules are allowed. NewEpisodesOnly If this is true, don't include programs that were already recorded before custom logic in NextPVR NewTitlesOnly If this is true, don't include programs that were already recorded before (based on new flag only). not in FTR Channels Record on the given channel(s). Arguments are one or more channel IDs. NotOnChannels Do not record on the given channel(s). Arguments are one or more channel IDs. SubTitleEquals Record program with the given sub-title. SubTitleStartsWith Record program who's sub-title starts with the given text. SubTitleContains Record program who's sub-title contains the given text. If more than one text is given an OR will be applied. SubTitleDoesNotContain Record program who's sub-title does not contain the given text, only valid in combination with at least one SubTitleContains rule. EpisodeNumberEquals Record program with the given episode number. EpisodeNumberContains Record program who's episode number contains the given text. If more than one text is given an OR will be applied. EpisodeNumberDoesNotContain Record program who's episode number does not contain the given text, only valid in combination with at least one EpisodeNumberContains rule. EpisodeNumberStartsWith Record program who's episode number starts with the given text. TitleContains Record program who's title contains the given text. If more than one text is given an OR will be applied. TitleDoesNotContain Record program who's title does not contain the given text, only valid in combination with at least one TitleContains rule. DescriptionContains Record program who's description contains the given text. If more than one text is given an OR will be applied. DescriptionDoesNotContain Record program who's description does not contain the given text, only valid in combination with at least one DescriptionContains rule. CategoryEquals Record programs from any of the categories given as arguments. CategoryDoesNotEqual Don't record programs in any of the categories given as arguments. DirectedBy Record program directed by given name. WithActor Record program which has the actor by the given name. SkipRepeats Only record first-run (non-repeat) programs if the argument to this rule is true. NewEpisodesOnly If this is true, don't include programs that were already recorded before (based on title/sub-title/episode number). NewTitlesOnly If this is true, don't include programs that were already recorded before (based on title only). ProgramInfoContains Record program who's title, episode or description contains the given text. If more than one text is given an OR will be applied. ProgramInfoDoesNotContain Record program who's title, episode or description does not contain the given text, only valid in combination with at least one ProgramInfoContains rule.

Martin
toricred
Offline

Senior Member

Posts: 250
Threads: 23
Joined: Aug 2006
#2
2012-10-07, 02:35 AM
This would be awesome.
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 56,786
Threads: 998
Joined: May 2006
#3
2012-10-07, 05:38 AM
Sub, did you have a chance to look at my question on the select you used?

Martin
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 108,528
Threads: 785
Joined: Nov 2003
#4
2012-10-07, 05:56 AM
It's pretty much "select * from EPG_EVENT where [advanced_rules] order by start_time"
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 56,786
Threads: 998
Joined: May 2006
#5
2012-10-07, 06:07 AM
Ok thanks that will work well.

Martin
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 56,786
Threads: 998
Joined: May 2006
#6
2012-10-07, 07:49 PM
Would there be anyway to have a few variables available? The one that I think I need is the SCHEDULED_RECORDING oid that you are processing to make a little fancier duplicate handling.

Thanks,

Martin
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 108,528
Threads: 785
Joined: Nov 2003
#7
2012-10-08, 05:49 PM
The attached patch will replace [RECURRING_OID] with the OID.

If you'd need any other variables, you'd need to tell me what you'd want.
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 56,786
Threads: 998
Joined: May 2006
#8
2012-10-08, 06:28 PM
Because FTR doesn't have the zap2it numbers I need to find a way to skips duplicates based on subtitle which is common http://www.mythtv.org/wiki/Duplicate_matching. I want to use this Nutility call

NUtility.ScheduledRecording ScheduleRecording(string name, int channelOID, bool onlyNewEpisodes, System.DateTime startTime, System.DateTime endTime, int prePadding, int postPadding, NUtility.DayMask dayMask, int keepCount, NUtility.RecordingQuality quality, string advancedRules)

And use advancedRules to against schedule_recording. If subtitle was a separate field I think I'd be there now with

Code:
where title like "some show" and subtitle not in (select subtitle from scheduled_recording where recurrence_oid = [RECURRING_OID] )

Martin
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 108,528
Threads: 785
Joined: Nov 2003
#9
2012-10-08, 06:44 PM
Sorry, I cant easily help you with that one. If any related EPG info exists for a SCHEDULED_RECORDING, it's serialised into the event_details column. It'd be a big change, so not practical for me to change the design of this table to make that logic work.
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 56,786
Threads: 998
Joined: May 2006
#10
2012-10-08, 06:52 PM
That's why I was thinking of options (so I don't have to write a second database. If you included this line
Code:
[SQLiteFunction(Name = "SubTitle", Arguments = 1, FuncType = FunctionType.Scalar)] class MyRegEx1 : SQLiteFunction { public override object Invoke(object[] args) { Regex regex = new Regex("<SubTitle>(.+?)</SubTitle>", RegexOptions.IgnoreCase | RegexOptions.Multiline); Match match1; match1 = regex.Match(Convert.ToString(args[0])); if (match1.Success) { return match1.Groups[1]; } return ""; } }

I might be able to use

Code:
where title like "some show" and subtitle not in (select SubTitle(event_details) from scheduled_recording where recurrence_oid = [RECURRING_OID] )

Martin
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (6): 1 2 3 4 5 6 Next »


Possibly Related Threads…
Thread Author Replies Views Last Post
  Custom recording tomx 2 5,077 2025-02-07, 09:14 AM
Last Post: tomx
  API call for Recording Complete linustorvalds 1 2,127 2025-01-19, 02:11 PM
Last Post: mvallevand
  Manual recording API mvallevand 2 2,669 2023-11-09, 02:14 PM
Last Post: mvallevand
  Recording direct to GPhotos API rgonzalez 0 2,506 2020-06-29, 04:45 AM
Last Post: rgonzalez
  Recurring Recording URL Parameters jcole998 2 4,277 2019-09-19, 01:08 PM
Last Post: jcole998
  Get recording length from stream skogl 46 21,104 2019-08-15, 09:34 PM
Last Post: sub
  Unexpected result when deleting a pending recording scJohn 5 5,716 2018-05-06, 10:09 PM
Last Post: sub
  custom creation of a recurring error p37307 2 3,572 2017-12-19, 03:45 AM
Last Post: mvallevand
  How to best verify success when adding a recurring recording drmargarit 1 3,984 2017-03-02, 03:13 PM
Last Post: mvallevand
  Change recording filename programmatically immediately before recording starts? craigrs84 5 8,101 2015-07-13, 09:28 PM
Last Post: patco444

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode