Filename processors

sstteevvee

02-11-2008 23:39:47

The "Filename processors" (which I need to think of a better name for), are for taking a filename, e.g. "Mythbusters - 3x02 - Mythbusters Revealed.avi", and extracting the season (3) and episode (2) from it.

It uses regular expressions, in particular the variety used for .NET. They are similar to what *nix, Perl, etc. use, so its not too hard to adapt if you have some prior experience.

For reference, start here: Regular Expression Language Elements, for .NET 2.0, and regex cheatsheet.

The basic idea is to make a regular expression (RE) with two named groups ("s" and "e"). Those two groups capture the digits of the season and episode numbers, respectively.

Simple example, if we wanted to process the filename "Mythbusters - 3x02 - Mythbusters Revealed.avi", we could write something like

(?<s>[0-9]+)x(?<e>[0-9]+)
Brackets define a grouping, ?<s> names that group "s", and the group will match one or more digits. Thats then separated from the episode digits (also a named group), by an "x". You can start putting a few extra qualifications so that the thing has a non-letter (or start of line) before the first number:

(^|[^a-z])(?<s>[0-9]+)x(?<e>[0-9]+)
..and is followed by a non-letter as well:

(^|[^a-z])(?<s>[0-9]+)x(?<e>[0-9]+)[^a-z]
You can test your RE by going into the Filename processor dialog, clicking "Add" to add a new RE, and typing it in. Deselect "Test All" to just test the selected RE, choose a folder to test it on, and see if works correctly. Choosing a show name will automatically trim the show name from the filename before processing it. This is helpful if the show name has numbers in it.

Having "Test All" turned on will process that folder as TVRename normally would (e.g. Finding&Organising, or Renaming check), using all the rules. If two or more RE's match, then the one starting leftmost "wins".

Turning on the "Use Full Path" option will match the full path to the file against the RE, e.g. "c:\media\mythbusters\season 3\3x02 - Mythbusters Revealed.avi". This is useful if you need to get the season number from the next folder up.

The "Notes" is a place you can optionally put notes for your convenience, so you can remember what that RE is doing.

Post any questions here, and I'm happy to help. If there is sufficient demand for getting RE's made for your own filenames, then I'll make a separate forum for them.

Here's a summary of the posts so far (1 Jun 2009).
[table][tr][th]Filename[/th][th]Regular Expression[/th][th]Notes[/th][/tr][tr][td]Mythbusters - 3x02 - Mythbusters Revealed.avi[/td][td](^|[^a-z])(?<s>[0-9]+)x(?<e>[0-9]+)[^a-z][/td][td][/td][/tr][tr][td]Survivors.2008.S01E05.720p.HDTV.x264-BiA[/td][td](^|[^a-z])s?(?<s>[0-9]+)[ex](?<e>[0-9]{2,})[^a-z][/td][td]won't interpret numbers like "323" as "season 3, episode 23" or "2008" as "season 20, episode 8".[/td][/tr][tr][td]Will And Grace S02--E08 - Terms Of Employment.avi[/td][td](^|[^a-z])s(?<s>[0-9]+)--e(?<e>[0-9]{2,})[^a-z][/td][td][/td][/tr][tr][td]cshtr.com-BattleStar.Galactica-S01.E01.avi[/td][td](^|[^a-z])s(?<s>[0-9]+).e(?<e>[0-9]{2,})[^a-z][/td][td][/td][/tr][tr][td]30 Rock\Season 1 - Complete\1.01 Pilot.mkv[/td][td]^(?<s>[0-9]+) (?<e>[0-9]{2,})[/td][td][/td][/tr][tr][td]Season 3\Episode 12.avi[/td][td]season (?<s>[0-9]+)\\episode (?<e>[0-9]{1,3})[/td][td]Turn "Use full path" on[/td][/tr][tr][td]\Videos\Podcasts\Diggnation\Season 1\diggnation--0194--SXSW2009--large.h264[/td][td]season (?<s>[0-9]+)\episode (?<e>[0-9]{1,3})[/td][td]Changes length of the episode number from the default maximum of 2 digits to 3[/td][/tr][tr][td]24\S1\[01] 12.00 am 01.00 am.avi[/td][td]S(?<s>[0-9]+)\\\[(?<e>[0-9]{2,})\][/td][td]Turn on "Use Full Path"[/td][/tr][tr][td]Showname\Season\Farscape - 1.11 - Till the Blood Runs Clear.avi[/td][td](^|[^a-z])s?(?<s>[0-9]+) (?<e>[0-9]{2,})[^a-z][/td][td][/td][/tr][tr][td]House MD/House MD Season 3/House MD - 1 - Meaning[/td][td]season (?<s>[0-9]+)\\.* - (?<e>[0-9]{1,3}) -[/td][td]Turn on "Use Full Path"[/td][/tr][tr][td]XYZ-showname101.avi[/td][td](?<s>[0-9])(?<e>[0-9]{2,})[/td][td]Much less fussy about spaces before the number, will pick up years as season/episode numbers, too.[/td][/tr][/table]

Hitcher

21-12-2008 01:27:21

Here's one that doesn't get picked up by the processor because it's got the year in it (2008).

Survivors.2008.S01E05.720p.HDTV.x264-BiA

I don't understand regular expressions so I've no idea how to get it to skip/ignore the year in the name.

sstteevvee

21-12-2008 11:38:35

The year should be being removed by tv rename before it is looked at by the filename processor. Sounds like that's not working, so as a workaround you can alter the filename processor that's causing problems.

If you change the first one from:

(^|[^a-z])s?(?<s>[0-9]+)[ex]?(?<e>[0-9]{2,})[^a-z]
and remove the question mark after the [ex], to make it:

(^|[^a-z])s?(?<s>[0-9]+)[ex](?<e>[0-9]{2,})[^a-z]
It won't interpret numbers like "323" as "season 3, episode 23" or "2008" as "season 20, episode 8".

In the meantime I'll have a look into why the 2008 is confusing it.

Hitcher

22-12-2008 00:23:46

Worked at treat, many thanks.

sstteevvee

22-12-2008 19:31:28

The "2008" bug should be fixed in the latest version.

hameed

23-12-2008 09:51:01

I have absolutely no idea how to handle there regexp "thingys" :) So I would appreciate your help

I have files named like this..."Will And Grace S02--E08 - Terms Of Employment.avi" (yes it's will and grace...Do NOT laugh :P)

Do your magic please :)

hameed

23-12-2008 10:06:40

Your program is gonna kill me! I have to wake up to go to work in a few hours and I can't stop messing with this!

Ok another one for you...
"cshtr.com-BattleStar.Galactica-S01.E01.avi"

sstteevvee

23-12-2008 11:19:18

For "Will And Grace S02--E08 - Terms Of Employment.avi":


(^|[^a-z])s(?<s>[0-9]+)--e(?<e>[0-9]{2,})[^a-z]

and, for "cshtr.com-BattleStar.Galactica-S01.E01.avi":


(^|[^a-z])s(?<s>[0-9]+).e(?<e>[0-9]{2,})[^a-z]

Add those on Options->Filename Processors, leaving "Use full path" turned off.

hameed

23-12-2008 19:41:59

Many thanks....I will try them as soon as I get back home :)

billybuds

24-12-2008 05:09:01

On for you here sstteevvee......

'Lost/Series 1/Episode 5'


Thanks

hameed

24-12-2008 08:07:59

Both worked perfectly!
Seems you do know what you are talking about :)

pirivan

12-01-2009 17:18:56

So, long story short I am trying to use TVRename to do two things.

1) Check files I currently have against thetvdb.com to see if I have anything that is named improperly
2) Check for new files that are in my download area, rename them to fit my scheme using information from thetvdb.com and then move them to the appropriate area

