2005-07-24, 05:44 AM
I'm very sorry for the delay, but I have to keep my business afloat and develop free software after that. Here is my first release of RecordingsManager. It combines all the functionality of these three utilities:
Along with combining the functionality of all of those, it adds in the following extras:
I'm including the archive here with the executable, debug file and sample config file. To use, put the files in your GBPVR folder and add a call to RenameRecordings in your PostProcessing.bat file and/or RecordingStatus.bat.
I've been testing this for a while now and I can't find any functions that are causing problems. The coolest thing to do is to change the format for renaming files and all your files are renamed almost instantly. For the rename format, here are the rules:
There are 3 main elements: ScheduledRecording, Programme (or Program for us in the US) and Channel. When one of these elements is found, it should have an attribute called "Property" which is the property to retrieve on the element. It MUST be the correct case as I'm using reflection to find the method name. Since this can be a somewhat inconvenient way of retrieving values, I added some shortcut elements:
Title, TitleName, ProgramName - Program title
SubTitle, Episode, EpisodeName - Program episode name
ChannelName - (obvious)
ChannelNumber - (obvious)
StartTime - Start date/time of program
EndTime - End date/time of program
Further, if an element that doesn't match any of these exists, it will search the 3 main elements for a property with the element name.
All elements can optionally contain a Format attribute which should be a .NET format string. The one and only parameter to the format string is the value of the element, so "*{0}*" would cause the value to be surrounded by asterisks. If an attribute called SkipIfNotFound is set to true and the attribute results in no value, it will be skipped entirely. This is really only useful along with a format string.
I plan on creating a plugin for the config UI to allow configuration of all of these options.
I really like the option of putting this in the RecordingStatus.bat file, but I noticed that this is called by the system tray utility. So, if the tray utility isn't running because no one is logged into the machine, it doesn't get called. Also, when it does, it shows up on the desktop, which I find inconvenient. It would be nice if the GBPVR service called RecordingStatus.bat instead of the system tray utility.
The StayAliveMinutes indicates how long the application should keep running after it has ran out of things to do. This is useful to cause the application to poll for an extended period. This utility only allows one instance of itself to run. If another instance is started, it will detect the first instance, tell it to check and exit. The RefreshIntervalSeconds is the time to wait after renames have taken place before trying to continue. This is needed because of a latency issue with the database file. 10 seconds seems to work for me on this setting, but if you get files renamed and then get files not found soon after in your log, you may need to increase this time.
OK, I've written entirely too much here. I hope that everyone likes this. I'm going to work on the WiKi page for this and put all this info there as well. If anyone does run across issues, please let me know. Include info from the RecordingsManager.exe.log file as this should contain everything, including accurate stack traces in case of any exceptions.
ZaDDaZ
- RenameRecordings
- MaxRecordings
- ComSkipHelper
Along with combining the functionality of all of those, it adds in the following extras:
- Ability to turn enable/disable any of the functions
- Ability to change configuration file on the fly and have new settings take effect immediately
- Comskip of in-progress recordings
- Excluding programs from comskip based on channel or program name
- Monitoring of folders for comskip detection
- Options to turn off and/or control comskip process monitoring
- Custom formatting of renamed files (this allows the use of any property on the ScheduledRecording, Programme or Channel for a recording)
- Enhanced logging - uses standard GBPVR logging functions
I'm including the archive here with the executable, debug file and sample config file. To use, put the files in your GBPVR folder and add a call to RenameRecordings in your PostProcessing.bat file and/or RecordingStatus.bat.
I've been testing this for a while now and I can't find any functions that are causing problems. The coolest thing to do is to change the format for renaming files and all your files are renamed almost instantly. For the rename format, here are the rules:
There are 3 main elements: ScheduledRecording, Programme (or Program for us in the US) and Channel. When one of these elements is found, it should have an attribute called "Property" which is the property to retrieve on the element. It MUST be the correct case as I'm using reflection to find the method name. Since this can be a somewhat inconvenient way of retrieving values, I added some shortcut elements:
Title, TitleName, ProgramName - Program title
SubTitle, Episode, EpisodeName - Program episode name
ChannelName - (obvious)
ChannelNumber - (obvious)
StartTime - Start date/time of program
EndTime - End date/time of program
Further, if an element that doesn't match any of these exists, it will search the 3 main elements for a property with the element name.
All elements can optionally contain a Format attribute which should be a .NET format string. The one and only parameter to the format string is the value of the element, so "*{0}*" would cause the value to be surrounded by asterisks. If an attribute called SkipIfNotFound is set to true and the attribute results in no value, it will be skipped entirely. This is really only useful along with a format string.
I plan on creating a plugin for the config UI to allow configuration of all of these options.
I really like the option of putting this in the RecordingStatus.bat file, but I noticed that this is called by the system tray utility. So, if the tray utility isn't running because no one is logged into the machine, it doesn't get called. Also, when it does, it shows up on the desktop, which I find inconvenient. It would be nice if the GBPVR service called RecordingStatus.bat instead of the system tray utility.
The StayAliveMinutes indicates how long the application should keep running after it has ran out of things to do. This is useful to cause the application to poll for an extended period. This utility only allows one instance of itself to run. If another instance is started, it will detect the first instance, tell it to check and exit. The RefreshIntervalSeconds is the time to wait after renames have taken place before trying to continue. This is needed because of a latency issue with the database file. 10 seconds seems to work for me on this setting, but if you get files renamed and then get files not found soon after in your log, you may need to increase this time.
OK, I've written entirely too much here. I hope that everyone likes this. I'm going to work on the WiKi page for this and put all this info there as well. If anyone does run across issues, please let me know. Include info from the RecordingsManager.exe.log file as this should contain everything, including accurate stack traces in case of any exceptions.
ZaDDaZ