NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 45 46 47 48 49 … 93 Next »
DeleteRecordings.exe

 
  • 0 Vote(s) - 0 Average
DeleteRecordings.exe
dwestbrook
Offline

Junior Member

Posts: 41
Threads: 7
Joined: Feb 2005
#1
2005-03-22, 02:54 AM
This is a new utility called DeleteRecordings.exe that will allow you to keep exactly between X and Y episodes per show.

For example, you want to keep no more than 10 simpsons episodes at a time, but will allow going as low as 5 if space is needed, and maybe only 5 seinfeld episodes but allow it to go as low as 2 if needed.

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">
<config>
<drives>
<drive letter="R" min_free_gb="5.3" />
</drives>
<directories>
<directory path="R:\The Simpsons" min_count="5" max_count="10" />
<directory path="R:\Seinfeld" min_count="2" max_count="5" />
</directories>
</config>
[/QUOTE]

The attached distro file includes a sample config file, a readme with a complete featue list (e.g. will remove comskip, etc files as well), and a batch file to run it in &quot;safe mode&quot; which will tell you what would be deleted, but won't actually do it.

A few notes:
* Inspired by ReplayTV's scheduling feature of &quot;keep X hours of this show&quot;
* Actually had this banged out a couple weeks ago but didn't have time to post it -- the couple references to MaxRecordings in another thread reminded me to get this tested &amp; posted.
* This is pretty simple in that it does not use GBPVR or its database in anyway. A &quot;episodes&quot; ais just defined as a .mpg file in the directory in question. This is good in that this util is simpler in code and more generic in use (i will soon put the extension to use in the cfg file). Also note that gbpvr will remove any db entries for you once it sees that the file is physically gone.
* Source code will be posted momentarily (comments welcome)
dwestbrook
Offline

Junior Member

Posts: 41
Threads: 7
Joined: Feb 2005
#2
2005-03-22, 02:57 AM
[b Wrote:Quote[/b] (dwestbrook @ Mar. 21 2005,21:54)]* Source code will be posted momentarily (comments welcome)
Here is the source (i used SharpDevelop)
ZaDDaZ
Offline

Member

Posts: 96
Threads: 6
Joined: Mar 2005
#3
2005-03-22, 04:31 AM
dwestbrook,

I'm responding to your post in the RenameRecording thread about my MaxRecordings tool. I thought about the disk space thing, but I wasn't sure if anything in GBPVR currently does automatic deletions based on disk space. Also, since this is only going to be recording what I tell it too, and my wife will be able to delete the shows she watches, I didn't see disk space as being a problem for me.

Here is the link to the topic with my post including my utility.

CDKScheduler/XRecord Feature Request: AirDate!

I also didn't know about GBPVR detecting deleted files, but the database code was pretty easy. I do have some comments on your utility. First, you can't always use the same name as the program name since some characters aren't allowed in folder names, colon for instance. That is why I used the database since the exact program title can be used.

Second, a suggestion, some kind of priority for keeping programs would probably be cool to maintain the free disk space. That way, if I like Simpsons more than Seinfeld, it would first delete Seinfeld episodes to free up space before deleting any Simpsons episodes.

Third, it would be cool to first try to delete episodes that were watched.

I hope you don't mind my rambling. I'm just trying to think of things that would be useful. Maybe we can get together on this and bring our two utilities together and add these other functions.
jorm
Offline

Posting Freak

Posts: 2,014
Threads: 109
Joined: Aug 2004
#4
2005-03-22, 01:55 PM
hmm. So what is the difference between delete recordings and max recordings?

I am thinking about how to hook this information into xrecord. Perhaps when you edit a season recording you can specify the max number of shows to keep.

I will update the xml.
WinXP Home
3 X MVPs
Hauppauge 250 MCE
Hauppauge 150
P-4 2.4 GHz / 768 megs Ram
610 Gigs Of Media Storage
KingArgyle
Offline

Posting Freak

Posts: 1,271
Threads: 95
Joined: Nov 2004
#5
2005-03-22, 02:16 PM
Actually, this might be best merged into CDK Scheduler. Most of the information is already there, just need to add elements for max recordings, and diskspace usage.