Initially I simply wanted to use it as a batch renamer for files from the download area to match them against thetvdb.com so I wouldn't have to keep renaming everything manually (like flash renamer or something) but I couldn't figure out how to really leverage it to do that; it seems like you need to really point it to everything you currently have. Unfortunately, it doesn't seem to be working correctly. I was able to get the filename template editor to rename a recently downloaded test file without any issues to my scheme using the following template: {Season}.{Episode} {EpisodeName}. I have no idea what logic it used to parse this information to properly rename it but it did work! However, I don't believe the application is setup to properly parse my current scheme for my regular files using the File Name Processor and I don't understand reg-ex expressions well enough to adjust it. An example filename from my scheme would be:

30 Rock\Season 1 - Complete\1.01 Pilot.mkv etc.

"Specials" are in "Season 0" and if a season is incomplete the file structure looks like:

30 Rock\Season 1 - Incomplete\1.01 Pilot.mkv

I assume that once I have the the correct regex expression in the File Name Processor when I press "check" under renaming it will scan my files properly and tell me what is matched against thetvdb and what is not? Then, I would just simply have to add my downloads directory to the "Finding and Organising" area and it would parse files it finds in there (with whatever naming scheme they have), rename them to my scheme and move them?

To get this to work properly, do I need to add each individual show directory into the folder monitor? Currently I just have the parent directories there, ie D:\Anime\<Series Name> D:\American Cartons\<Series Name> D:\Live Action\<Series Name> . Would it be better if I just added each show name directory individually here?

If I need to add any additional details please let me know; I would appreciate the assistance! If this isn't all possible or workable I can always go back to manually renaming! :)

sstteevvee

12-01-2009 19:11:42

TVRename can definitely do the two things you want to do. Renaming files, and moving them to where they're supposed to do are its main functions. Batch operation is a feature coming fairly soon (1-2 months away), so you can run it in the background from the command line.

However, I don't believe the application is setup to properly parse my current scheme for my regular files using the File Name Processor[...]30 Rock\Season 1 - Complete\1.01 Pilot.mkv etc.

Yep, you're right. The default processors won't work on your scheme. If you add a new filename processor, leave "full path" off and make it:

^(?<s>[0-9]+) (?<e>[0-9]{2,})
Note that there is a single space at the end that phpBB isn't showing. That'll pick up anything starting with a number (the season), a dot, and then two or more digits being the episode number, followed by a space. Just for added confusion, dots are internally changed into spaces, so that's why there's a space in the middle there.

I assume that once I have the the correct regex expression in the File Name Processor when I press "check" under renaming it will scan my files properly and tell me what is matched against thetvdb and what is not?

The renaming check will operate on files that are there, and show only the ones that don't match. You can also check for for missing episodes by going to the "Missing" tab, and clicking "check" there. (This is assuming they're all set up in "My Shows".) You can then also see what's coming up soon on the "When to Watch" tab.

I would just simply have to add my downloads directory to the "Finding and Organising" area and it would parse files it finds in there (with whatever naming scheme they have), rename them to my scheme and move them?
Yep, exactly right. For it to pick it up, it needs to find the show name in the filename, and be able to figure out the season+episode number from the filename (i.e. those filename processor regexps, again).

To get this to work properly, do I need to add each individual show directory into the folder monitor
Just add the root of your media folder (e.g. "D:\") to the folder monitor tab, and it'll recursively search and guess at what your shows are. Successfully added shows will then appear on the "My Shows" tab. With a bit of luck, Folder Monitor will get them all, or most of them at least, and you can fix up the last few in the lower part of the Folder Monitor window, or add them manually later.

The Folder Monitor is smart enough to not show shows already in "My Shows", so you can run it once, get the easy ones done, and run it again and sort out the rest.

See how you go after that advice. If you still have any questions, feel free to post in the newly created Help forum.

pirivan

13-01-2009 16:50:56

Hi Sstteevvee,

Thanks A LOT for your answers; very helpful. I've done some more work with TV Rename and it's getting closer. However, I am still having some issues with the filename processor. I input the regex expression you gave me (thanks) but it doesn't work exactly as intended. I tried 'helping' the Folder Monitor find the proper version of every show in the TVDB (which seems to have worked) but finding missing episodes still thinks ever episode of all seasons are missing and the renaming finds nothing. I also manually added all my shows to "my shows" to no avail. I believe it is still not working as the regex expression doesn't seem to be quite working as, as noted below.

Currently in my folder monitor I have the folders q:\tv shows\american cartoons q:\tv shows\anime and r:\tv shows\live action . Within these folders the seasons and files are stipulated as below (some seasons are - Incomplete), an example:

r:\tv shows\live action\30 Rock\Season 1 - Complete\1.01 Pilot.mkv

So, currently with the regex expression ^(?<s>[0-9]+) (?<e>[0-9]{2,}) , based on my tests, it will ONLY correctly find the files if I add (from the above example) the Season 1 - Complete directory to the File Watcher directly. Meaning, this regex expression DOES seem to work but I would have to add the directory of every single season of every single show to the file watcher to get it to do so. I added r:\tv shows\live action\30 Rock\Season 1 - Complete to the file watcher and then when I ran the missing check it did not list Season 1 as missing (though it did list everything else in my collection of course as missing). Does this make sense?

Thanks for your help so far, I really appreciate it; great application!

sstteevvee

13-01-2009 23:08:47

I didn't realise/remember yesterday... The Folder Monitor is fairly fussy, and will only pick up folder-per-season if the folder name is "Season <number>", without anything else. The "- incomplete" bit will be making it not find them. The "Folder Monitor" is also used only for automating getting the shows entered into "My Shows", rather than manually adding them all. Once you've got them set up in "My Shows", you can ignore the "Folder Monitor" tab.

Since you have "unusual" folder names, you'll have to manually add the shows to "My Shows", and also manually add both of the folders (complete, and incomplete) in the bottom part of the dialog when editing the show, for each season of the show you have. To get the Folder Monitor to do this auatomatically, you'd have to remove the "- incomplete" part on your folder names, and call each season just "Season 2", etc. TVRename will then help you keep track of what is missing/incomplete, though the "Missing Check". Though, you may have a reason for naming them that way, and can't change them.

Once you have the shows and folders defined in My Shows, you can confirm that the Renaming check is looking in the right place by going to Help->Bug Report. Turn on just the "Folder Scan" checkbox at the bottom, and hit "Create". Once it's done, have a look through the output on the right and see what folders it is looking in for each season of each show. You can also see if the regex is correctly pulling out the season+episode numbers, e.g.:


72023 : Deadwood : S1
Folder: s:\media2\Deadwood\Season 1
s:\media2\Deadwood\Season 1\Deadwood - S01E02 - Deep Water.avi (OK 1,2 Y)
s:\media2\Deadwood\Season 1\Deadwood - S01E01 - Pilot.avi (OK 1,1 Y)
s:\media2\Deadwood\Season 1\Deadwood - S01E04 - Here Was a Man.avi (OK 1,4 Y)
[...]

If you're still having trouble getting it to work, go to the Bug Report, turn on "settings files" and "folder scan", and email a copy of the output to tvrename [at] tvrename.com (or PM it to me here). I can then see how you've got it set up, and see where in the process it is going wrong.

pirivan

14-01-2009 11:13:36

Hi Sstteevvee,

Thanks again for the assistance. So, based on your information I decided to simply remove the - Complete and - Incomplete flags on my Season 1 etc folders (I have a 'storage' directory that I can use if I want to throw Incomplete seasons into). However, I could only get it all to work by manually adding the seasons into the shows I had MANUALLY added to My Shows or by setting the root directory for the show. I determined that this was occurring as I had manually created shows in 'My Shows'. I deleted everything manually that I had setup in 'My Shows', deleted everything currently in Folder Monitor, added the root directories on both drives (Q:\TV Shows and R:\TV Shows) had it check again, manually associated any that it couldn't match to thetvdb and pressed "add this". It added everything perfectly and now the Missing and Renaming functions work properly.

However, the Finding and Organising tab doesn't seem to work how I think it is supposed to be. Whenever I try to force it to do a check on my downloads folder it doesn't seem to find anything. Is this only because the files are in a naming scheme it doesn't recognize? Or should I add the downloads folder to the folder monitor? Also, does it allow you to over write files that it moves using Finding and Organising that it determines are the same (ie you want to replace what you have currently with higher quality versions)? Does it still allow you to 'overwrite' the old files even if they aren't the "same" filenames (ie the old are the same name with .avi and the new are .mkv)? Or do you need to go in and manually delete the old files afterwards? I thought I should ask before I tested it and over-wrote the wrong files!

Again, many thanks for your help thus far.

sstteevvee

14-01-2009 11:49:59

Good to hear you got missing and renaming to work.

For Finding and Organising, you need to do a "missing check" first, as that's what it tries to find.

You don't need to add your download folder to the "folder monitor" tab - that's only for setting up new shows.

You should have your download folder entered on the Finding and Organising (F&O) tab, and then when you tell it to go, it should search through it recursively looking for things found as missing.

For F&O to find a missing show, a few things have to happen:
- It has to be on the "missing list", as a result of doing a missing check
- The filename has to have one of the "video" extensions, as set in the preferences dialog
- It has to find the show name in the filename
- It has to find the season and episode, using the filename processor regexps

TVRename often has trouble if the show name is just a number (e.g. "24"), has a year in it ("Knight Rider 2008"), which can either be got around by me fixing a bug in the code, or tweaking the regexps.

Can you give me a specific example of the filename of a file it isn't finding in your download directory?

If you go to Options->Filename Processors, put in your download directory there, you'll see if it is able to find the season and episode numbers in the files. If not, I'll help you sort out the regexps so it does.

F&O won't over-write anything, because if a file is there, then it isn't missing, so if it isn't missing it won't be looked for in F&O, so then when F&O does it's renaming/moving/copying, it won't overwrite it. If you have a lower quality file in your collection, you'll have to manually delete it, then do missing and F&O checks. Different extensions (e.g. avi and mkv) won't affect this, either.

I should stop procrastinating and get back to work :)

