Record defined Series/Episodes
Forum rules
★ Download the latest EPG123 here: http://epg123.garyan2.net <> Setup guide here: http://epg123.garyan2.net/downloads/epg123_Guide.pdf ★
★ Download the latest EPG123 here: http://epg123.garyan2.net <> Setup guide here: http://epg123.garyan2.net/downloads/epg123_Guide.pdf ★
-
- Posts: 46
- Joined: Fri Dec 08, 2017 5:38 pm
- Location:
-
HTPC Specs:
Record defined Series/Episodes
...just as a preface: I don't want to high-jack this forum! But since it is important for me and I discovered a bug in a previously posted file (viewtopic.php?p=132906#p132906) I would like to correct this (unfortunately there is no "edit" of old posts available) :
Task:
how to record defined episodes of a series, like
record: = s02e05
record: < s03e10
record: > s05e00
the batch script should do this, now corrected for troubles of "octal" numbers having leading "0"...
- extract the txt, rename as "_Serie.bat" and copy into a Directory created within epg123 Directory (parallel to .../output; e.g. .../recreq); I have epg123 installed outside /program files... so; I'm not sure whether it will work "inside" (not tested)...
- you can change certain Default Settings:
+ directory for temporal files; default is "dr=", which means the files stay in the dir of the batch; I have directed them to my RAM-drive: "dr=x:\"
+ correction for UTC (0/1); normally not needed, so the default is "0";
+ create log-file; default is "1";
+ should Mediacenter (which is opened during the process) be closed at the end?; default is "1" (yes)
- the "_Serie.bat" has to be run as admin; I have set it up as a scheduled Task once a week (with 14 days of time line, this should be enough);
- basically this code performs a reverse Engineering on the "epg123.mxf" (it does not change it); on my small low power HTPC-machine the parsing takes ~1h (~50 Sat-channels);
- during the first run (do it manually; right-click as admin) the Batch will create a "_rec.ini" and stop; do not create the file any other way; read line 1+2 if the ini; don't delete them;
- you should now edit lines 3 and following (add lines as needed) with the series you want (it is possible to have the same series in more than one line, like "BLA = s05e03" and "BLA > s06e00")
- during the next run also a vbs file will be created which is needed
- there will be also for every series a "*_done.txt" created which contains the already recorded episodes; do not delete them
What this code does is to create a “*.c2r” file ("click to record") for each episode and inject it into Mediacenter; since that means Mediacenter incorporates the info on its own, the risk to destroy the database is minimized (but maybe not zero!); I tried to do it via recordings backup but obviously this fails because a critical ID of the channels in the .mxf is changing every day… kills the database…
Edit: ...corrected silly error with brackets in the _rec.ini creation step, sorry...
Task:
how to record defined episodes of a series, like
record: = s02e05
record: < s03e10
record: > s05e00
the batch script should do this, now corrected for troubles of "octal" numbers having leading "0"...
- extract the txt, rename as "_Serie.bat" and copy into a Directory created within epg123 Directory (parallel to .../output; e.g. .../recreq); I have epg123 installed outside /program files... so; I'm not sure whether it will work "inside" (not tested)...
- you can change certain Default Settings:
+ directory for temporal files; default is "dr=", which means the files stay in the dir of the batch; I have directed them to my RAM-drive: "dr=x:\"
+ correction for UTC (0/1); normally not needed, so the default is "0";
+ create log-file; default is "1";
+ should Mediacenter (which is opened during the process) be closed at the end?; default is "1" (yes)
- the "_Serie.bat" has to be run as admin; I have set it up as a scheduled Task once a week (with 14 days of time line, this should be enough);
- basically this code performs a reverse Engineering on the "epg123.mxf" (it does not change it); on my small low power HTPC-machine the parsing takes ~1h (~50 Sat-channels);
- during the first run (do it manually; right-click as admin) the Batch will create a "_rec.ini" and stop; do not create the file any other way; read line 1+2 if the ini; don't delete them;
- you should now edit lines 3 and following (add lines as needed) with the series you want (it is possible to have the same series in more than one line, like "BLA = s05e03" and "BLA > s06e00")
- during the next run also a vbs file will be created which is needed
- there will be also for every series a "*_done.txt" created which contains the already recorded episodes; do not delete them
What this code does is to create a “*.c2r” file ("click to record") for each episode and inject it into Mediacenter; since that means Mediacenter incorporates the info on its own, the risk to destroy the database is minimized (but maybe not zero!); I tried to do it via recordings backup but obviously this fails because a critical ID of the channels in the .mxf is changing every day… kills the database…
Edit: ...corrected silly error with brackets in the _rec.ini creation step, sorry...
- Attachments
-
- _Serie_02.zip
- (3.72 KiB) Downloaded 42 times
-
- Posts: 46
- Joined: Fri Dec 08, 2017 5:38 pm
- Location:
-
HTPC Specs:
Update/Bugfix...
- I have realized that in situations where more channels are subscribed than actually mapped in the line-up, an episode could be found in the epg123.mxf, which is not represented in the actual epg channel line-up;
- in this version the available channels are (I hope correctly) retrieved from the latest Media Center backup of lineup, to avoid this error
- this time I turned to a 3rd Party script for some of the string manipulations; it is Dave Benham's JREPL.bat (version 8.5), which can be downloaded here (a very universal string manipulation tool):
https://www.dostips.com/forum/viewtopic ... 26887da131
- rename it to "_JREPL.bat" and place it into the same directory as "_Serie.bat"
- I have realized that in situations where more channels are subscribed than actually mapped in the line-up, an episode could be found in the epg123.mxf, which is not represented in the actual epg channel line-up;
- in this version the available channels are (I hope correctly) retrieved from the latest Media Center backup of lineup, to avoid this error
- this time I turned to a 3rd Party script for some of the string manipulations; it is Dave Benham's JREPL.bat (version 8.5), which can be downloaded here (a very universal string manipulation tool):
https://www.dostips.com/forum/viewtopic ... 26887da131
- rename it to "_JREPL.bat" and place it into the same directory as "_Serie.bat"
- Attachments
-
- _Serie_03.zip
- (4.72 KiB) Downloaded 42 times
-
- Posts: 46
- Joined: Fri Dec 08, 2017 5:38 pm
- Location:
-
HTPC Specs:
corrected typo "qrem" (which produced some error messages) to "@rem"
- Attachments
-
- _Serie_03a.zip
- (4.72 KiB) Downloaded 79 times
-
- Posts: 46
- Joined: Fri Dec 08, 2017 5:38 pm
- Location:
-
HTPC Specs:
I have converted this into an executable, which is faster (obviously) and does not need any additional third party tools;
- safe the exe in a path parallel to '\output'
- use "prefix Episode Description with episode number" in epg123.exe;
- during the first run an ini-filed is created; read and configure as needed;
- it is assumed that s02e05 = S2:E5; in the ini both notation can be used; in the done files only the first is used;
- if you setup a 'sheduled Task', define also the path 'execute in', otherwise the relative path might not work
hope it works!
- safe the exe in a path parallel to '\output'
- use "prefix Episode Description with episode number" in epg123.exe;
- during the first run an ini-filed is created; read and configure as needed;
- it is assumed that s02e05 = S2:E5; in the ini both notation can be used; in the done files only the first is used;
- if you setup a 'sheduled Task', define also the path 'execute in', otherwise the relative path might not work
hope it works!
- Attachments
-
- _Click2Record.zip
- (312.96 KiB) Downloaded 36 times
-
- Posts: 46
- Joined: Fri Dec 08, 2017 5:38 pm
- Location:
-
HTPC Specs:
an update (hopefully the last):
it provides the additional option to move the recordings to a selected destination (like the NAS: move=\\MyNAS\Series);
it will create a separate subfolder under the 'move-path' for each series and move the recording while renaming it to 'episode-number_episode-title.wtv' (e.g.: s01_e04_If the Stars Should Appear.wtv);
moving means: it is deleted afterwards in the 'Recorded TV'-folder; so, be careful and test first...
the 'moving' is only done if a series in the ini is marked with 'm', the move directory is defined and the 'RecordPath' can be extracted from Registry;
warning: if you have already many recordings of a 'to be moved' series, the copying might take a while! you can kill the process; the file in-process will stay intact; c2r will restart next time with the last file;
important: check 'add episode number to description' in epg123.exe; and perform a database backup in the epg123Client.exe with your latest setup, otherwise the channels-lineup might not be correct;
do not check 'add episode number to title' otherwise you will get the episode number twice in the moved filename;
(if you re-create the ini, you will get the description in there; just copy-paste the series-info from your old ini into the new);
good luck!
PS: execute as admin
it provides the additional option to move the recordings to a selected destination (like the NAS: move=\\MyNAS\Series);
it will create a separate subfolder under the 'move-path' for each series and move the recording while renaming it to 'episode-number_episode-title.wtv' (e.g.: s01_e04_If the Stars Should Appear.wtv);
moving means: it is deleted afterwards in the 'Recorded TV'-folder; so, be careful and test first...
the 'moving' is only done if a series in the ini is marked with 'm', the move directory is defined and the 'RecordPath' can be extracted from Registry;
warning: if you have already many recordings of a 'to be moved' series, the copying might take a while! you can kill the process; the file in-process will stay intact; c2r will restart next time with the last file;
important: check 'add episode number to description' in epg123.exe; and perform a database backup in the epg123Client.exe with your latest setup, otherwise the channels-lineup might not be correct;
do not check 'add episode number to title' otherwise you will get the episode number twice in the moved filename;
(if you re-create the ini, you will get the description in there; just copy-paste the series-info from your old ini into the new);
good luck!
PS: execute as admin
- Attachments
-
- _Click2Record.zip
- (321.71 KiB) Downloaded 76 times
- IT Troll
- Posts: 1061
- Joined: Sun Nov 27, 2011 9:42 am
- Location: Edinburgh, UK
-
HTPC Specs:
This is not something I have ever needed to do, but hopefully others will find it useful.
Thanks for the contribution and for sharing.
Thanks for the contribution and for sharing.
Are you a Recorded TV HD user or want to give it a try? Check out the new community-made update; Recorded TV HD v2.1.1
-
- Posts: 46
- Joined: Fri Dec 08, 2017 5:38 pm
- Location:
-
HTPC Specs:
bug-fix in date creation
- Attachments
-
- Click2Record.zip
- (321.73 KiB) Downloaded 35 times
-
- Posts: 46
- Joined: Fri Dec 08, 2017 5:38 pm
- Location:
-
HTPC Specs:
...the algorithm tripped over the recently introduced "DUMMY" service...
- Attachments
-
- _Click2Record.zip
- (321.98 KiB) Downloaded 40 times
-
- Posts: 46
- Joined: Fri Dec 08, 2017 5:38 pm
- Location:
-
HTPC Specs:
...adjusted to changed mxf-file structure...
- Attachments
-
- _Click2Record.zip
- (216.6 KiB) Downloaded 10 times