ZaDDaZ had suggested this in another thread as well.
dwestbrook
Offline

Junior Member

Posts: 41
Threads: 7
Joined: Feb 2005
#6
2005-03-22, 02:33 PM
[b Wrote:Quote[/b] (ZaDDaZ @ Mar. 21 2005,23:31)]I'm responding to your post in the RenameRecording thread about my MaxRecordings tool. I thought about the disk space thing, but I wasn't sure if anything in GBPVR currently does automatic deletions based on disk space. Also, since this is only going to be recording what I tell it too, and my wife will be able to delete the shows she watches, I didn't see disk space as being a problem for me.

thanks for taking a look..
GBPVR doesn't automatically delete based on disk base (at least i haven't seen that ability anywhere).
yeah, this is less useful if you watch exactly what you tape, but what it's really good for is keeping a stock set of eipsodes for a certain show laying around, so you always have something to watch. For example, Simpsons is on 3 times a day here, but if i just did a season record, that would accumulate quickly..

[b Wrote:Quote[/b] (ZaDDaZ @ Mar. 21 2005,23:31)]Here is the link to the topic with my post including my utility.

CDKScheduler/XRecord Feature Request: AirDate!

ah. thanks-- found it (KingArgyle sent me a link, too) .. my search on &quot;MaxRecordings&quot; was missing that thread..

[b Wrote:Quote[/b] (ZaDDaZ @ Mar. 21 2005,23:31)]I also didn't know about GBPVR detecting deleted files, but the database code was pretty easy.

yeah, i assumed it was, and thought about playing with it, but time constraints put me on the KISS path.. I think the GBPVR detecting deleted files is a &quot;feature&quot; .. i noticed it by trial when i moved stuff from one disk to another for space, and there have been some forum posts that mention it when peopleopst asking why their stuff &quot;disappeared&quot; when they manually moved the file.. I'm not sure that i actually like the behavior, but it made this easier..

[b Wrote:Quote[/b] (ZaDDaZ @ Mar. 21 2005,23:31)] I do have some comments on your utility. First, you can't always use the same name as the program name since some characters aren't allowed in folder names, colon for instance. That is why I used the database since the exact program title can be used.