pirivan

14-01-2009 17:12:04

I understand your sentiments about work, my previous post was made during a dragging segment of the second day of a 16 hour Virtualization class. In any case, currently I got the renaming to work properly and renamed everything (except a few shows whose renaming issues I need to study). The next task is to run a full missing test and determine if I want to ignore the results or not. For the most part, based on running it for the first 4-5 results it's mostly just coming up with all my missing 'specials' seasons (I only have specials episodes for a few shows). In any case, I fully assume that once this has run Finding and Organizing should be set to parse my downloads directories properly. However, at this point I can't yet give an example of a file it can't parse based on what you explained to me for two reasons. 1) I haven't yet run the "missing" check fully and 2) The particular file I had in mind is a episodeI already have, the new one is simply higher quality. Based on the filename dexter.s01e04.720p.bluray.x264-orpheus.mkv and what you outlined above, I believe the regex expressions will be able to rename it properly and move it to the correct location as long as I delete the episodes I currently have from Season 1.

So, this all brings me to my next query. So, is there any way to accomplish the following two tasks with TV Rename:

1. Rename a set of files by parsing them with the regex expressions, matching them to the TV DB and then applying my naming scheme to files that I already have and are thus not missing? I understand I can't do with this F&O but is there another way to leverage TV Rename to do this? Basically so I can batch rename files quickly "outside" of adding it to the TV Rename library/database thus saving me from having to manually doing this by copying and pasting from thetvdb if I want to manipulate files before adding it into TV Rename.

2. What would be best practice/easiest methodology for adding a completely new show with files that aren't formatted in my naming scheme? Using the file dexter.s01e04.720p.bluray.x264-orpheus.mkv as an example (and assuming that I don't already have ANY episodes of the show Dexter), would the only way to do this be to create a new directory in R:\TV Shows\Live Action\Dexter\Season 1 and then place the file in it? Then, Folder Monitor would pick it up (r:\tv shows is in folder monitor) when I run 'Check' and then it would be added to "My Shows" after pressing "add this". At which point it would be "in" the 'library' and I could run the 'Rename' tool to have it parse it and format it to 1.04 The Popping Cherry.mkv. It feels like there is an easier way to do this, but maybe I am mistaken? It is my understanding that F&O can't be leveraged for this as it only works for episodes that are currently "missing"

I'd like to promise that these are my last few questions but you just keep being so helpful and actually answering that I find it hard not to ask! :D

x5nder

14-01-2009 21:38:40

Can you make a filename processor that handles the Moonsong releases? I've tried toying with expressions, but it really isn't my cup of tea...

Moonsong names their files like this:
Superjail! 01 Superbar (ws) [Moonsong].avi
Moral Orel 21 Praying [Moonsong].avi

Thanks.

sstteevvee

14-01-2009 22:33:45

Superjail! 01 Superbar (ws) [Moonsong].avi
Moral Orel 21 Praying [Moonsong].avi


If that number is always the the overall episode number, rather than the episode in the current season (which it appears to be for Moral Orel), you can edit the show in My Shows, turn on "Use sequential number matching", and cross your fingers that it works ;) This is limited to picking up missing episodes though, when doing Finding and Organising. It won't rename shows already in their folders.

So, if Season 2 Episode 11 is missing, F&O will pick up on "Moral Orel 21", and move/copy it to "S02E11 - Moral Orel - Praying". You'll have to move them to a temporary folder that F&O looks in, and move all the files into that. Do a missing check, which will say everything is missing, then do a Find and Organise, which should then put them in the right place.

Vhero

22-01-2009 22:21:24

wonder if you can help with mine I'm loving the program but for over a year I have been manually renaming Episode 01 thanks to streaming through Tvsersity renaming it like that was the easiest way to organise. What would be the processor for it as existing ones don't work.. Is there a way to use the renamer to use the folders to define which season is which?? as i have each season in seperate folders..

sstteevvee

22-01-2009 22:44:51

I you have something like "Season 3\Episode 12", make a new filename processor, turn on "use full path", and enter:


season (?<s>[0-9]+)\\episode (?<e>[0-9]{1,3})

If you always have the episode number followed by a space, or space-dash, then you can add that to the end of the above (it makes it a bit more robust). It should also work for two digit season numbers, or numbers with a leading zero.

You can test it from within the window for entering the filename processors, by entering in one of your folders and seeing if it gets it right.

Vhero

22-01-2009 22:57:38

I you have something like "Season 3\Episode 12", make a new filename processor, turn on "use full path", and enter:


season (?<s>[0-9]+)\\episode (?<e>[0-9]{1,3})

If you always have the episode number followed by a space, or space-dash, then you can add that to the end of the above (it makes it a bit more robust). It should also work for two digit season numbers, or numbers with a leading zero.

You can test it from within the window for entering the filename processors, by entering in one of your folders and seeing if it gets it right.

dude that worked perfect thanks!

Vhero

22-01-2009 23:28:03

just a point here your default "filename template editors" allow to change to {Episode}[-{Episode2}] - {EpisodeName} but there is no filename processor for it. So I cannot change back if I ever change my mind... what would be the processor? sorry to keep bothering you.. for example my episodes now named 01 - Do I Know You

sstteevvee

22-01-2009 23:39:14

I was about to put a big speech about how it work, but then I noticed why it won't. :) Changing the last processor to this should fix it:


season (?<s>[0-9]+)\\e?(?<e>[0-9]{1,3}) ?-

...adding a question mark just before the dash at the end. I'll change the defaults in the code, too, so future new installs have this already done.

Edit: ... the default processor should work for your example if it is in a folder called "season 1" or similar, so the last default filename processor can grab the season number from thh folder, and the episode number from the start of the filename. My fix above helps with multiple episodes in one file.

hameed

23-01-2009 00:57:59

Just a suggestion, can you add all the "processors" mentioned in this thread to the program along with their explanation?
If they become too many or conflict with each other you can make them disabled by default.

sstteevvee

23-01-2009 10:09:42

Not a bad idea - I'll do that. I'll have to disable some of them though, as the more processors you have, the more likely for 'false alarms' and things going wrong.

Archigos

09-03-2009 16:25:37

Hey,
First off, great program, I recently switched to it after using a bunch of alternatives that did 'ok' but either missed a lot of stuff or crashed too often. I think my main reason for sticking with this app though is that it lets me know which episodes I'm missing.

