Delphi Posted June 22, 2014 Share Posted June 22, 2014 I am so happy to have episode numbers in many of my EPG titles: ma 30-06-2014 09:00 00:30 DR K © Vis mig din tro (1:4) ti 01-07-2014 08:30 00:30 DR K © Vis mig din tro (1:4) ti 01-07-2014 09:00 00:30 DR K © Vis mig din tro (2:4) on 02-07-2014 08:30 00:30 DR K © Vis mig din tro (2:4) on 02-07-2014 09:00 00:30 DR K © Vis mig din tro (3:4) to 03-07-2014 08:30 00:30 DR K © Vis mig din tro (3:4) to 03-07-2014 09:00 00:30 DR K © Vis mig din tro (4:4) fr 04-07-2014 08:30 00:30 DR K © Vis mig din tro (4:4) This should be an ideal way to avoid multiple recordings of the same episode. If I use the web interface Search EPG with Name: Vis mig din tro Add to Auto-Record search, checked Check against Rec.Title, checked and then Tasks, execute AutoTimer, they are all 8 added as active timers. From a plain user point of view there is room for improvements here, and this is my request. The check against Timer name doesn't suffer from this. They all have the same event in this case. However sometimes I have different Events even if the episode number is the same, resulting in more than one active timer for the same episode. I would prefer to use the Check against Rec.Title. I first thought it was a bug, so I posted a bug report, see: http://www.DVBViewer.tv/forum/topic/54879-recording-service-search-epg/?p=410355 I now understand it is not a bug and the reason why...I think. I (and many others, I am sure) consider the EPG search a core funtionallity of the Recording Service, so it would be nice if this could be implemented. I have been looking into the wiki RS api ducumentation for creating a timer: With the following Params: ch= The ChannelID (ord(tunertype) + 1) shl 29 + APID shl 16 + SID; in other words (tunertype + 1) * 536870912 + APID * 65536 + SID tunertype = DVB-C = 0 DVB-S = 1 DVB-T = 2 ATSC = 3 DVB-IPTV = 4 APID = Audio-PID SID = Service-ID dor= The date (the integer part of the floatdatetime value) - mandatory enable= 0/1 -> 1 = enabled - mandatory start= / stop= The start and the endtime (integer, calculated by round(onlythetime * minsperday)) - mandatory title= The name of the timer. see also "encoding". encoding= The encoding of the timer (255 = UTF8). works for title, series and folder. - not used before .55 days= for repeating timers a 7 char string. Every char stands for a day of the week starting with monday. each char <> '-' means day is active. - optional series= The series the timer belongs to. see also "encoding". - optional - not used before .55 action= The recording action 0 = Record, 1=tune. optional. endact= The action after recoding. 0=None, 1=PowerOff, 2=Standby, 3=Hilbernate - optional after= The name of the task to be executed after recording. caller is responsible that this internal/process task exists. - optional. prio= The priority of the timer (0-100) 0=Lowest, 100=Highest. optional. format= The recording format of the timer. 0=Audio only, 1=mpeg, 2=TS. - optional. folder= The recording folder. The caller is responsible it is a folder from the defined recordings folders. - optional audio= Record all Audiostreams of the channel. 0/1 - optional. subs= Record DVBSubtitles. 0/1 - optional. only valid for TS ttx= Record Teletext. 0/1 - optional. only valid for TS I assume title in general is the string constructed from EPG title and the first 60 characters of the EPG event. I suggest to add 2 more parameters epgtitle and epgevent, maybe something like this epgtitle = The EPG title - optional epgevent = The EPG event - optional title= The name of the timer. see also "encoding". For backward compatibility, not needed if epgtitle and epgevent is present The Timer object should ofcourse store the epgtitle and epgevent separatly. It should now be possible to make a newly created timer inactive if a timer already exists with the same title. Not case sensitive ofcourse. Well, I know it is probably not as simple as that and I cannot know if it is possible at all. At least I tried TIA Quote Link to comment
Delphi Posted June 23, 2014 Author Share Posted June 23, 2014 Maybe my suggestion to meet my request is is way too complicated. Could something like the following do it? Assuming the EPG title (epgtitle) is known at the creation time of a new timer, then for each existing timer in the timerlist do something like: if SameText(epgtitle, LeftStr(timer.TimerName, Length(epgtitle)) then begin //deactivate the new timer break; //or whatever you have to do end; A similar thing could be done if if "Check against Rec. Event" is checked. Again, I cannot know if this is possible at all. Quote Link to comment
majstang Posted June 29, 2014 Share Posted June 29, 2014 I would like to add more suggestions besides Delphis one, to improve the check against/prevent recordings of re-run function even further. Broadcasters often do write titles of shows differently. For example:première show has the titleTop Gearand re-run could be named:Top gearOnly difference is lowercase g in re-run title. When Rec.title matches already recorded Top Gear with timer Top gear, its a no-match and re-run timer wont be deactivated, instead it will be recorded. My suggestion to solve the problem is to convert the Rec.title string and timertitle string to lowercase letters before matching takes place. Programmingwise this is very easy to do. This suggestion also naturally applies to Rec.event and Timername functions. ;------------------------------------------------ Another problem is the autotimer function itself. Autotimer function seem to be using a too forgiving searchalgorithm, like the one in Notepad++ for example. I suppose the same searchfuction RS uses when manually searching the EPG is used for the autotimer. That gives a problematic result if having searchpresets that should create recordingtimers for the show:Top GearIt also creates timers for:Top Gear USATop Gear AustraliaThe autotimer searchfunction doesnt require a perfect match when creating timers. Only requirement is the searchpreset title should be somewhere in the EPG title, like the Top Gear USA example and it allows too much IMO. I get surprisingly many unwanted timers created this way. Fortunately Rec.title can prevent recordings of these unwanted shows, cuz it requires a perfect match, but they keep on clutter the timerlist even though they are deactivated if previously recorded. Maybe if the autotimer could use an algorithm which requires a perfect match with lowercase letter conversion before matching takes place would give better results? //Majstang Quote Link to comment
majstang Posted June 30, 2014 Share Posted June 30, 2014 Sorry, I was mistaken Check against functions are definitely using lowercase letter conversion before matching takes place. Doesnt matter if premiere show and re-run mixes upper- and lowercase letters differently in the title, check against Rec.title function deactivates the re-run in any case if already recorded. Last time I tested it years ago it wasnt working. Didnt realize Lars fixed it. No changelog about it though. Forget about my suggestion, it works great Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.