NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 62 63 64 65 66 … 93 Next »
Changing a program title to trigger a recurring recording

 
  • 0 Vote(s) - 0 Average
Changing a program title to trigger a recurring recording
erik
Offline

Posting Freak

Posts: 1,138
Threads: 123
Joined: Apr 2005
#1
2005-12-23, 12:36 PM
Some broadcasts have as a title the series name followed by a ':' and then an episode name. Often the Subtitle is empty.
It would be possible to write a simple postepgupdate program that scans the programme list for programs with a title that matches '%:%' and then move the episode part to the subtitle.
By doing so it should be possible to use a recurring recording setting to record these series. One can do the same with some of the plugins but remember I only use webadmin to manage my recordings.
Before I actually start to write the code I have two questions:

1) I can imagine you can do the same with a small xsl script rewriting the xmltv.xml executed by saxon. Anyone out there that could help me how to write the rewrite rule that rewrites
<title>Cinema3:Tomb Raiders</title>
<sub-title>The first episode</sub-title>
into
<title>Cinema3</title>
<sub-title>Tomb Raiders:The first episode</sub-title>

2) When are the recording rules checked? At regular intervals? Triggered by an update? How to ensure the new name will be found by the recurring recording rule?
P4 3GHz 1GB, 250GB, nVidia dualTV, GBPVR 1.3.11, XP
Support Comskip, visit the forum and donate at http://www.comskip.org/
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,814
Threads: 769
Joined: Nov 2003
#2
2005-12-23, 04:47 PM
Quote:When are the recording rules checked?
Immediately after an EPG update. Just proir to PostUpdateEPG.bat being called.
KingArgyle
Offline

Posting Freak

Posts: 1,271
Threads: 95
Joined: Nov 2004
#3
2005-12-23, 06:45 PM
Erik:

If you use CDK Scheduler, you can schedule based on keyword searches. You can narrow down to just the Title if you want, which would let you schedule re-occuring recordings, without having to modify the XML file. XRecord currently uses the CDK Scheduler API to manage the PriorityRecordings.xml file, a Web Admin interface could be written to manage that file as well using the same API.
erik
Offline

Posting Freak

Posts: 1,138
Threads: 123
Joined: Apr 2005
#4
2005-12-23, 07:01 PM
I do use use CDK Scheduler with keyword based search but editing the XML file is a nuicance.

Quote:a Web Admin interface could be written to manage that file as well using the same API.
That would be very nice.
P4 3GHz 1GB, 250GB, nVidia dualTV, GBPVR 1.3.11, XP
Support Comskip, visit the forum and donate at http://www.comskip.org/
Ton
Offline

Member

Posts: 233
Threads: 16
Joined: Aug 2005
#5
2005-12-24, 10:19 PM
I have just finished a "EPG Cleanup" tool that allows parsing and executing regular expressions into the EPG file (for cleaning up this exact issue and the overlapping programs left in the XMLTV file).

It can be configured using an XML-file, and seems to work like a charm...

I'm running the final test tonight, and I'll post (if succesfull) the program and code somewhere tomorrow...

//Ton
Ton
Offline

Member

Posts: 233
Threads: 16
Joined: Aug 2005
#6
2005-12-25, 09:33 AM
Hello all,

I ran the test (successfull) and here is the tool. I haven't tried all possible configurations, and the code is still a little "rough" (It's my first c# program, but I'm coming from a Java / Visual C(++) / VB 6.0 background, so it was really easy to pick up).

I'm still not happy with the console output-messages, but I'll see if I have some time over the Christmas-holidays to fix it....

Regards,

//Ton
erik
Offline

Posting Freak

Posts: 1,138
Threads: 123
Joined: Apr 2005
#7
2005-12-25, 04:15 PM
Seems to work!
I will try some more renaming and feedback in case of problems!
Thanks!
P4 3GHz 1GB, 250GB, nVidia dualTV, GBPVR 1.3.11, XP
Support Comskip, visit the forum and donate at http://www.comskip.org/
erik
Offline

Posting Freak

Posts: 1,138
Threads: 123
Joined: Apr 2005
#8
2005-12-25, 04:53 PM
Works very good!

I created a general rewrite rule for the Title with included sub title
Code:
<Filter name="Fix title and subtitle">
      <Type>and</Type>
      <Match>
         <Name>title</Name>
         <Expression>^.*:</Expression>
      </Match>
      <Action type="replace">
         <Destination>sub-title</Destination>
         <Source>title</Source>
         <FindExpression>^.*:\s?</FindExpression>
         <ReplaceExpression></ReplaceExpression>
      </Action>
      <Action type="replace">
         <Destination>title</Destination>
         <Source>title</Source>
         <FindExpression>:.*\s?</FindExpression>
         <ReplaceExpression></ReplaceExpression>
      </Action>
   </Filter>
This works if there is no existing subtitle (almost always the case).
What to do if the subtitle is already there and you want to concatenate the part after the ':' from the title with the already existing subtitle.
Example
Title: Natuur op 4: Jacques Cousteau
Subtitle: Ongelooflijke opmars van de spinkreeft
P4 3GHz 1GB, 250GB, nVidia dualTV, GBPVR 1.3.11, XP
Support Comskip, visit the forum and donate at http://www.comskip.org/
Ton
Offline

Member

Posts: 233
Threads: 16
Joined: Aug 2005
#9
2005-12-25, 11:52 PM
Okay, did some code-cleanup (and made the console-message a little nicer).

I planned to implement rules for "appending" to an existing field, and to have the matched do not just an "and" but also an "or", but I haven't been able to get round to it....

Here's the latest version...
Ton
Offline

Member

Posts: 233
Threads: 16
Joined: Aug 2005
#10
2005-12-27, 07:54 PM
Hello,

I have just finished the last items on my "todo" list:

- Use of both "and" and "or" matches (together)
- Because of your suggestion: added an option to not only replace the current field, but also to: "insertbefore" or "insertafter".

I have posted the latest version of EPGFilter in the "Community Announcements" forum....

//Ton
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
  Custom recording tomx 2 831 2025-02-07, 09:14 AM
Last Post: tomx
  API call for Recording Complete linustorvalds 1 547 2025-01-19, 02:11 PM
Last Post: mvallevand
  Manual recording API mvallevand 2 1,211 2023-11-09, 02:14 PM
Last Post: mvallevand
  Seeking explanation for recurring schedule fields timeslotStart and timeeslotEnd scJohn 4 2,248 2020-07-14, 10:13 PM
Last Post: scJohn
  Recording direct to GPhotos API rgonzalez 0 1,586 2020-06-29, 04:45 AM
Last Post: rgonzalez
  Recurring Recording URL Parameters jcole998 2 3,166 2019-09-19, 01:08 PM
Last Post: jcole998
  Get recording length from stream skogl 46 15,056 2019-08-15, 09:34 PM
Last Post: sub
  Web command to create recurring any channel mvallevand 2 2,736 2019-02-04, 03:09 PM
Last Post: mvallevand
  Unexpected result when deleting a pending recording scJohn 5 4,022 2018-05-06, 10:09 PM
Last Post: sub
  custom creation of a recurring error p37307 2 2,469 2017-12-19, 03:45 AM
Last Post: mvallevand

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

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

Linear Mode
Threaded Mode