Now, speaking of missing episodes, I've found that my multi-episodes aren't detected correctly but the normal ones appear to be fine. The strangest thing with the multi's is that some detect the first episode and some detect the second, but never both. I have all my shows setup in the same fashion as below.

V:\TV Shows\{Show Name}\Season ##\{Show Name} - S##E$$ - {Episode Title} (?).Ext
V:\TV Shows\{Show Name}\Season ##\{Show Name} - S##E$$xE^^ - {Episode Title} (?).Ext
## = 2 digit Season number
$$ = 2 digit Episode number
^^ = 2 digit of secondary episode if needed
(?) = Part number if needed, like Part 1 is (1), etc.
Ext = is just the standard file extension
The {xE^^} and {(?)} parts should be optional if possible.
Example of a multipart I'm having trouble with:
V:\TV Shows\Sanctuary\Season 01\Sanctuary - S01E01xE02 - Santuary for All.avi

I've been screwing with the RegEx for hours and can never get it to find both parts, so if someone would be kind enough to give me a RegEx that would work for both forms (single and multi's) it'd be greatly appreciated as I'll have to most likely reinstall the program if I don't get it resolved. I got mad and accidently deleted all the RegEx profiles in the Filename Processors window :(

sstteevvee

09-03-2009 22:45:56

The default regexes should be ok for what you've got. To have multiple episodes detected correctly, you need to make "rules" associated with the appropriate season of the show, to tell TVRename to expect combined episodes. It doesn't automatically detect them.

Go to "My Shows", expand the tree for the show in question, click on the season, then "Edit". If you want to make a double episode, make a new rule, of the type "Merge", and put the start and end episode numbers in.

e.g. If you have: "My Show - S03E05-E06 Blah blah.avi", make a merge rule on season three, for episodes 5 to 6. As you add/move the rules, you'll see the preview below show what you'll end up with. The episode guide will also change to reflect any merged, deleted, etc. episodes.

The actual detection of multiple episodes on disk, from the filenames, actually just looks for the first episode number, and assumes that the rest is ok. For example, if you have the rule as above, "S03E05.avi" will be assumed to be "S03E05-E06".

You can then to get it to name them in your preferred style (S03E05x06), by setting up the "filename template" from the options menu. If you select a season you've added merged episodes to in "My Shows" before opening the template editor, the previews it shows will be for that particular season.

See if that helps with the problems you're having. If not, post back here and I'll suggest some other things to try.

Archigos

10-03-2009 05:16:38

Sorry for the delay in response. Thanks, it seems to have worked great, I went to each show that had a multi and did the merge you mentioned and it appeared correctly in the box below the merge options so I assume it worked fine, I haven't had a chance to test the missing episodes part again since I've been busy packing (I'm going on vacation to Las Vegas for a week and I leave tomorrow).

Would there be any way that this could be auto-detected in a future release? If not, I've been looking at splitting the episodes anyway, just haven't found software to do it that I like yet. Any suggestions?

sstteevvee

10-03-2009 15:03:16

If you do a renaming check, it'll find the double episode it has probably renamed to a single number, and re-rename it back to what it should be.

One idea for automatically detecting merged episodes is based on their airdate. If they aired on the same day, TVRename could automatically/ask to create a merge rule. Some shows would have to have a "never merge" option, though. For example, Scrubs airs two episodes on one day, and they usually appear on torrent sites as two separate episodes.

For manipulating video files, I like VirtualDub. If you put it in "Stream Copy" mode, it should be quick as it won't do any reencoding. You'd mark the start and end of the first, process it out to a new file, then mark the start and end of the second segment, and process that out to a second file. It is a fairly heavy-handed tool to just split the files, though :)

Archigos

10-03-2009 20:39:56

Thanks again for the help. For now I use Natbur's TVRenamer to autoname the files according to TheTVDB and place them in my main tv folder, I just check the episodes as they enter the monitored folder in case it's a multi so I can manually rename the end result and add the -E^^ for the second episode. So none of my episodes were screwed up by your program, it just wasn't detecting them (until I did your suggestions in the earlier post).

It's been a LONG time since I used VirtualDub, so I'll check into that when I get back from Vacation. My main goal is to find a way to fully automate my entire process (which looks like your program will help me greatly once I figure out the best way to configure it).

If you don't mind I've attempted to describe my current setup below if you think you'd be able to clue me in on what I seem to be missing for the full automation. Like I said in the last post my flight leaves in less then 12 hours so you'd have a week to come up with an answer. (I wont be home until like 2am Wed. the 18th) :D If you dont feel like it, that's cool too, just skip my rambling. :lol:

::Setup::
Server (running Windows Home Server) downloading via uTorrent
Finished torrents get dropped into \\SERVER\Users\{UserName}\Torrents\Completed (Normally in multipart Rars)
I manually extract the Rar's (since the Unzip Add-in for WHS screws up Rar's too much) and move the video to the monitored folder for Natburs, which renames them and moves it back to \\SERVER\Videos\TV Shows\{Name Scheme I gave earlier}
Then from a Windows 7 desktop running "Media Companion" set to monitor the network share above to download the screencap and nfo file for the video

I watch the episodes via XBMC on my laptop running Vista Ultimate. (Sometimes via my Xbox 360 as well)

