A small project called to develop some python scripts to aid in archiving SiliconDust HDHomerun DVR recordings to plex. It uses the thetvdb for season and episode information for when the guide from SiliconDust doesn't.
At this stage scripts are still in development and dependent on updates from SiliconDust.
The archive2plex.py will parse the HDHR recordings folder, match the series and episodes to thetvdb and then archive the files to Plex folder depending on settings in the configuration file.
The fix_filenames.py iterates through all the files in the HDHR recordings folder, scans the TS file for meta data and then does a look up on thetvdb for missing info before renaming the file to match Plex requirements (and optionally the folder).
The create_mdonly.py provides a simple script to take the output metadata from the logfiles and generate a valid MPG for testing.
The dump_md.py scans an MPG file for the HDHR metadata section and dumps to STDOUT
QNAP-x51 with QTS 4.1.4/4.2 (linux)
$ python fix-filenames.py --config <config file>
$ python ./create_mdonly.py <metadata file>
HDHR-DVR The main configuration details are stored in a section titled [HDHR-DVR] the parameters include
logfile:
loglevel:
dvrpath:
plexpath:
link2plex:
link2dvr:
metasave:
renamefile:
renamedir:
forceupdate:
skipshows:
forceshows:
postproc:
livedelay:
days2delete:
days2archive:
Skipping Shows
Some shows you just don't want to backup to Plex, and some shows cause issues and you want to skip them. To do so just create a section matching the name provided in the configuration files 'skipshows' parameter and the scripts will parse the list. Each entry must have a unique key. Recommendation is simply to number the entries, For Example
[skip_shows]
1: "Masterpiece Classic"
2: "Masterpiece"
3: "The Tonight Show with Jimmy Fallon"
4: "Masterchef"
Force Shows
Some of the shows in your skip list you want to force the scripts to remove once days2delete are expired. But because they are in the skip list, they won't be processed. To bring them back into consideration for deleting add the shows to a new section matching the name provided in the configuration files 'forceshows' forceshows Each entry must have a unique key. Recommendation is simply to number the entries, For Example
[force_shows]
1: "Hell's Kitchen"