![]() ![]() |
| Guest_dns_* |
Sep 15 2006, 05:58 PM
Post
#1
|
|
Guests |
One thing that I would love is to be able to specify how offen the program should record. let me give an example: I like to see "Media Watch", it is a 15 minute long program that discusses some of the problems with media in australia. it is repeated regularly (more than 6 time a week) I would like to have an auto add rule that will record it only once a week then dissable the recording till next week.
I know i could specify a day or time for it to record or manually enable/dissable the matching but that does not have the flexability. Instead i would like the ability to add a rule to enable weekly matching and specify what day of the week it should re-enable the matching again (catalyst starts it's week on a thursday). It should also be flexible enough to record or re record programs if the first recording did not record for some reson or the computer was off for example. I'm happy to work on it myself but i would like your input and suggestions on how best to implement it. The way i think it needs to be done is by adding the rule into the auto-add part. it most likely will need a special recording type "provisional". When the program is about to start recording it checks the schedule to see if there is currently any active recordings or recordings that will ocur while it would record includeing epg recordings. Once it has recorded fully it then goes through the pending schedules and removes itself from the list, it probly needs to do an auto-add scan to properly rebuild the list. |
|
|
|
Sep 15 2006, 08:03 PM
Post
#2
|
|
|
Web Scheduler Developer Group: Developers Posts: 4,495 Joined: 9-July 03 From: Melb Member No.: 9 Card: None |
off the top of my head I can not think of a reliable easy to understand and maintainable way of implementing this. The easiest and most reliable way would be specify a time and day for the auto add item to match and this would be the once a week item you wanted to record. I know you have already pointed this out.
|
|
|
|
| Guest_dns_* |
Oct 9 2006, 08:13 PM
Post
#3
|
|
Guests |
I'm still trying to work on this feature, it is a little more complicated than i originally thaught but it is something that can be impelemted one way or another. I will have to write something that will go through the schedule and remove any other ocurances of the program once it has been fully recorded.
This is something that can be implemented in a fiew different ways. One way is to have internal task written in java as oposed to something that executes a command. Another option is haveing a special recording item type that will triger the removal of the other ocurances. As tasks designed to execute another program i'm not shure how to extend it to have an internal command. I will try to do somthing to abstract the execution of tasks possibly sub classing TaskItemThread but it is something that it was not designed to do. I will try and work out something that allows for web sheduler to be extended for things like this but still have the old functionality and keep tasks working in a simular way as they are currently implemented. Haveing a special record item type simular to EPG recording but also does some post processing might be a better option but it is less clear where the best way to include the checking. It is probly going to end up being called from CaptureTask.stopCapture() anyway. I'm not shure about where to store a flag (or something) to indicate this as a special type of recording probly EpgAutoAdd.xml but it will result in adding extra fields to the file. if i add it to MatchList.xml it will might not be as much of a change. it will need to store some information somewhere i'm not shure where yet. Anyway i am still thinking about it i would love some feedback. |
|
|
|
Oct 10 2006, 11:25 AM
Post
#4
|
|
|
Forum Regular Group: Members Posts: 182 Joined: 3-February 04 From: Canberra, Australia Member No.: 461 Card: VisionPlus DVB-t |
...
QUOTE specify a time and day for the auto add item to match and this would be the once a week item you wanted to record. Yeah, this is what I do with things like The Glass House and Spicks & Specks. It's pretty manual but generally works. Have been caught out a few times when the day or time changes on the single instance I have chosen but it mostly works out ok if you are on the ball. Good luck coming up with a workable solution. I'd love to see one! |
|
|
|
Oct 11 2006, 12:42 AM
Post
#5
|
|
|
Forum Regular Group: Members Posts: 183 Joined: 9-July 03 From: Geelong,Vic. Member No.: 25 |
I have not looked at WS source code, I belive it is has top object (EPG) from which other objects are created. One way for this to work is to introduce a sucessfull recording counter with a day(m-f)/day of month reset it to 0. All old recording should be deleted? Does a child no who the parent is?
Hope this adds some idea's to the discussion. |
|
|
|
| Guest_dns_* |
Oct 23 2006, 12:00 PM
Post
#6
|
|
Guests |
ok here is a prototype IT DOES NOT WORK YET!!!!
please give it a test to see how i'm going to do it There will be rules that sub class the below, there are 4 event callbacks that are trigered by ws inAdd() - called as part of the epg matching process, if it returns true the match will be added, if it returns false the match is ignored. This is used to dissable a fulfiled rule ie this week has already had the program recorded so disable the rest if you do another scan. onAdd() - called after the matching no current use at the moment but it might be useful later onRecord() - called when the capture starts onPostRecord() - called when the capture ends use to remove later recordings. parseConfig() - called to parse an xml node for this rule saveConfig() - to save config for this module showItem() - produces html for configureing the module process() - called to change the config based on the html above ALL THE METHODS ARE LIKELY TO CHANGE A LOT BEFORE I'M DONE CODE import java.io.Serializable;
import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; import www.*; public abstract class EPGMatchRule implements Serializable{ private EpgMatch match; /* * Gets the name of the rule * * @returns name the name of this rule */ public abstract String getName(); /* * Parses part of the EpgAutoAdd.xml relevent to this rule between the <custom> tags * */ public abstract void parseConfig(Node n); /* * This will output information to the EpgAutoAdd.xml file between <custom> tags */ public abstract void saveConfig(Document doc,Element e); /* * This method will output html code used when configureing the module */ public abstract String showItem(); /* * This method is used to recieve a html response to the form defined above. */ public abstract void process(HTTPurl url); //events /** * called in GuideStore.addEPGmatches() * if this returns true the entry should be processed, if it returns false the item should not be added. */ public abstract boolean inAdd(); /** * called after GuideStore.ddEPGmatches(); */ public abstract void onAdd(); /** * Called when the scheduled item begins to record * */ public abstract void onRecord(ScheduleItem item); /** * Called when the scheduled item has finished it's recording. * * @param status a status code as defined by SheduleItem ie FINISHED */ public abstract void onPostRecord (int status,ScheduleItem item); public void setMatch(EpgMatch match) { this.match = match; } public EpgMatch getMatch() { return match; } } |
|
|
|
Nov 16 2006, 09:42 AM
Post
#7
|
|
|
Participant Group: Members Posts: 81 Joined: 28-June 05 Member No.: 3,142 Card: VisionPlus DVB-t |
I know that given my complete lack of technical skill I'm not really the one to suggest this, but I was wondering if there might be an easier way to solve this problem.
The problem that more and more of us are running into, as I see it, is that one show can be broadcast many times a week, and different episodes of that programme can be broadcast in the same week as well. To use a British example, BBC 3 is currently showing 'The Real Hustle' 18 times a week, and this week it's shown episodes 1, 2, 8 and 10 in no obvious order. In addition, those 18 times are not the same each week, so setting a very strict matchlist entry could mean that even though it's repeated all the time, you could still miss it! What if Auto-add was made slightly less automatic? Currently it follows the rules laid out for it in the matchlists, but the actual 'run' function is fairly 'push and hope' - especially since it deletes all auto-adds currently in place. I don't know how hard this would be to program, so please accept my apologies if this is just silly, but what I propose is that the Auto-add could look a bit more like the scheduled-to-record list. When the auto-add command is run, it calculates which programmes fit within its matchlist profiles, but takes no action yet. It then shows this list to the user- showing the title, subtitle, an EPG link, description link and a checkbox showing recording status (as in, tick = this is already on the list / unticked = isn't on the list) for every programme identified. Clashes with other scheduled recordings or potential matches would probably still need to be identified; just a box around the two programmes or something to indicate they're on at the same time would work here. I as the user then go through and only tick the box next to the episode of The Real Hustle that I've seen, and make sure that the one episode I do record isn't going to clash with something else I might like to watch as well. I can use the EPG description link to find out more about the episode, if the subtitle doesn't include that info. Then I hit a 'go' button, and the the programmes with ticks are added to the list, those without are left off or removed. Given I'm making unreasonable requests, I'd also like world peace, a million quid, and a new bike for Christmas, please... |
|
|
|
Nov 16 2006, 09:56 AM
Post
#8
|
|
|
Participant Group: Members Posts: 81 Joined: 28-June 05 Member No.: 3,142 Card: VisionPlus DVB-t |
Re-reading the original post, I'm now aware that my suggestion only solves the scheduling problem, not the missed recording one.
If you set this up to record TRH on a Monday, but leave your PC off, it's not going to realise on Tuesday and record it then. However, I think this approach would allow for that to be added in the future by making you select a programme and episode (title/subtitle) to record, not just a string that should be matched. That way, if this future version of WS didn't record something, it could do a search for that particular episode in the EPG data and add it if it wasn't conflicting with something else. One step at a time, though... |
|
|
|
| Guest_dns_* |
Nov 16 2006, 06:05 PM
Post
#9
|
|
Guests |
With this dynamic rule approach it should allow for me to develop several rules not just one size fits all.
The two I have developed so far is: - OnceAWeek, this records the program the first time and does an auto-add scan (to be replaced in the future with a scan through tasks and disabling them). during the auto-add scan processMatch(GuideItem) returns false unless it is the episode for the next week. - RecordEpisodeOnce, This keeps a list of recorded episodes (currently in EpgAutoAdd.xml might store somewhere else later), processMatch(GuideItem) returns false if it has already recorded a match for this episode. I've attached my current progress, it should work but it needs a lot of cleanup before i would use it myself. I would love some feedback on how it goes for you. I have done limited testing on OnceAWeek, i am not sure if it will re-enable after a week I think it does but I am not certain. BACKUP your data\*.xml (or backup everything) as it does make some changes to EpgAutoAdd.xml and it could easily be destroyed. To use copy ws.jar.txt into \WebScheduler.jar, epg_auto_addform.html into \data\templates\epg-auto-addform.html |
|
|
|
Nov 17 2006, 10:21 AM
Post
#10
|
|
|
Forum Regular Group: Members Posts: 219 Joined: 31-July 05 Member No.: 3,277 Card: DVICO FusionHDTV |
>With this dynamic rule approach it should allow for me to develop several rules not just one size fits all.
>The two I have developed so far is: >- OnceAWeek, this records the program the first time and does an auto-add scan (to be replaced in the >future with a scan through tasks and disabling them). during the auto-add scan processMatch(GuideItem) >returns false unless it is the episode for the next week. This is the most reasonable way of looking at the problem. You would nominate a 'period' such as a day being 00:00 to 23:59, or a week being sunday to saturday, then specify the 'restriction' that this show should be recorded a maximum of '1' or 'n' times during a fixed period. The fixed period is important if a show is on Monday, and a repeat on thursday. If due to some problem you miss the monday broadcast and catch the thursday broadcast, you would want the show to be re-enabled the following monday rather than 7 days after the thursday broadcast. >- RecordEpisodeOnce, This keeps a list of recorded episodes (currently in EpgAutoAdd.xml might store >somewhere else later), processMatch(GuideItem) returns false if it has already recorded a match for this >episode. >I've attached my current progress, it should work but it needs a lot of cleanup before i would use it myself. >I would love some feedback on how it goes for you. I have done limited testing on OnceAWeek, i am not >sure if it will re-enable after a week I think it does but I am not certain. >BACKUP your data\*.xml (or backup everything) as it does make some changes to EpgAutoAdd.xml and it >could easily be destroyed. What is the definition of an 'episode'? Subtitle? |
|
|
|
| Guest_dns_* |
Nov 17 2006, 12:30 PM
Post
#11
|
|
Guests |
If you look at what i submitted you would know it does what you said
For OnceAWeek you specify the time and day where the rule should be re enabled, and as you suggested it adds every recording it can for the new week so if you skip it one day it will record it again. It only does one recording each week at the moment but if you want there is no reson why i could not allow you to specify that you want n recordings a week. One limitation of ws as it currently is is there is no easy way to tell if the program recorded fully without any problems so if you turn on your computer and record the last minute of a program it assumes it was recorded fully. For RecordEpisodeOnce it uses the sub-title, if it finds that it has recorded that episode before it will not record it again. This is only useful if the xmltv data has consistent use of sub-title data for the program you want to record but it still is useful if you want to record something repeated a lot like the simpsons. |
|
|
|
Nov 21 2006, 03:14 AM
Post
#12
|
|
|
Participant Group: Members Posts: 81 Joined: 28-June 05 Member No.: 3,142 Card: VisionPlus DVB-t |
Hi dns,
I've not been able to get this to work. I can't find your new filters anywhere in the interface, and the subtitle/episode is now missing from the search entries (ie back before your last addition). Any suggestions? I don;t think this will work for me, unfortunately. The episode data is just not consistent enough. As an example, here are the Radio Times entries for Family Guy in the next week Family Guy (Episode 2 of 20 - Peter's Got Woods) Family Guy (Episode 3 of 20 - Jungle Love) Family Guy (Peter's Got Woods) Family Guy (Jungle Love) ...it would still record each episode. This is in addition to the may times where the data entry guy couldn't be bothered to enter the episode info into the correct field, but instead just put it in the show description. I'm not sure what else to suggest, mind. This post has been edited by simonjp: Nov 21 2006, 03:47 AM |
|
|
|
| Guest_dns_* |
Nov 21 2006, 04:33 PM
Post
#13
|
|
Guests |
This build does not have the filters that I did in my previous build I started from an older copy of the source code and it does have some of the bugs that where fixed a while ago. I'll merge those changes into my next build, this was mainly put as an example of where I am going to go instead of a final version.
You make an interesting point, If i am going to have a list of recorded episodes and use exact string matches it is not going to work as well In the real world. There needs to be some kind of filter that removes some of the inconsistencies in the data or add a reg ex filter to the stored episode names. One approach that may work is creating an auto add rule that adds an extra role to the epg match list that contains the sub-title. for example the epg match list would add a rule as a regex so a sub-title that does not contain the reg ex "*Jungle Love*" this would eliminate "Family Guy (Jungle Love)" but that would not be as easy and would require a bit more tweaking, it is also prone to breaking and would not be a "one size fits all" approach. Another thing I could do is use a much more complex searching mechanism like lucene. I've never used it but it is something designed to build search engine like matches. It might be too complex and not suitable for something like this. I am open to comments if you spot a good way of implementing something like this i will listen. I want feedback good or bad because that is the only way i will make progress. |
|
|
|
Nov 22 2006, 10:04 AM
Post
#14
|
|
|
Participant Group: Members Posts: 81 Joined: 28-June 05 Member No.: 3,142 Card: VisionPlus DVB-t |
Hi dns,
I'm sure all WS users are really appreciative of the work you're putting into these little additions to make an already excellent piece of software remarkable! To expand on what I said last post, I'm afraid I couldn't get your new tools to work - well, to be precise, I couldn't find them within the interface. Neither he Once a Week nor the RecordEpisodeOnce option appeared on any page. I may have installed it incorrectly, but given your previous episode search functions were missing, it looks like it was installed correctly. Unfortunately this means I can't comment on how well your latest additions worked, but I'd love to try them. As said, though, I don't think they'd work too well in the real world- from the sound of things, the data we get here in the UK is among the best around, but it's still not really up to this. As a side point, where would WS keep the list of episodes I've already watched? If it's in the recorded part of the schedule list, then it's going to get fairly long if it's got to contain every episode of the Simpsons I've ever seen... ;-) The concept of the regex is the most logical, but I think it might take too much work to be useful. Each week I'd have to go through the autoadd entries and add a few more conditions to the regex, eg *jungle love* OR *episode 3* OR *episode 2* OR *got woods* - and that's only 2 episodes, imagine what it'd be like by week 10! I don't know what lucene is for, to be honest - how would it vary from the search engine currently built into WS? Literally the only way I can think of implementing this the way I suggested before- the human operator looking down the list and going "that one, that one, not that one, ohh, don't remember that one, have a look at the EPG data- no, seen it..." and so on. It's the only way I can think of to cover all the bases, including (say) the times when C4 are repeating an episode from series 3 of the Simpsons, and you quite fancy seeing it again, but they're also repeating an episode you don't really fancy and can just skip over. Ha, don't make me laugh with your 'progress' bit! You added functionality to WS within a day or two of me asking if something was possible! Try getting that from Microsoft, Apple or the like... :-) Thanks again for your work on this. This post has been edited by simonjp: Nov 22 2006, 10:12 AM |
|
|
|
| Guest_dns_* |
Nov 22 2006, 05:47 PM
Post
#15
|
|
Guests |
Guess i could have explained how to use it better. First you need to stop the dvb web scheduler service, then copy the new jar into your ws directory (backup your old) and restart the service.
To find my additions go epg -> auto-add list -> click the edit icon for an entry. There should be a drop down list of rules and an add button. Once you have added a rule you should be presented with the configuration for that rule. just to explain a little, the search engine in ws is relatively simple it does some basic string matches which is basically that the search string exists in the epg item. The advantage of using a search library like lucine is that it will perform a more complex search that is more like a search engine so it might find things that string matching does not. I'm not sure if it is a good idea or not and if it is going to be too complex to worry about. |
|
|
|
Dec 22 2006, 10:49 AM
Post
#16
|
|
|
Participant Group: Members Posts: 81 Joined: 28-June 05 Member No.: 3,142 Card: VisionPlus DVB-t |
Sorry dns, I've tried but I just can't seem to get this feature to work!
Thanks for all your work on this, however. Merry christmas! |
|
|
|
![]() ![]() |
|
Lo-Fi Version | Time is now: 19th May 2013 - 07:37 AM |