::Links for additional information if needed:: (I assume you already know this crap, but in case some of your readers don't)
Natbur - http://renamer.natbur.com/
WHS - http://www.microsoft.com/windows/produc ... fault.mspx
uTorrent - http://www.utorrent.com/
Media Companion - http://billyad2000.co.uk/
Feel free to remove the links if you don't want them here or delete the entire post if needed, sorry if this is somehow against the rules.

hoogy

24-03-2009 10:24:33

Hi I was wondering what a filename processor for a show that has over 100 shows in a season like revison3 podcasts, e.g. \Videos\Podcasts\Diggnation\Season 1\diggnation--0194--SXSW2009--large.h264

Bry

25-03-2009 20:32:45

Hi, I was wondering if I could get some help with the filename processors as I am a little bit confused.
At the moment it can not picking the show 24 in the format I currently Have it which is

24\S1\[01] 12.00 am 01.00 am.avi

This I would imagine would be the format of
ShowName\Season\[Episode Number] [EpisodeName].avi

But, I am unsure how I would write a expression for this.
At the moment I have come up with
<s>\\season(?(0-9)+)\\[?(?<e>(0-9){1,3}) -
But I dont think that is right, could I get some help please?


Edit:
I also have shows in the following format:
Showname\Season\Farscape - 1.11 - Till the Blood Runs Clear.avi

and
ShowName\S1\[01] EpisodeName.vi
Im really sorry for having to ask but I am completly stuck with these processors

MrEMan

25-03-2009 23:21:41

Hi Bry,

This is not a solution but did you read this topic [url=http://tvrename.com/bb/viewtopic.php?f=3&t=113]http://tvrename.com/bb/viewtopic.php?f=3&t=113

pzam

25-03-2009 23:51:12

to process those that are like 323 i made this filter it seems to work

season (?<s>[0-9]+)\episode (?<e>[0-9]{1,3})
^ i changed the 2 to a 3 from one of the other filters to make it.

Bry

26-03-2009 00:25:59

Hi Bry,

This is not a solution but did you read this topic [url=http://tvrename.com/bb/viewtopic.php?f=3&t=113]http://tvrename.com/bb/viewtopic.php?f=3&t=113


Yea I did that doesn't seem to be the problem. Im pretty sure its the expression I need and I've been playing around with it for over an hour now and am getting nowhere fast lol

sstteevvee

26-04-2009 17:53:30

Sorry for the slow replies, everyone.. phpbb does a good job of not telling me about posts sometimes.

\Videos\Podcasts\Diggnation\Season 1\diggnation--0194--SXSW2009--large.h264
pzam's answer is a good one for this, extending the season to 3 characters for episode number.

24\S1\[01] 12.00 am 01.00 am.avi
Try:

S(?<s>[0-9]+)\\\[(?<e>[0-9]{2,})\] : Turn on the "Use Full Path" checkbox, and dont' forget to enable it.

The show "24" is a problem sometimes, as the show name looks like an episode number, but it should be OK in most cases.


Showname\Season\Farscape - 1.11 - Till the Blood Runs Clear.avi
and
ShowName\S1\[01] EpisodeName.vi

The one above for 24 should work for the second of these. For Farscape:

(^|[^a-z])s?(?<s>[0-9]+) (?<e>[0-9]{2,})[^a-z]

There is a bug/quirk in TVRename that a "." in the filename is replaced with a space before further processing, so the regex needs to look for a space between the season and episode number.

If I've missed anyone else's filename processor questions, please repost them!

tymeteller

11-05-2009 21:30:53

Hey

Enjoying the software so far, and it seems to be the closest thing to what I've been looking for. I've been able to figure most of it out through trial and error, but the filename processor is killing me. The file name I'm trying to get it to recognize is below. It doesn't have to do the full path, I can add the season folders manually if necessary.

House MD/House MD Season 3/House MD - 1 - Meaning

There must be a better way to customize the filename processor. Maybe if there were some kind of key with a list of common variables or something, and we could copy and paste the expressions we need and put them in the order we need. Or even better, a drag&drop or button interface so I can just click "show name, hyphen, episode number, hyphen, title" and it would select the appropriate expressions for me. Then for each option you could have customizable parameters, so for episode number you could have things like "include label <e>" or "number of digits" or "if more than x digits, last x digits are episode number". I don't speak code, so I have no idea if that is way more complicated than it sounds, just wanted to put it out there.

Thanks in advance.
Zack

sstteevvee

11-05-2009 22:03:25

Make a new filename processor, and put in:


season (?<s>[0-9]+)\\.* - (?<e>[0-9]{1,3}) -

Make sure it is enabled, and "Use Full Path" is also checked.

I might be able to put together a "cheat sheet" for building up these filename processors. If I get fed up with people asking how to do them, I may put some time into a dialog/wizard that helps do it - something like what you described.

tymeteller

12-05-2009 01:30:35

Awesome, worked perfectly.

I just spent a few hours trying to learn this regex stuff, not with much success, but I did find a cheat sheet: http://opencompany.org/download/regex-cheatsheet.pdf.

A few random questions when you have some time: what does the .* do in this case? Is it just matching anything before the hyphen (and why doesn't it need to be in parenthesis)? Are the question marks to match recursive patterns to make sure the results are unique? And are spaces interpreted literally?


Thanks for the help!
Zack

Pr.Sinister

12-05-2009 07:45:45

Hi,

Amazing program! I rename stuff with a script that looked up EpGuides but was always looking for something that looked up TheTVDb since i use XBMC.

I must say, the features are a life saver. Especially the move from my downloads folder to the proper TV show folder while renaming at the same time.

THANK YOU SO MUCH FOR THIS PROGRAM! :)

Now for my question...

What regex should i use for the program to correctly recognize double episodes without me having to merge them manually?

My shows are like this :

P:\TV Shows\Scrubs\Season 6\6x21-22 - My Rabbit (1) - My Point Of No Return (2).avi

Also is there a way to make the show rename not case sensitive?

For example, if the above show had a lowercase O in "of No Return", it wants to rename it to "Of No Return" because that is what it is now on TheTVDb.

Thanks in advance!

sstteevvee

13-05-2009 23:12:05

That's a good cheatsheet. The "." will match any character, and the "*" means "zero or more of the thing just before", so ".*" means "any number of characters, including none at all". Yes, the spaces are matched literally. The slight exception to this is that in TVRename, before processing the filename, any dots are turned into spaces, so it will 'match' a dot in the original filename (though technically it is matching a space, because the dot became a space).

Parenthesis "( )" do grouping, so that whatever is matched in them can be referred to/used elsewhere. The "?<e>" and "?<s>" name the groups (also called "captures"). If the regex match is successful, my code asks for the "e" and "s" groups for the episode and season numbers.

"[0-9} will match any single character between '0' and '9'. The "+" after makes the thing immediately before repeat one or more times, so "one or more digits". The "{1,3}" means it can repeat between 1 and 3 times, so "anywhere from 1 to 3 digits".

Thus: "season (?<s>[0-9]+)\\.* - (?<e>[0-9]{1,3}) -" in English is "match the word 'season' with a space after it, then one or more digits. Those digits are saved in a group called 's'. After that is a backslash, then any number of characters, space dash space, another group we'll call 'e' which has one to three digits, then another space dash space." Because the regex doesn't specify where the start of the line "^" or end of the line "$" are, that string can match in the middle of any other longer string (i.e. full path and filename).

The backslash is doubled in the regex string, because it is usually followed by a letter to indicate something with a 'special' meaning.

If you want a few more examples, have a look at this thread.

sstteevvee

13-05-2009 23:18:33

Pleased to hear that TVRename is working well for you. :)

At the moment, you have to always manually specify double episodes. I've got a few ideas (and its been asked for a few times) to make it automatically pick them up, doing things like looking for episodes with the same air-date.

There's no option to make it case insensitive at the moment. If there is an episode that really bugs you, you could manually make a "Rename" rule that sets the name. You could also edit it on thetvdb - most of the episodes seem to have "of" in lower case. You could look/ask on their forums if they have a preferred style, or if someone else keeps changing it back.

Also in my "to do" list is custom replacements for things in filenames (not just illegal characters). That'd let you make it always have "of" in lower case.

Edit: Once the double episode rule is set up, it finds the double episode by just looking for the first episode number, and assuming that the second is there too.

stewood

14-05-2009 06:00:55

I have run across some files that I can't seam to make a REGEX expression for. They are in the format.

XYZ-showname101.avi

not having anytype of delimiter between the show and the eppy info my problem.

Are there any REGEX experts out there that can give me some pointers in writing a rule that will be able to identify this type of file?

-Stewood

stewood

20-05-2009 02:48:55

Friendly Bump :D

I have been reading everything I can on REGEX but I can't seam to make this work.

-Stewood

sstteevvee

23-05-2009 15:32:32

Try this:


(?<s>[0-9])(?<e>[0-9]{2,})

..it will interpret the first three (or longer) digit number it sees as a single digit season, and episode number.

futaihikage

15-06-2009 16:00:09

Hiya! I love your program! It's been working wonders for viewing files on the pc :) I need a bit of help though
I have tv programs sorted like this X:\Series Name\Season XX\Episode XX - Episode Name.ext
(example T:\Night Court\Season 01\Episode 01 - Days Night out.avi )

i've tried the following (I've tried it with full path checked and unchecked)
season (?<s>[0-9]+)\\episode (?<e>[0-9]{1,3})
But it still doesn't parse the names properly. Any help would be greatly appreciated :)

futaihikage

15-06-2009 23:41:31

hehe, nevermind, I fixed it. I overlooked a post that already explained my problem.

Chimpola

26-07-2009 00:49:08

I've got an annoying one which is bugging me, i recently added 24, on my drive stored as

t:\Series\24\Season 1\01 - Day 1 time etc.
t:\Series\24\Season 1\02 - Day 1 time etc.
..
t:\series\24\season 1\24 - Day 1 time etc...

For filename processors i have

season (?<s>[0-9]+)\\(?<e>[0-9]{1,3}) -

This works for everything else perfectly the way i store episodes, except for episode 24 of any season of 24. It picks up everything up until episode 24, and nothing i do will make it find episode 24 (confusing ?). Its like its finding the series name, then ignoring anything else in filename with that same string. Any suggestions?

Cheers.

Madlax72

22-08-2009 05:33:08

Hi,

Thank you for this really awesome tool!

I have a few hundred or so files that look like this

WAV.The.Expanding.Universe.2of4.The.Sun.And.Other.Stars.Divx5.Mp3.avi

There is no season and the first number before "of" is the episode number. I am not really good with RegExp maybe somebody could help me in matching those.

Thanks!

sstteevvee

22-08-2009 09:53:32

This works for everything else perfectly the way i store episodes, except for episode 24 of any season of 24. It picks up everything up until episode 24, and nothing i do will make it find episode 24 (confusing ?). Its like its finding the series name, then ignoring anything else in filename with that same string. Any suggestions?

The show "24" is my arch-nemesis.

You're right - this is happening because TVRename tries to be smart and remove the show name from the start of the filename before looking for the season and episode numbers in it, in an attempt to avoid picking up numerical show names as season and/or episode numbers.

I think I'll have to add a few more options to TVRename, so you can control/override the tricks it uses, for each show.

You'll have to put up with it until I fix it, name the shows with "24 - " at the start of what you have already, or tell it to ignore all the seasons you've got organised (edit the show in My Shows and put "1 2 3 4 5 6 7" in the Ignore Seasons field).

sstteevvee

22-08-2009 10:22:38


I have a few hundred or so files that look like this

WAV.The.Expanding.Universe.2of4.The.Sun.And.Other.Stars.Divx5.Mp3.avi

There is no season and the first number before "of" is the episode number. I am not really good with RegExp maybe somebody could help me in matching those.


TVRename needs to find both the season and episode number in the file, so either:

(a) use another program to rename the "2of4" to "S01E02", and then TVRename will pick them up. If you can find a program that'll do renaming based on regular expressions, your regex will be something like from "([0-9]+)of([0-9]+)" to "S01E\1".

(b) If these files are in their correct locations in your media library (i.e. not the finding&organising/download folder), and they're in a "Season 1" subfolder for each show (i.e. x:\media library\expanding universe\season 1\expanding universe 2of4.avi), then you can make a filename processor in TVRename, with "Full Path" turned on, of "Season (?<s>[0-9]+)\.*(?<e>[0-9]{1,3}) ?of ?[0-9]+". That'll then get the season number from the folder name, and episode number from the number in the "2of4" bit.

Madlax72

22-08-2009 13:40:28

[quote="sstteevvee"
(a) use another program to rename the "2of4" to "S01E02", and then TVRename will pick them up. If you can find a program that'll do renaming based on regular expressions, your regex will be something like from "([0-9]+)of([0-9]+)" to "S01E\1".


Thank you for your advice! I tried this with Total Commanders renaming tool and it works well!

NoGood

23-08-2009 21:25:41

Try this:


(?<s>[0-9])(?<e>[0-9]{2,})

..it will interpret the first three (or longer) digit number it sees as a single digit season, and episode number.


Can you add this to the standard program? I had quite a few seasons with this layout. Might save someone else the trouble.

temper999

16-09-2009 20:47:13

Somehow I get confused by learning this "Filename Processor" :?
Could someone generate me a processor for the following:
Seriesname - SxxEPxx - Episodename.FileExtension
Or is there a list which I can import so the "Filename Processor" will get all the community versions?

sstteevvee

16-09-2009 23:33:15

Seriesname - SxxEPxx - Episodename.FileExtension
Try this:

(^|[^a-z])s?(?<s>[0-9]+)ep(?<e>[0-9]{2,})[^a-z]
You can hit "Defaults" in the Filename processor tab, which will reset back to the built-in set at the time that the current version was written.

It is advisable to only turn on the minimum number you need for recognising what you usually encounter. The more there are enabled, the more chance of a "false alarm" and misrecognition. Particularly in the case of some which aren't as specific as others.

temper999

16-09-2009 23:35:13

I will try it, thx.

SunnyUK

20-09-2009 05:50:54

I've download stable 2.1.0 but after hours of fiddling with the regular expressions, I still haven't managed to get anything matched. I'm hoping you can help me.

My tv series are stored using one of three different naming structures:

1) p:\tv\Deadwood\Series 1\#P Deadwood #S 1 #E 6 #T Plague\Deadwood S01E06 - Plague.avi
2) p:\tv\Deadwood\Series 2\#P Deadwood #S 2 #E 3\Deadwood S02E03.avi
3) p:\tv\Jekyl\Series 1\#P Jekyl #S 1 #E 3\#P Jekyl #S 1 #E 3.avi

