# kmttg 'File Naming' Template for Plex



## ClearToLand (Jul 10, 2001)

[*NOTE:* I originally posted this on the AVS Forum as a reply to @kelson in the TiVo Roamio OTA DVR thread, but since @kelson is not a member on TCF and the larger kmttg audience is here, I'm reposting it. I choose to make it separate from the main kmttg thread so that the title would appear in SEARCHes. *CLICK to expand* doesn't work on 'foreign' posts so I used INDENT.]

--BEGINNING OF QUOTE--
*Kelson:*When you configure _kmttg_ use the following string for your "File Naming" template:

[mainTitle] - [SeriesEpNumber] - [episodeTitle] ([monthNum]_[mday]_[year])​
This will name the downloads in the required Plex compatible format so the Plex server will be able to scrape the meta-data without your intervention. I also recommend you select to option to "Decrypt using tivolibre instead of tivodecode" which you will find on the Program Options tab. You can then use Plex to stream the titles to any device with a Plex client in or out of the house. You will still have the problem of skipping commercials if the Plex client doesn't have decent FF capabilities. I didn't realize that TiVo Stream has been discontinued.​
*ClearToLand:* Can I add anything (like [movieYear] [originalAirDate]) to the end of your template, or must it remain verbatim for the Plex server to be able to use it?

*Kelson:*Anything after the second hyphen is ignored by the Plex server so put whatever you want there.​--END OF QUOTE--

*Kelson's* original post, and subsequent reply, led me to further research the kmttg "File Naming" template options and I settled on:

[mainTitle] -[" " movieYear "][" " SeriesEpNumber " "]["- " episodeTitle] [startTime] [channel] [originalAirDate]​
This results in:
*Series:*
Call the Midwife - s06e07 - Episode 7 2017-05-16_0129 WNETDT 2017-05-14
- I used this 'repeating' show as an example where 'originalAirDate' and 'startTime' differ; tells me that there were conflicts on available tuners for the first showing
The Blacklist - s04e20 - The Debt Collector 2017-05-11_2200 WNBCDT 2017-05-11
- a 'normal' series episode looks like this, BUT...
The Blacklist - s04e14 - The Architect 2017-02-18_1935 WNBCDT 2017-02-16
- if you transfer the show to another TiVo unit, 'startTime' changes to 'transferTime' 
.
*Series 'Special':*
Street Outlaws The Beginning -- King of the Streets 2017-05-25_2159 TDCHD-E 2017-05-25
- without 'SeriesEpNumber', you get the two hyphens together
.
*Movie:*
Bobby - 2006 2017-01-13_1854 SHOHD-E 2017-01-02
- kmttg recognized this as a movie, not a special in a series, thus no two hyphens; also, it's been showing for almost two weeks
which I'm very pleased with.

Thanks *Kelson*!


----------



## jcliff (May 24, 2017)

Great suggestion. I've copied that layout.

However, I use TinyMediaManager to rename files and grab a bit of extra info for my files after I plop them in my Movies or TV directories:

tinyMediaManager

It works great for Plex and Kodi. Poster art, episode and banner art when available, NFO files, it can search for subtitles and trailers. Good stuff. Your naming scheme does make it more likely to get a match from the scraper on the first try though.


----------



## diskus (Sep 22, 2004)

jcliff said:


> Great suggestion. I've copied that layout.
> 
> However, I use TinyMediaManager to rename files and grab a bit of extra info for my files after I plop them in my Movies or TV directories:
> 
> ...


Can it be used to rename .tivo files?


----------



## jcliff (May 24, 2017)

You know, I've never tried that. But there's a setting where you tell TMM what file types to look for. I can't think of a compelling reason that wouldn't work if you added .tivo to the list.









I did a test with a Tivo file (after adding .tivo to Video filetypes), and it worked perfectly.










Just out of curiosity, why .tivo files and not the decrypted mpg?


----------



## diskus (Sep 22, 2004)

jcliff said:


> You know, I've never tried that. But there's a setting where you tell TMM what file types to look for. I can't think of a compelling reason that wouldn't work if you added .tivo to the list.
> 
> View attachment 29251
> 
> ...


Im trying to sort them by episode in order to use them with PyTivo in an order that makes sense when displayed


----------



## diskus (Sep 22, 2004)

jcliff said:


> You know, I've never tried that. But there's a setting where you tell TMM what file types to look for. I can't think of a compelling reason that wouldn't work if you added .tivo to the list.
> 
> View attachment 29251
> 
> ...


I have been playing around with it and the rename function worked like a charm!!

Just curious, what do you guy use the xml files generated by the export function for?


----------



## aaronwt (Jan 31, 2002)

I ended up using this for my recordings

[mainTitle][/] [mainTitle] -[" " movieYear "][" " SeriesEpNumber " "]["- " episodeTitle] [originalAirDate] ([monthNum]_[mday]_[year])

That way it seems to put it in it's own folder. And I get the date that the recording was made.

Which results in for instance a folder called "Blindspot"
And then an episode is named " Blindspot - s03e05 - This Profound Legacy 2017-12-01 (12_01_2017)"

I've only been messing around with it for the last ten minutes. Hopefully it will work fine with Plex. I never messed with the naming in kmttg before. But I see that sometimes Plex needs specific info to show the episodes properly.


----------



## eherberg (Feb 17, 2011)

Plex only cares about the items up to the SxxExx name (which should match the TVDB). Everything after that is just for your benefit. Plex doesn't care about anything after the 2nd dash. So 'Blindspot - s03e05' is the only thing necessary for Plex.


----------



## aaronwt (Jan 31, 2002)

eherberg said:


> Plex only cares about the items up to the SxxExx name (which should match the TVDB). Everything after that is just for your benefit. Plex doesn't care about anything after the 2nd dash. So 'Blindspot - s03e05' is the only thing necessary for Plex.


Yes. I tailored the info after the episode number for what I prefer to look at when viewing the files


----------



## RVH (Dec 19, 2006)

I'm just learning KMTTG so can you please tell me where you make this setting? I've looked and can't find it.

[mainTitle] -[" " movieYear "][" " SeriesEpNumber " "]["- " episodeTitle] [startTime] [channel] [originalAirDate]

Also, here are my options and Plex doesn't seem to recognize these MPG files (although they are real and I can play them on my PC)


----------



## reneg (Jun 19, 2002)

RVH said:


> I'm just learning KMTTG so can you please tell me where you make this setting? I've looked and can't find it.
> 
> [mainTitle] -[" " movieYear "][" " SeriesEpNumber " "]["- " episodeTitle] [startTime] [channel] [originalAirDate]
> 
> Also, here are my options and Plex doesn't seem to recognize these MPG files (although they are real and I can play them on my PC)


In kmttg, File->Configure under the File Settings tab, File Naming field. Here is what I use and it works fine under Plex for both Movies & TV Series:
[mainTitle][".S" season]["E" episode]["-" episodeTitle ][" (" movieYear ")"]


----------



## RVH (Dec 19, 2006)

reneg said:


> In kmttg, File->Configure under the File Settings tab, File Naming field. Here is what I use and it works fine under Plex for both Movies & TV Series:
> [mainTitle][".S" season]["E" episode]["-" episodeTitle ][" (" movieYear ")"]


Got it, thanks. I was looking in the Auto Transfer configuration


----------



## windracer (Jan 3, 2003)

Instead of using the _[".S" season]["E" episode]_ syntax you can just use _[SeriesEpNumber]_ (see here).


----------

