Adding series and episode numbers (SxxExx) to filenames
Added by D N almost 9 years ago
Hi,
This is probably a simple question for someone to answer and I am probably just being dumb but I cant work out how to get the series and episode number into the file name.
I am running Build: 4.0-gitffc3ff1cb1 on a synology 1511+.
I have created a new recording profile and I am saving files in the matroska format. The only place I can see that references epidode is "include episode in filename" in the filename options, although this doesnt seem to work.
I would like the filename for tv to be "series name - Sxx-Exx - episode name". Is this possible with TvHeadend?
I have found in the TvHeadend 4.0 guide under "digital video recorder profiles" a section for "Full Pathname Specification" that looks like its exactly what I am looking for but I dont know what to do with it?
Degsy
Full Pathname Specification
Format String : The string allow to manually specify the full path generation using the predefined modifiers for strftime (see man strftime, except %n and %t) and Tvheadend specific. Note that you may modify some of this format string setting using the GUI fields below.
Format Description Example
$t$n.$x Default format (title, unique number, extension) Tennis - Wimbledon-1.mkv
$s Event subtitle name Sport
$t Event title name Tennis - Wimbledon
$e Event episode name S02-E06
$c Channel name SkySport
$n Unique number added when the file already exists -1
$x Filename extension (from the active stream muxer mkv
%F ISO 8601 date format 2011-03-19
%R The time in 24-hour notation 14:12
The format strings $t,$s,%e,$c also have delimiter variants such as $ t (space after the dollar character), $-t, $_t, $.t, $,t, $;t. In these cases, the delimiter is applied only when the substituted string is not empty.
Replies (10)
RE: Adding series and episode numbers (SxxExx) to filenames - Added by Prof Yaffle almost 9 years ago
Tvheadend will only use the numbers if it knows them - i.e. if your EPG is broadcasting them. Most entries on my EPG (the main page) are blank - some episodes have numbers, but it's frequently wrong - so most of my recordings don't have episode numbers as a result.
RE: Adding series and episode numbers (SxxExx) to filenames - Added by D N almost 9 years ago
Thanks for the reply prof.
No matter what I choose in the filename options it always saves every programme as the default format. When I look at the meta data using mediaInfo it does show the series and episode data.
A perfect solution for me is to have two recording profiles saving the files in two different folders with two different formats for movies and tv shows. It seems to be a simple job considering the other complicated stuff this software does.
Do you know if a later version allows for a string to be added to manage filenames? such as the full pathname specification I added above? That comes from the TvHeadend 4.0 guide and I have TvHeadend 4.0 installed but I cant seem to use it.
RE: Adding series and episode numbers (SxxExx) to filenames - Added by Prof Yaffle almost 9 years ago
I just did some testing here and it pretty much works as expected... a few different variants gave me this:
...../Videos/Recordings/ITV Wales HD$ ll total 120192 drwxrwxrwx 2 hts video 10 Dec 30 15:36 ./ drwxrwxrwx 23 ian ian 29 Dec 30 15:31 ../ -rw-rw-rw- 1 hts video 12795656 Dec 30 15:36 Midsomer Murders - 2015-12-30 - 14-35 - S15E04 .ts -rw-rw-rw- 1 hts video 13023136 Dec 30 15:35 Midsomer Murders - 2015-12-30 14-35 - S15E04 .ts -rw-rw-rw- 1 hts video 17425344 Dec 30 15:37 Midsomer Murders -2015-12-30 -14-35 - S15E04 .ts -rw-rw-rw- 1 hts video 20583368 Dec 30 15:33 Midsomer Murders 2015-12-30 14-35 S15E04 .ts -rw-rw-rw- 1 hts video 9732196 Dec 30 15:32 Midsomer Murders2015-12-3014-35 S15E04.ts -rw-rw-rw- 1 hts video 18499012 Dec 30 15:31 Midsomer Murders2015-12-3014-35-S15E04.ts -rw-rw-rw- 1 hts video 19116780 Dec 30 15:35 Midsomer Murders Date_2015-12-30 Time_14-35 S15E04 -1.ts -rw-rw-rw- 1 hts video 11139188 Dec 30 15:34 Midsomer Murders Date_2015-12-30 Time_14-35 S15E04 .ts
... so I'm getting some extraneous spaces, but that's all... e.g. where a space is inserted in expectation of the next field, but that field is then blank so you're left with a trailing space. A quick test confirms that on an episode-less broadcast:
...../Videos/Recordings/Channel 4 HD$ ll Freak* -rw-rw-rw- 1 hts video 35390436 Dec 30 15:38 Freaky Friday -2015-12-30 -14-35 - .ts
So: some fine-tuning to be done, but it sort-of works for me (4.1-1234~gc4616d1 - a relatively recent build off master, but I'm not aware that 4.0 should be wildly different).
This is by playing with the string in "Full pathname specification" on the Recording profile, as you found - e.g. simply altering it to something like $c/$t -%F -%R -$ e $n.$x
.
RE: Adding series and episode numbers (SxxExx) to filenames - Added by D N almost 9 years ago
Thanks for helping me out here Prof.
Where do I find the "Full pathname specification"?
I dont know where to enter "$c/$t -%F -%R -$ e $n.$x."
Is this in the recording system path or the post processor command?
My recorder profiles page si the same as the image in http://docs.tvheadend.org/webui/config_dvr/
(I have a feeling I am being particularly stupid here...)
thanks,
Degsy.
RE: Adding series and episode numbers (SxxExx) to filenames - Added by Prof Yaffle almost 9 years ago
Must be a version issue, then... I have the "Full pathname specification" between "Recording file options" and "Subdirectory options". And I originally took that screenshot you've linked to, so it must be new for the upcoming 4.2 release (sorry, I forget the difference between what's in the release versions vs development ones sometimes).
You'll have to upgrade to a master/nightly build, I suspect, if you want this in the meantime - or perhaps use a post-processing script in some capacity?
RE: Adding series and episode numbers (SxxExx) to filenames - Added by D N almost 9 years ago
Do you know where I would get the 4.2 release for a synology 1511+?
I am not that clued up on linux so will find it difficult to do it via the command line.
I installed this via Dierkse. I also have an option for a build 4.1?
RE: Adding series and episode numbers (SxxExx) to filenames - Added by Prof Yaffle almost 9 years ago
4.2 hasn't been released yet - I guess packages will then meander through to Synology as someone builds it.
If you have a 4.1 option from any time later than May this year then you'll get that option - just remember that you're installing work-in-progress software, so it's always possible that you generate some new problems for yourself by accident...
RE: Adding series and episode numbers (SxxExx) to filenames - Added by D N almost 9 years ago
Thanks for all your help on this Prof.
Ill wait for the version 4.2 to be built by someone.
RE: Adding series and episode numbers (SxxExx) to filenames - Added by D N almost 9 years ago
The version 4.1 doesnt work for me.
No matter what user name and password I add at the install stage it doesnt accept them. Just keeps asking me for authentication.