The directory name is a format that worked with meedio back when that was going strong, #P indicates program, #S indicates season, #E indicates episode, #T indicates episode title. Last year I started to manually rename the shows, but only took the time to rename the actual file and left the directory structure unchanged. That explains my structures 1 and 2, whereas structure 3 is one that I never got around to rename.

Today I finally came across TV Rename and downloaded version 2.1.0. After hours of fiddling with the regular expressions in the filename processor (I've never fully understood regexs, but I admire people who can use them), I still haven't managed to get anything at all matched. I wonder if it's because I have each episode in a directory of its own rather than all episodes for a given season together in one directory.

Any idea about what I should do to get things matched so I can use TV Rename to get everything renamed to have a single naming standard?

Thanks in advance
Tomas

sstteevvee

20-09-2009 22:25:17

You'll have to move all your episodes into one directory. Having one directory for each episode isn't supported.

If you do that, TVRename will work by default with the first two filename styles. The third would be picked up by something like:

(^|[^a-z])#S (?<s>[0-9]+) #E (?<e>[0-9]{2,})[^a-z]

zarthrag

26-09-2009 03:45:43

Hello, I've just started using tvrename, and it's awesome!

I have some anime, which isn't commonly released in an S00E00 format, instead it's linear. For example Naruto Shippuden goes from episode 1 to 126. Is there a way to simply parse for the episode, and have tvrename assume that the missing season means that it's a linearly numbered episode? Many of these shows have a vast number of episodes, and it would be nice to be able to parse them without having to manually rename every file.

ScoopD

28-09-2009 08:10:29

I have some anime, which isn't commonly released in an S00E00 format, instead it's linear. For example Naruto Shippuden goes from episode 1 to 126. Is there a way to simply parse for the episode, and have tvrename assume that the missing season means that it's a linearly numbered episode? Many of these shows have a vast number of episodes, and it would be nice to be able to parse them without having to manually rename every file.

Regardless of what the show is, the data comes from TheTVDB which is community populated. You will probably have to look up your series on there to see how someone has entered the data. Naruto Shippuden for instance is split into 6 seasons. On what basis I don't know. Sometimes just a break in transmission.
The data on TheTVDB also has the option for an "Absolute Order" but this is not available to use currently on TVRename although I think it has been requested. The Absolute Order along with the DVD order are extra pieces of data that are not often filled in.

coders

04-11-2009 03:52:00

First i must say Awesome program and Thanks. Well lets get down to it.

I too have recently built an Anime List and as he said that the Episodes are Linear. This is correct, however if you look up the series under thetvdb.com it will show it in seasons. Now i have a show on my TV Renamer under the following format.
/Anime/Ai Yori Aoshi/Season 1/[a-s]_ai_yori_aoshi_-_01_-_fate__ranmasaotome_[31CBEC4C].mkv

I have tried so many different processors, every one in this thread and also tried to modify some to work. I realize there is a lot of garbage in front and behind the episode number and there is no season number, so I have to use the full path option.

if i use
(?<s>[0-9]+)(?<e>[0-9]+)

I get for Ep 01 --> S0 E1
Ep 10 --> S1 E0.

I know i am close i have to add in the Season to the front so i tried something like this
season (?<s>[0-9]+)\\[^a-z](?<e>[0-9]{1,3})[^a-z]

i get nothing, any help would be great thanks.

u_ny

11-01-2010 11:20:29

Ok, as some users here i tried to do my own REGEX template, but i can't get any result.
As I want to hit my head to a wall, it's time to ask for help.

My pattern is like this:
<Show Name>\<Season #>\<Show Name> - <#> (<episode #>) - <episode title>

If you could put me in the right direction, that would be awesome.
Thanks!

pman860507

14-01-2010 08:20:05

im trying to do the show 24 6 of the seasons did not work. what would the rule be for

24 Season 1 Episode 01.avi

i tried all of them on the first page and i came up empty.

DieLuke

14-05-2010 19:46:05

Hi.
I hope sombody can help me. I would like to rename this: gran-s06e09.avi into this: Grey's Anatomy - 06x09 - <episode title>.avi
or this : lost608.avi into this: Lost - 06x08 - <episode title>.avi

I don't have any clue how it should work, please help me!

Thanx DieLuke

shmuli9

02-06-2010 03:29:55

Hi,
I'm a newbie and I wanted to know for the name structure:

show.name.1503.group-name
or in a real scenario
the.simpsons.1503.pdtv-lol

how do I make it show up when I press scan.
I know that I need to add something to the Filename Processors but I haven't a clue what.

Thanks for your time,
Shmuli9

jeinnor

22-06-2010 04:47:44

Ok, so I have found the right place for this.

I have a few series that are over 10 seasons and I am using the naming convention season name season number episode number 301 302 etc, which works fine until you get season 10. eg 7th Heaven 1001 - It's Late but it does not seem to see this season and is therefore in my missing season list, please help me to fix this?

pman860507

02-07-2010 07:12:14

i have a tv show that says:
"tv show name" 001 "episode title"
"tv show name" 002 "episode title"

its formated like that though the whole series. so it it was ep 99 it would read:
"tv show name" 099 "episode title"

now i have them separated by season but season 2 starts out at

"tv show name" 071 "episode title"

tvrenamer put them all in season 0 until we get over 100 episodes then its season 1. is there any way to get around renaming each one of them?

pman860507

07-07-2010 01:51:27

yeah but that only finds missing episodes.

sstretchh

15-08-2010 14:57:38

Help please !

I have shows with this naming scheme lao.svu901.mysite.org.avi

The scan doesn't pick up show at all, can anyone help with the filename processor because I don't really understand how to change it for the program to see the above filename

thanks in advance

ScoopD

16-08-2010 18:35:21

lao.svu901.mysite.org.avi

I have no idea what that means.

It helps to know what you are trying to get out of this. If a human has trouble working this out, the program has no chance.

OK, let's have a guess - Law and Order Special Victims Unit Season 9 Episode 1? With no break (space or dot) between the "Name" and the "Season/episode" you will always have an issue. Also - I hpe you have set up the show with that customised name as the program will never work that out.

DarkFather

22-08-2010 17:59:48

Hi,
i have one too...

It is tvs-bot-dd20-ded-dl-7p-hdtv-x264-102.mkv
What means Better Off Ted S01 E02. Thats nearly impossible, but i have good news: the parent dir is always the whole dirname (Better.Off.Ted.S01E02.Klumpi.German.DD20.Dubbed.DL.720p.HDTV.x264-TVS).
So how can i use this?

Thanks
DarkFather

sstretchh

26-08-2010 09:29:03

thats the thing, How do i go about setting up a customized name ?

ScoopD

26-08-2010 22:19:17

How do i go about setting up a customized name ?

Go to your show in the My Shows tab - click to highlight and click Edit at the bottom left of the program to open the settings for that show. See the "Custom Name" box? The first thing in the settings which are the bottom half of that form.

Dilogoat

14-10-2010 03:27:18

One for you here too.

I have a structure as follows:

d:\TV\Showname\Season 1\01) Episode name.avi