y -- that's somewhat by design. My approach was solely from the disk point of view -- there's a directory D with a bunch of files and we want to limit it to N. The fact that the files in D are generated by GBPVR from a show DD is out of scope and not really relevant. I guess i assumed people would have the directory name instead of the show name because they'd be looking at Windows Explorer or DiskData or whatever and be seeing the directories that where big.
The other thing i was kinda trying to keep in mind was leaving this as generic as possible (which is why i'll remove the .mpg hardcoding)--it could potentially have uses besides GBPVR recordings.

[b Wrote:Quote[/b] (ZaDDaZ @ Mar. 21 2005,23:31)]Second, a suggestion, some kind of priority for keeping programs would probably be cool to maintain the free disk space. That way, if I like Simpsons more than Seinfeld, it would first delete Seinfeld episodes to free up space before deleting any Simpsons episodes.

It actually does this -- if free space is needed, it will start with the episodes listed first in the config file and delete down to the min, then try the next show. A possible future feature add would bea toggle to make it round-robin the shows instead..

[b Wrote:Quote[/b] (ZaDDaZ @ Mar. 21 2005,23:31)]Third, it would be cool to first try to delete episodes that were watched.

Hmm.. definitely interesting idea. probably worthy of being forked into a new thread. some initial thoughts: would obviously require gbpvr/db code. How do you identify &quot;watched&quot; shows? (i think gbpvr keeps the timestamp of where you were at in the db? i know one of the plugins.. myvideos maybe.. will list the watched shows for you). I'd be concerned about deleting stuff that was partially watched, or stuff that maybe you made it through but want to watch part of again or let someone else watch it.. would want some way to protect specific episodes from this.. maybe also add a time factor, so delete shows that were watched &gt;N days ago or something like that. This might be better as a separate utility that gets run before DeleteRecordings ..

[b Wrote:Quote[/b] (ZaDDaZ @ Mar. 21 2005,23:31)]I hope you don't mind my rambling. I'm just trying to think of things that would be useful. Maybe we can get together on this and bring our two utilities together and add these other functions.

as long as you don't mind my response ramblings [Image: smile.gif]
y, i'd love to help on merging these into soemthing more formal to release, and definitely lots of room for feat-adds .. feel free to email me @gmail.com (same username), and i'll also stay active in this thread as well..

thanks,
--david
dwestbrook
Offline

Junior Member

Posts: 41
Threads: 7
Joined: Feb 2005
#7
2005-03-22, 02:44 PM
[b Wrote:Quote[/b] (jorm @ Mar. 22 2005,08:55)]hmm. So what is the difference between delete recordings and max recordings?
AFAIK the features for MaxRecordings are (ZaDDaZ can give the details):
* Specify show name and maximum number of episodes to keep
* Episodes past N are deleted on disk (comskip, etc files as well?)
* Episodes are also explicitly removed from the GBPVR database

DeleteRecordings features:
* Can specify the maximum # of episodes per show to keep
* Can specify the minimum # of episodes per show to keep
* Can specify the minimum amount for desired free space per drive. If below this threshold, additional episodes will be delete until the minimum # to keep is reached.
* Can specify the expendability of shows -- ones at the top of the file will be deleted first if free space is needed.
* If a blah.mpg file needs to be deleted, then blah.* (to target any log or comskip files) will also be deleted.
Behavioral notes:
* &quot;Episode&quot; is defined as a .mpg file in the directory.
* &quot;show&quot; is defined as a directory name
* Does not use any GBPVR code or db (relies on GBPVR to remove from db)


The reason there's two is that they just happened to be written independently and concurrently .. I think we'll work to merge them.
ZaDDaZ
Offline

Member

Posts: 96
Threads: 6
Joined: Mar 2005
#8
2005-03-22, 02:51 PM
The problem I see with hooking this in with XRecord/CDKScheduler is that one can do searches in it. For example, I have one favorite set up for Law &amp; Order. But, since there are so many different permutations on that, I did it as a search. What would it mean to have a &quot;max&quot; for that? Should it be the max for all the episodes that matched the search? Maybe two options, MaxTotalEpisodes and MaxEpisodesPerProgram would work as options in the PriorityRecordings.xml config file. We could also add MinTotalEpisodes and MinEpisodesPerProgram and the disk space info to handle keeping the disk space free. If none of the settings are found, nothing would be done to the programs. Of course, silly questions like what happens if there are two searches for the same show with different settings would need to be handled, but doing something like the first match based on priority would be fine.

King, I know you're one of the authors of CDK, does this sound reasonable? We could roll this functionality up into CDK then.
KingArgyle
Offline

Posting Freak

Posts: 1,271
Threads: 95
Joined: Nov 2004
#9
2005-03-22, 03:17 PM
I'm more of in a high level design role now with CDK Scheduler, actual implementation has been turned over to Jrock. There are a couple of ways to handle the searches:

1. A default to the Configuration section of CDK Scheduler indicating the number of shows to keep. If 0, then this feature would be disabled and all shows are kept.

2. Seperate thought is to keep it seperate, but add an API that Jorm or somebody can use to create and maintain the scheduler. I like the fact that MaxRecordings uses a Schema for validation.

My original idea for the external scheduler which became CDK Scheduler thanks to the help of Jorm and Jrock, was to have a suite of utilities for managing and scheduling recordings.

1. PriorityRecordings
2. Rename Recordings
3. Recording Manager - i.e. How many shows to keep, how much diskspace to allow
4. Suggestion Scheduler - Tivo like suggestions, the BayersScheduler fits this role.

Unfortunately right now I don't have a huge amount of time to take a look at exactly how to get Max Recordings and Delete Recordings merged into the suite. My recommendations right now are to continue the conversations, but also talk with Jrock about adding a helper class to the RecordingUtils.dll file for management of the XML file used by Max Recordings.
Will0r
Offline

Junior Member

Posts: 10
Threads: 1
Joined: Mar 2005
#10
2005-06-17, 12:26 AM
I'm using delete recordings and it works fine.
but if there is a directory with a & in its name (f.e. "Quarks & Co.") i get a error message that the name is not valid.

is there anyone who can fix this?

tobias
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (2): 1 2 Next »


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

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

Linear Mode
Threaded Mode