Record defined Series/Episodes

An evolving, supported alternative to Rovi
Forum rules
★ Download the latest EPG123 here: https://garyan2.github.io/ <> Setup guide here: https://garyan2.github.io/install.html
Post Reply
cmal

Posts: 46
Joined: Fri Dec 08, 2017 5:38 pm
Location:

HTPC Specs: Show details

Record defined Series/Episodes

#1

Post by cmal » Sat Jan 25, 2020 12:00 am

...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...
Attachments
_Serie_02.zip
(3.72 KiB) Downloaded 75 times

cmal

Posts: 46
Joined: Fri Dec 08, 2017 5:38 pm
Location:

HTPC Specs: Show details

#2

Post by cmal » Fri Apr 17, 2020 10:07 pm

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"
Attachments
_Serie_03.zip
(4.72 KiB) Downloaded 66 times

cmal

Posts: 46
Joined: Fri Dec 08, 2017 5:38 pm
Location:

HTPC Specs: Show details

#3

Post by cmal » Sat May 16, 2020 4:02 pm

corrected typo "qrem" (which produced some error messages) to "@rem"
Attachments
_Serie_03a.zip
(4.72 KiB) Downloaded 115 times

cmal

Posts: 46
Joined: Fri Dec 08, 2017 5:38 pm
Location:

HTPC Specs: Show details

#4

Post by cmal » Sun Dec 20, 2020 9:18 pm

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!
Attachments
_Click2Record.zip
(312.96 KiB) Downloaded 61 times

cmal

Posts: 46
Joined: Fri Dec 08, 2017 5:38 pm
Location:

HTPC Specs: Show details

#5

Post by cmal » Sat Jan 02, 2021 8:09 pm

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
Attachments
_Click2Record.zip
(321.71 KiB) Downloaded 98 times

User avatar
IT Troll

Posts: 1172
Joined: Sun Nov 27, 2011 9:42 am
Location: Edinburgh, UK

HTPC Specs: Show details

#6

Post by IT Troll » Sun Jan 03, 2021 10:21 am

This is not something I have ever needed to do, but hopefully others will find it useful.
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

cmal

Posts: 46
Joined: Fri Dec 08, 2017 5:38 pm
Location:

HTPC Specs: Show details

#7

Post by cmal » Sat Feb 13, 2021 11:18 pm

bug-fix in date creation
Attachments
Click2Record.zip
(321.73 KiB) Downloaded 74 times

cmal

Posts: 46
Joined: Fri Dec 08, 2017 5:38 pm
Location:

HTPC Specs: Show details

#8

Post by cmal » Tue Aug 31, 2021 11:13 am

...the algorithm tripped over the recently introduced "DUMMY" service...
Attachments
_Click2Record.zip
(321.98 KiB) Downloaded 78 times

cmal

Posts: 46
Joined: Fri Dec 08, 2017 5:38 pm
Location:

HTPC Specs: Show details

#9

Post by cmal » Wed Jan 11, 2023 9:55 pm

...adjusted to changed mxf-file structure...
Attachments
_Click2Record.zip
(216.6 KiB) Downloaded 36 times

Post Reply