So the files are saved as episode number followed by a closed bracket [e.g. 01)] and then the episode name. How would I build a regex to find the information. I have tried playing around with a few combination with full path ticked but nothing has happened.

Thanks.

dannycorker

12-11-2010 04:17:25

Hi - was wondering if there is a way to detect misspelled shows. In my case, I have every episode of Friends in my Downloads as "Frnds.105.dvdrip.saints" Can I make it detect "Frnds" as matching "Friends"?

And is there anyway to make it not care about years - on British reboots like Doctor Who the Show Name is "Doctor Who (2005)" but files are rarely released with the "2005" included. Any way of getting around it other than manually renaming?

Thanks.

staticanime

11-12-2010 17:48:44

Hi all, I've got a bit of a tricky one for you all, hoping someone can help. I have all of the episodes of Stark Trek, in the format of release date, 3 letter series shortcode, season number, episode number and episode title, and I've no idea how to make a processor to match it.

An example of the naming format is: Star Trek\Show 01 - The Original Series\Season 01\1966-10-20 - TOS S01 E07 - Charlie X.avi

I just need to be able to tell it to IGNORE the 1966-10-20 - TOS section, and read the S01 E07 - Charlie X.avi bit to make it match up the episode numbers and titles

Mech_Man

12-12-2010 03:21:34

What you're asking isn't really what this program is intended to do, (make fuzzy guesses about show/episode/description titles, etc). It uses the episode name (as defined in the program, or as changed in the customizer field), and the ep number. The description and other stuff is pretty much ignored in the source file, and overwritten by the data the program gets from it's database.

So ... The best move for you would be to use some batch renamer program to rename all the shows into a format that has the series name and episode number in one of the recognized formats, and just blow away the rest of the data in the source file.

With your example: Star Trek\Show 01 - The Original Series\Season 01\1966-10-20 - TOS S01 E07 - Charlie X.avi
I'd copy (working with a copy, NOT the original files --- just to keep them safe in case I screwed up!), all the files into one single directory.

Like you, I prefer Star Trek ToS to plain Star Trek, so first, I'd change TV renamer's series name from "Star Trek" to "Star Trek ToS"

Then I'd use some batch/group renaming program like Magic File Renamer, and rename all the files, replacing the first 16 characters ("1966-10-20 - TOS ") with a constant series name, IE: "Star Trek ToS - s01 e07 - Charlie X.avi"
With this format, TVrenamer can identify the series name, the episode numbers, and replace them with what ever format you wish.

Rand

31-12-2010 07:31:57

im trying to do the show 24 6 of the seasons did not work. what would the rule be for

24 Season 1 Episode 01.avi

i tried all of them on the first page and i came up empty.


I also need help with this but similar.. mine more does like this..

Show - Season 1 - Episode 01 - Name of Episode.avi

aka

Dexter - Season 1 - Episode 12 - Born Free.avi

staticanime

31-01-2011 07:15:36

Hey guys, need a bit of help finalising my Reg Ex processor

My TV Shows are named as follows:
Single-Episodes - Show Name (Year)\Season 0X\Show Name - Season 0X - EXX - Episode Name.ext
Double-Episodes - Show Name (Year)\Season 0X\Show Name - Season 0X - EXX + EXX - Episode Name.ext

So far, I got this Reg Ex to match single-episodes "Season (?<s>[0-9]+) - E(?<e>[0-9]{2,})", but I'm unsure on how to add a check for the EXX + EXX double episodes.
Any help would be greatly appreciated!!

Mech_Man

31-01-2011 09:20:14

