alexirion
16.03.2009, 22:49
otrDownloader v1.0
(c) 2009 by Alexander Irion (alexirion@web.de)
Description
The purpose of otrDownloader is to automatically download your tv recordings, that were made with www.onlinetvrecorder.com (otr), a online tv recording service.
Once properly configured, otrDownloader silently works in the background and just fills your local directory with all recordings, you have programmed. It downloads, decodes and finally removes the recordings from otr.
To meet the happy hour download time of otr, in which downloading is for free (currently 0.00 – 8.00), the time interval for downloading can be specified. If the download time interval is exceeded, downloading is canceled and resumed within the next download period.
otrDownloader prefers to download high quality (HQ) versions of recordings, if they exist. Since, HQ versions usually follow the normal versions a little bit later, a normal version is only taken for downloading, if the recording is older than a specified time interval (24h by default). So, this feature delays downloading, but ensures that HQ versions are taken. If you don't want this waiting, you can set the waiting time to zero in the configuration file.
Requirements
The following perl modules are required to be installed:
WWW::Mechanize
WWW::Mechanize::FormFiller
WWW::Curl::Easy
Date::Calc::Object
Log::Log4perl
Time::HiRes
If not already done, they can be installed with the CPAN shell by:
perl -MCPAN -eshell
install <modulName>
It is also required to have premium member status in otr, because download link lists are only then available.
For decoding, the program “otrdecoder”, that can be downloaded from the otr website, must be installed and available in the search path.
Configuration
If otrDownloader is started it checks for a configuration file (configuration.txt) in the current directory. If it does not exist it creates the file with default values. You then have at least to change the entries username, password and destinationPath. For a description of the configuration entries see the comments in the configuration file.
Internals
otrDownloader creates a directory “.tmp” under the given destination path. Recordings are first downloaded to this hidden directory and only moved to the destination path, if they are completely decoded. Also, the log files are written to this hidden directory.
At the beginning of each download period, otrDownloader deletes all recordings from otr, that were already decoded and will try to download all recordings, that are not already residing in the specified destination path. After each downloading period, the otrkey files that were successfully downloaded are decoded by calling otrdecoder.
Logging
otrDownloader writes out a new log file each time started, and with the beginning of each new download period. The files are written to the “.tmp” directory under the destination path and are automatically rotated – so you will see the logs of the last seven download periods, for example.
The log level can be defined in the configuration file and usually should be INFO. For debugging purposes you can increase the logging level to TRACE, for maximum output.
(c) 2009 by Alexander Irion (alexirion@web.de)
Description
The purpose of otrDownloader is to automatically download your tv recordings, that were made with www.onlinetvrecorder.com (otr), a online tv recording service.
Once properly configured, otrDownloader silently works in the background and just fills your local directory with all recordings, you have programmed. It downloads, decodes and finally removes the recordings from otr.
To meet the happy hour download time of otr, in which downloading is for free (currently 0.00 – 8.00), the time interval for downloading can be specified. If the download time interval is exceeded, downloading is canceled and resumed within the next download period.
otrDownloader prefers to download high quality (HQ) versions of recordings, if they exist. Since, HQ versions usually follow the normal versions a little bit later, a normal version is only taken for downloading, if the recording is older than a specified time interval (24h by default). So, this feature delays downloading, but ensures that HQ versions are taken. If you don't want this waiting, you can set the waiting time to zero in the configuration file.
Requirements
The following perl modules are required to be installed:
WWW::Mechanize
WWW::Mechanize::FormFiller
WWW::Curl::Easy
Date::Calc::Object
Log::Log4perl
Time::HiRes
If not already done, they can be installed with the CPAN shell by:
perl -MCPAN -eshell
install <modulName>
It is also required to have premium member status in otr, because download link lists are only then available.
For decoding, the program “otrdecoder”, that can be downloaded from the otr website, must be installed and available in the search path.
Configuration
If otrDownloader is started it checks for a configuration file (configuration.txt) in the current directory. If it does not exist it creates the file with default values. You then have at least to change the entries username, password and destinationPath. For a description of the configuration entries see the comments in the configuration file.
Internals
otrDownloader creates a directory “.tmp” under the given destination path. Recordings are first downloaded to this hidden directory and only moved to the destination path, if they are completely decoded. Also, the log files are written to this hidden directory.
At the beginning of each download period, otrDownloader deletes all recordings from otr, that were already decoded and will try to download all recordings, that are not already residing in the specified destination path. After each downloading period, the otrkey files that were successfully downloaded are decoded by calling otrdecoder.
Logging
otrDownloader writes out a new log file each time started, and with the beginning of each new download period. The files are written to the “.tmp” directory under the destination path and are automatically rotated – so you will see the logs of the last seven download periods, for example.
The log level can be defined in the configuration file and usually should be INFO. For debugging purposes you can increase the logging level to TRACE, for maximum output.