There isn't any way to fully automate this, as combined episodes are non-standard. Some do it, some don't, and how it's shown isn't the same. So Renamer went a different route. It gives you a way to dynamically change the numbering and naming info that it gets. (Dynamically, as for instance: if there is an update in the episode description, then the next time it reloads the show's data, it will still combine the numbers and names, whatever they might have been updated to).

Go to the My Shows screen, select the show, right click and select Edit Season One or what ever season number.
You'll be given a dialog box that shows a place for you to create custom combining and splitting rules.

For example. the first broadcast of the 4th season of Bones was a double episode.
Go to the My Shows tab
Select Bones
Left click on the plus box to expand the seasons,
Select & right click Season 4 and from the pull-down, select Edit Season 4, (not EDIT SHOW) and the Edit Seasons Rules dialog box come up.
Hit Add to add a new rule.
Select the action to be Merge as you want to merge two or more episodes into one listing.
in the From and To boxes, enter the starting and ending episode numbers you want to merge. In this case,
From: 1
and
Two 2
You could also fill in the New Name box, if you wanted it to override the default of just listing each name, separated with a plus.
if you look at the Preview display in the lower half of the Edit Season Rules dialog box, you will see the new episode numbering and titles shown.
Hit OK and you are done. All renaming from now one will consider this numbering and naming pattern for this show, for these episodes.

You will have to hope that the final format above is similar enough to what your pre-renaming file format is, for the program to recognize that they are combined.

Cool, eh?

staticanime

31-01-2011 10:28:35

Yeah, the merge option is working like a charm, thanks!!

Darko

12-02-2011 23:34:56

How about this one? I'm recording over the air using BeyondTV. BTV automatically appends the recorded date, eg. "48 Hours Mystery-(Thou Shalt Not Kill)-2011-02-05-0.avi". TVRename turns this into S02E11. I'm guessing this is from the year 2011 being in the filename. I have tried checking and unchecking 'Look for airdate in filenames', but that did not appear to make a difference.

Mech_Man

13-02-2011 06:16:42

From my own trial-n-error working with Rename, it seems to look ONLY for the Show Name, Season Number and Episode Number and is specifically designed to ignore anything else. This is a good thing as Episode Titles and other text really varies from source to source. That is one of the best reasons to use Renamer, in that the end result is traceable back to a common data source (TheTVdb.com 's list)

I think you will have to manually rename each file with the Season and Episode Numbers, and then use Renamer to fill out the Episode Title, (+ air date and what else you what the output to have).

(I'm guessing that it's pretty much impossible to have a program use the Show Name and Air Date as the ID information, as the Air Date is ambiguous. Some shows have a US Air Date that is different than the Canadian Air Date, ditto European. Which one should be used???)

Darko

16-02-2011 14:20:34

Thanks for the info, MechMan. I kind of figured that it needed the Season and Episode already in the filename. Just curious what the 'Look for airdate in filenames' is for.

I actually found a program (really more like a script) called 'BTV to XBMC' that will search the TVdb based on episode names, then will rename the file, stripping off the airdate and inserting the Season and Episode Numbers. It seems to be fairly configurable, so I'm working on getting this to fix the filenames before feeding them into TVRename. It's working for most (maybe 70%) of the shows I record. I will have to tweak it for the remaining shows.

So, I actually have another question now. I have 'BTV to XBMC' rename the files and move them to a folder called Renamed. This is a Search Folder in TVRename. TVRename successfully processes most of these shows and I want it to move the shows to the Recorded TV folder on my NAS. TVRename does a Copy, not a Move. So I end up with two copies of the show. I do not have the "Copy files, don't move" option checked. Any ideas?

Mech_Man

17-02-2011 04:21:58

Again, from trial and error (the out-of-date manual is very unclear about what function searches for what renaming action), I have stumbled on this use-pattern:

To set your MoveTo folder:
Edit the show so you use Automatic Folders, set as (your c:\Recorded TV\" path)
You can vary that from show to show.

In the Edit Show, Advanced tab: Select "Do Missing Check" but do NOT select "Do Renaming".
I know, this is counter-intuitive, but give it a try.
... you need to have the Manual/Additional Folders all left blank,
... you need to have the MoveFrom folder(s) filled in on the Options / Preferences / Search Folders. Just the topmost level of each path you want to search, as it appears to search all sub-dirs below (an excellent and very useful feature).

What I do is download all my files to a single unique directory, but the download and re-expansion process puts each file in their own, custom-named folders, along with the nfo and other trash files.

I use TVrenamer to scan, and it picks up all the selected shows, and will move them and rename them properly to the MoveTo directory.

The downsides I've found with this method:
1) It somehow confuses TVr so that it doesn't have a good idea of if a show is Found or not. So the Scan process has to be observed carefully. It will list a bunch of shows that are "missing", and then list the shows to be "moved" (and "renamed"). This list of Moved is almost always just the new shows, and the real useful part of me using this program. However, sometimes TVr mis-identifies a show as another show, with the same season/episode, so I do have to glance through the proposed "move" list to make sure some other show isn't renamed improperly. However, this last may be due to my own habit of re-naming each show yet again, after I watch it, (adding a "_" to the end of the file name) to designate that I've watched it, and it's a clean version, no static, clean audio, etc.

Let me know if this helps

mattystorey001

10-03-2011 00:09:29

Hi,

Having a couple of problems with a number of files that renaming and unsure how to proceed.

For instance the following is having trouble being discovered:

Z:\TV\Las Vegas\Season 2\las.vegas.201-med\s02e01.avi
Z:\TV\Las Vegas\Season 2\las.vegas.202-med\s02e02.avi
Z:\TV\Las Vegas\Season 2\las.vegas.203-med\s02e03.avi
etc.etc.

It appears if the avi folders are in a seperate folder under the season folder they are not discovered unless i manually move them (which i kinda assumed that's what TV Rename did..)

Thanks, Matt

mattystorey001

10-03-2011 00:27:19

Hi,

Having a couple of issues with some files.

Z:\TV\Numb3rs\Season 1\tpz-numb101\tpz-numb101.avi
Z:\TV\Numb3rs\Season 1\tpz-numb102\tpz-numb102.avi
Z:\TV\Numb3rs\Season 1\tpz-numb103\tpz-numb103.avi

It appears TV renamer does not identify "tpz-numb" before the season and episode number. Any ideas on how to wrote a file processor for this?

Thanks, M

carl.763

25-07-2011 17:17:08

Hi helpful people

My filenames are set up as follows:
d:\TV Shows\Chuck\2 x 04 - Chuck Verses The Cougars
or:
d:\TV Shows\House\Series 2\ 2 x 04 - TB Or Not TB

Could someone please help me with the filename processor that would sort through these as all my files are in this format (I thought it lookedgood!)
Many thanks
Carl

edglobe

02-09-2011 19:48:54

Hi,

I have a problem with the regular expressions.

My shows are organized like this: "Show name - Season xx - yy.ext"
So far the regular expression I got from these forums is: Season (?<s>[0-9]+) - (?<e>[0-9]{2,})

But it isn't working :/

Could you please help me get it right?

Thanks

photon

21-09-2011 18:54:35

For a long time I've been annoyed with some shows not matching with the Defaults.

Today I sat down with Expresso and came up with the following:
^.*\bs?(?<s>\d{1,})[ex]?(?<e>\d{2,})(?!p)

It matches correctly on all of the shows I've come across lately, including a number with the year in their name or the simple number only format 201 (instead of s02e01) , or even shows with both.

So Showname.2010.203.ext will be correctly matched as s02e03

I've disabled some of the Defaults and am just using this for the moment. I'll probably have to add some defaults back in at some stage but for now this is working great.

I hope this saves someone else the pain/time of coming up with something similar.

EDIT: Reverted the regex since TVRename didn't seem to like the newer one. It has a problem with one episode of one show. "Show 1-2-3 - S01E06 - Episode words 101" I'll have to see if I can fix that at some stage. :(

3dcircus

06-11-2011 10:10:49

Hi just started using this program and it seems to crash when it searches some of my shows and i think its because of the filename processors

i have my folder structure like this on my pc
D:\Files\Videos\Tv Shows\Series\Black Books\Black Books - Season 1

then files are named eg.
Black Books S01E01 - Cooking the Books.avi


in the add/edit show tab "basics" i have the base folder the same as above, the "folder per season, base name: season - (this might need to be "show name - season" ?

im not sure if ive posted this in the right place but if someone could help please

abeloin

15-11-2011 18:49:12

For a long time I've been annoyed with some shows not matching with the Defaults.
Today I sat down with Expresso and came up with the following:
^.*\bs?(?<s>\d{1,})[ex]?(?<e>\d{2,})(?!p)
It matches correctly on all of the shows I've come across lately, including a number with the year in their name or the simple number only format 201 (instead of s02e01) , or even shows with both.
So Showname.2010.203.ext will be correctly matched as s02e03
I've disabled some of the Defaults and am just using this for the moment. I'll probably have to add some defaults back in at some stage but for now this is working great.
I hope this saves someone else the pain/time of coming up with something similar.
EDIT: Reverted the regex since TVRename didn't seem to like the newer one. It has a problem with one episode of one show. "Show 1-2-3 - S01E06 - Episode words 101" I'll have to see if I can fix that at some stage. :(


For show's with a date in the name, which a still troublesome for the software(even with the new alias system), I changed one default regex(left the default ones enabled) from:
(^|[^a-z])(?<s>[0-9])(?<e>[0-9]{2,})[^a-z]
to
(^[^0-9]|[^a-z](?<!\b2010)(?<!\b2011)(?<!\b2012)\b(?!(?:2010|2011|2012)\b))(?<s>[0-9])(?<e>[0-9]{2,})[^a-z]
It's not the best solution but it does work!