Need Help Organizing Movies and TV shows.

Any questions? Need some help?
Post Reply
RamboUnchained
Posts: 5
Joined: 17 Jan 2015, 08:51

Need Help Organizing Movies and TV shows.

Post by RamboUnchained »

Hi, so according to the title, you know why I'm here. I absolutely suck at coding. It's possibly harder than a 500lb man trying to score an 80yd touchdown....while backpedaling....in the NFL.

I'm in a major dilemma. I am using Kodi with an add-on named Genesis. When adding movies to my library from within Genesis, it creates a folder with a .strm file inside. The problem is that I have over 11,000 movies and over 2,500 TV shows that are just sitting in their respective TV and Movie folders. The folder has no structure and as an organized person, that truly BOTHERS me to say the least.

I don't want anything too absurd. I simply want all of the media grouped into a folder that matches their respective genre. All of the files are on an external USB 3.0 HDD.

I want the TV folder to look like: H/Library/TV/Genre/Show/Seasons/Episodes

And for the movie folder to look like: H/Library/Movies/Genre/NameofMovie

Can someone help me achieve this in a very noob friendly explanation?

I looked around the forums and watch a few (outdated) tutorials on youtube and I'm still stuck at square one. It's slightly embarrassing.
User avatar
rednoah
The Source
Posts: 22984
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Need Help Organizing Movies and TV shows.

Post by rednoah »

Have you had a look at how to specify your output format?
http://www.filebot.net/naming.html

e.g. Series format:

Code: Select all

H:/Library/TV/{genre}/{n}/Season {s}/{n} - {s00e00} - {t}
I'm sure you can "codify" the movie format you want yourself now. ;)
:idea: Please read the FAQ and How to Request Help.
RamboUnchained
Posts: 5
Joined: 17 Jan 2015, 08:51

Re: Need Help Organizing Movies and TV shows.

Post by RamboUnchained »

rednoah wrote:Have you had a look at how to specify your output format?
http://www.filebot.net/naming.html

e.g. Series format:

Code: Select all

H:/Library/TV/{genre}/{n}/Season {s}/{n} - {s00e00} - {t}
I'm sure you can "codify" the movie format you want yourself now. ;)
All of that actually looks quite foreign to me. Maybe I'm overthinking it. Or maybe I'm too used to being coddled by super simple GUIs. My mouth would water if I could just highlight a checkbox that says "organize files into genres." DevXen's code is exactly what I want to use, but I don't even know where to put/modify .csv files. :cry:

This is what I plan to use for my TV shows:

C:/Users/Rambo/Videos/Cleaned Library/TV Series/{genres[0]}/{n}/Season {s}/{n} - {s00e00} - {t}

And this for movies:

C:/Users/Rambo/Videos/Cleaned Library/Movies/{genres[0]}/{n} ({y})

Does this look proper?

Also, for a movie with multiple genres like The Blind Side, how would I set it up to go to it's most predominant type? It's Sports | Drama, but I'd want it in the sports genre for sure.
User avatar
rednoah
The Source
Posts: 22984
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Need Help Organizing Movies and TV shows.

Post by rednoah »

1.
Look at it. It's a template, and there's 0 code in it. I'm sure it makes sense if you spend 5 seconds looking at it and trying to understand it. ;)

2.
How to "Edit Format" is pretty much self-explanatory, also there's the videos, also there's no magic .csv files, just a GUI where you enter your format. And you'll see if it's proper or not once you enter it.

3.
{genre} or {genres[0]} is the first genre according the database which should be the predominant one. It may or may not yield the value you'd prefer.
:idea: Please read the FAQ and How to Request Help.
DavidRTurner
Power User
Posts: 85
Joined: 01 Feb 2014, 16:59

Re: Need Help Organizing Movies and TV shows.

Post by DavidRTurner »

RamboUnchained wrote:All of that actually looks quite foreign to me. Maybe I'm overthinking it. Or maybe I'm too used to being coddled by super simple GUIs. My mouth would water if I could just highlight a checkbox that says "organize files into genres."
Howdy... the power of Filebot is that it is designed to let the user do whatever they want to, by being flexible - not constrained to the programmer's rules, as most software is.
RamboUnchained wrote:DevXen's code is exactly what I want to use, but I don't even know where to put/modify .csv files. :cry:
I'll address CSV files at the bottom, FYI...
I'm at just about the point where I can help others, having spent (start crying for me now) around 100 hours working on my own format... I'm almost(!!!!) done, though. Of course, a lot of that is testing stuff I've found in these forums & elsewhere, studying how some things work, trying to learn tutorials... all randomly, instead of in an organized Step1, Step2, Step3... way.
RamboUnchained wrote:C:/Users/Rambo/Videos/Cleaned Library/TV Series/{genres[0]}/{n}/Season {s}/{n} - {s00e00} - {t}
And this for movies:
C:/Users/Rambo/Videos/Cleaned Library/Movies/{genres[0]}/{n} ({y})
Does this look proper?
Yup - those are quite simple formats, but they work.
RamboUnchained wrote:Also, for a movie with multiple genres like The Blind Side, how would I set it up to go to it's most predominant type? It's Sports | Drama, but I'd want it in the sports genre for sure.
Note: theTVDB and TVRage are user-maintained dbases, so users can edit their content (to some degree) - this allows someone to select the 'wrong' genres for a show, for many reasons - mostly user error.
In programming references, zero is '1st' ('coz computers have to start with 0 when counting), so genres[0] means the 'zero-th (aka first) genre (which, hopefully, was the first one given to that show and is considered the dominant one)'.
As red says, the dbase "should" have the most relevant/dominant genre as the '1st' one in its list, but no guarantees.

Ithiel & DevXen posted some of the most thorough formats on the forums.
Their original posts may be a bit out-of-date, but I (and so many others) have based my format on theirs, but over time, improvements in FB code, changes in the dbases, and other things, have allowed some great efficiencies to be found.
I've spent a lot of time improving mine, and rednoah has helped a helluvalot (as he is doing both the coding of the program AND providing great forum guidance, we all thank him!!!)


Groovy is a form of JavaScript; you don't really need to be a JS programmer to use it; some background in computer tech is handy; but as a newbie myself a year ago, I know it looks very confusing.
But it's not!

Once you're familiar with some fundamentals, you'll be able to do a lot more with your format than the above - IF you want to!

CSV Files:
What did you want to do that makes you think of using them?

One of my format's lines is:

Code: Select all

{csv('B:/Downloads/Filebot/TV Network-Country List.csv').get(info.network) ?: 'COUNTRY'}
- it reads the CSV file, which has a format of:
2;UK
ABC;US
AETV;US
... this has been created manually, matching TV networks to their countries of origin (something I want to refer to, but is not part of the dbase offering).
- it then brings in the network from the dbase and compares it to the CSV.
- if the network is found, it checks it - if it's ABC, it holds "US" in the buffer.
- it the network is NOT found, it replaces the 'blank network' with 'COUNTRY' (again, my personal choice).
Later, I add the country to the final filename.


Filebot has a 'revert' capability that's fabulous! If you accidently screw it up, you can undo it.
So you can play with files & see how they work.
Better idea, though... take a small file (10mb, doesn't matter what it actually is) and copy it a dozen times.
Copy some sample input filenames from your collection to these files.
Then run FB on these files.
The New Names pane will always show you what WILL HAPPEN, but you can edit the format to fix it before you take any action.
As to editing the format, just right-click, EDIT FORMAT on the FB window.
You have a short, single-line pane to edit, which is limiting...
I keep a text editor open & have my format in there.
I make a copy of it in a new tab, experiment with new code, then copy/paste into the EDIT FORMAT.
The preview of results comes up, and I repeat the editing or use it... as needed.
Again, ONCE YOU GET GOING, it's very easy to use.


I'm happy to assist... (my handle is Rambo in most forums, so you've got my attention!)

P.S. - I hope you have a complete backup of that HD...!!!
RamboUnchained
Posts: 5
Joined: 17 Jan 2015, 08:51

Re: Need Help Organizing Movies and TV shows.

Post by RamboUnchained »

DavidRTurner wrote:
RamboUnchained wrote:All of that actually looks quite foreign to me. Maybe I'm overthinking it. Or maybe I'm too used to being coddled by super simple GUIs. My mouth would water if I could just highlight a checkbox that says "organize files into genres."
Howdy... the power of Filebot is that it is designed to let the user do whatever they want to, by being flexible - not constrained to the programmer's rules, as most software is.
RamboUnchained wrote:DevXen's code is exactly what I want to use, but I don't even know where to put/modify .csv files. :cry:
I'll address CSV files at the bottom, FYI...
I'm at just about the point where I can help others, having spent (start crying for me now) around 100 hours working on my own format... I'm almost(!!!!) done, though. Of course, a lot of that is testing stuff I've found in these forums & elsewhere, studying how some things work, trying to learn tutorials... all randomly, instead of in an organized Step1, Step2, Step3... way.
RamboUnchained wrote:C:/Users/Rambo/Videos/Cleaned Library/TV Series/{genres[0]}/{n}/Season {s}/{n} - {s00e00} - {t}
And this for movies:
C:/Users/Rambo/Videos/Cleaned Library/Movies/{genres[0]}/{n} ({y})
Does this look proper?
Yup - those are quite simple formats, but they work.
RamboUnchained wrote:Also, for a movie with multiple genres like The Blind Side, how would I set it up to go to it's most predominant type? It's Sports | Drama, but I'd want it in the sports genre for sure.
Note: theTVDB and TVRage are user-maintained dbases, so users can edit their content (to some degree) - this allows someone to select the 'wrong' genres for a show, for many reasons - mostly user error.
In programming references, zero is '1st' ('coz computers have to start with 0 when counting), so genres[0] means the 'zero-th (aka first) genre (which, hopefully, was the first one given to that show and is considered the dominant one)'.
As red says, the dbase "should" have the most relevant/dominant genre as the '1st' one in its list, but no guarantees.

Ithiel & DevXen posted some of the most thorough formats on the forums.
Their original posts may be a bit out-of-date, but I (and so many others) have based my format on theirs, but over time, improvements in FB code, changes in the dbases, and other things, have allowed some great efficiencies to be found.
I've spent a lot of time improving mine, and rednoah has helped a helluvalot (as he is doing both the coding of the program AND providing great forum guidance, we all thank him!!!)


Groovy is a form of JavaScript; you don't really need to be a JS programmer to use it; some background in computer tech is handy; but as a newbie myself a year ago, I know it looks very confusing.
But it's not!

Once you're familiar with some fundamentals, you'll be able to do a lot more with your format than the above - IF you want to!

CSV Files:
What did you want to do that makes you think of using them?

One of my format's lines is:

Code: Select all

{csv('B:/Downloads/Filebot/TV Network-Country List.csv').get(info.network) ?: 'COUNTRY'}
- it reads the CSV file, which has a format of:
2;UK
ABC;US
AETV;US
... this has been created manually, matching TV networks to their countries of origin (something I want to refer to, but is not part of the dbase offering).
- it then brings in the network from the dbase and compares it to the CSV.
- if the network is found, it checks it - if it's ABC, it holds "US" in the buffer.
- it the network is NOT found, it replaces the 'blank network' with 'COUNTRY' (again, my personal choice).
Later, I add the country to the final filename.


Filebot has a 'revert' capability that's fabulous! If you accidently screw it up, you can undo it.
So you can play with files & see how they work.
Better idea, though... take a small file (10mb, doesn't matter what it actually is) and copy it a dozen times.
Copy some sample input filenames from your collection to these files.
Then run FB on these files.
The New Names pane will always show you what WILL HAPPEN, but you can edit the format to fix it before you take any action.
As to editing the format, just right-click, EDIT FORMAT on the FB window.
You have a short, single-line pane to edit, which is limiting...
I keep a text editor open & have my format in there.
I make a copy of it in a new tab, experiment with new code, then copy/paste into the EDIT FORMAT.
The preview of results comes up, and I repeat the editing or use it... as needed.
Again, ONCE YOU GET GOING, it's very easy to use.


I'm happy to assist... (my handle is Rambo in most forums, so you've got my attention!)

P.S. - I hope you have a complete backup of that HD...!!!
Hi, David! I appreciate the long and thorough explanation. However, I think I just want to keep it simple and "familiar" since the library will be shared with roughly 20 users once I install a second processor into my server. I have gotten my basis saved in preferences. The ONLY issue I am having now is that the scrapers want to rename some of my files AND give them inaccurate information. I want to set FileBot to keep the filename, since they are already in a preferred format and easily read by XBMC.

Would changing C:/Users/Rambo/Videos/Cleaned Library/Movies/{genres[0]}/{f} ({y}) to
C:/Users/Rambo/Videos/Cleaned Library/Movies/{genres[0]}/{fn} ({y}) solve that issue?

EDIT: {fn} did nothing.
DavidRTurner
Power User
Posts: 85
Joined: 01 Feb 2014, 16:59

Re: Need Help Organizing Movies and TV shows.

Post by DavidRTurner »

I'm not sure where the issue lies with pulling incorrect shows from the dbase - either FB is not 'accurate' enough, or the dbase APIs are not 'smart' enough.
So when a show contains the word 'Love', for example, I always get about 25 results - even when the input file has the exact, correct matching name.
I have to select the right one manually from the list of possibles.

This is what the GUI does; the CLI (command-line-interface) can have scripts to match the 'right' show more accurately, but that's something I have not yet moved into.
A CSV that contains, for example, showname & show ID#, would presumably, be able to let the CLI script match the ID# directly and never have to question if it's the right one.
I must assume that that works, as many users use the scripts to fully automate their collection management.

So if using the GUI, you will always have numerous choices for certain shows, to manually select from.
As far as I know, there's no way to auto-select from the GUI.

You can set the preferences to STRICT or OPPORTUNISTIC; which will either ask for confirmation every time there's a choice, or run with its best-guess... of course, you then need to manually review the list of proposed renames for accuracy either way you go.

The more wrong ones it chooses, the more repeated attempts you'll need to make.


{fn} = in the context of a format, it means 'filename' as in "the name of the file that you're trying to rename"; not the name of the show in the dbase.
It can be useful to identify certain things in the old filename that you want to deal with in the new one (such as "(unaired first episode)" if this was ripped from DVD, to distinguish it from "the first episode".

Note: the dbases contain episode lists as users have added them. Meaning, the way you think a series should be numbered, may differ slightly on the website, and between the 2 dbases of theTVDB and TVRage.
So an (unaired first episode) could be considered S01E01 by some, and entered that way on one site; but it could be considered a special, and therefore numbered some other way (depending on the format) as S00E01.
So the actual first season could be 1, then 2-25, but on the other site it could be 0, then 1-24.

Also; shows that have names which used to exist, usually have the (year) in the name, or the country code, to distinguish them from each other. So make sure you're picking the right one.
i.e. Being Human - was originally a British show.
Being Human (US) - was a copy; since the first existed in the dbase, the (US) was added to the newer one.
But if you didn't know there were two shows, you might blindly select the 'wrong' one when running your check.

TheTVDB has a better dbase generally, and is much faster to get info from; but TVRage has a lot of shows that the other is missing.

Tip: when stuck for no results, go to the EPISODES tab on the left, and type in a show name; quite often I will get results for the right show there, when neither dbase picks it up in the main window. You can highlight & copy/paste the data back to the main window results. Very cool feature.
RamboUnchained
Posts: 5
Joined: 17 Jan 2015, 08:51

Re: Need Help Organizing Movies and TV shows.

Post by RamboUnchained »

DavidRTurner wrote:I'm not sure where the issue lies with pulling incorrect shows from the dbase - either FB is not 'accurate' enough, or the dbase APIs are not 'smart' enough.
So when a show contains the word 'Love', for example, I always get about 25 results - even when the input file has the exact, correct matching name.
I have to select the right one manually from the list of possibles.

This is what the GUI does; the CLI (command-line-interface) can have scripts to match the 'right' show more accurately, but that's something I have not yet moved into.
A CSV that contains, for example, showname & show ID#, would presumably, be able to let the CLI script match the ID# directly and never have to question if it's the right one.
I must assume that that works, as many users use the scripts to fully automate their collection management.

So if using the GUI, you will always have numerous choices for certain shows, to manually select from.
As far as I know, there's no way to auto-select from the GUI.

You can set the preferences to STRICT or OPPORTUNISTIC; which will either ask for confirmation every time there's a choice, or run with its best-guess... of course, you then need to manually review the list of proposed renames for accuracy either way you go.

The more wrong ones it chooses, the more repeated attempts you'll need to make.


{fn} = in the context of a format, it means 'filename' as in "the name of the file that you're trying to rename"; not the name of the show in the dbase.
It can be useful to identify certain things in the old filename that you want to deal with in the new one (such as "(unaired first episode)" if this was ripped from DVD, to distinguish it from "the first episode".

Note: the dbases contain episode lists as users have added them. Meaning, the way you think a series should be numbered, may differ slightly on the website, and between the 2 dbases of theTVDB and TVRage.
So an (unaired first episode) could be considered S01E01 by some, and entered that way on one site; but it could be considered a special, and therefore numbered some other way (depending on the format) as S00E01.
So the actual first season could be 1, then 2-25, but on the other site it could be 0, then 1-24.

Also; shows that have names which used to exist, usually have the (year) in the name, or the country code, to distinguish them from each other. So make sure you're picking the right one.
i.e. Being Human - was originally a British show.
Being Human (US) - was a copy; since the first existed in the dbase, the (US) was added to the newer one.
But if you didn't know there were two shows, you might blindly select the 'wrong' one when running your check.

TheTVDB has a better dbase generally, and is much faster to get info from; but TVRage has a lot of shows that the other is missing.

Tip: when stuck for no results, go to the EPISODES tab on the left, and type in a show name; quite often I will get results for the right show there, when neither dbase picks it up in the main window. You can highlight & copy/paste the data back to the main window results. Very cool feature.
I agree. I use TVDB on XBMC for shows and an IMDB scraper for movies. TMDb doesn't even have matches for some of my movies. What do I do when there is no match? Just ignore them and organize them manually after FileBot moves everything else?
DavidRTurner
Power User
Posts: 85
Joined: 01 Feb 2014, 16:59

Re: Need Help Organizing Movies and TV shows.

Post by DavidRTurner »

RamboUnchained wrote:I agree. I use TVDB on XBMC for shows and an IMDB scraper for movies. TMDb doesn't even have matches for some of my movies. What do I do when there is no match? Just ignore them and organize them manually after FileBot moves everything else?
I've only toyed with my movie renaming - I had them manually named as I like them, so haven't needed to re-organize them.
But when trying, I have the same thing happen - about 3/4 of the movies, while correctly named, even well-known names, do not come up with matches. I sense (not really tested) that ISO files will fail, as if FB is ignoring them.

So I can't advise on movies right now; that collection will be the next thing I do after I finish up my TV format in the next week or two.
RamboUnchained
Posts: 5
Joined: 17 Jan 2015, 08:51

Re: Need Help Organizing Movies and TV shows.

Post by RamboUnchained »

DavidRTurner wrote:
RamboUnchained wrote:I agree. I use TVDB on XBMC for shows and an IMDB scraper for movies. TMDb doesn't even have matches for some of my movies. What do I do when there is no match? Just ignore them and organize them manually after FileBot moves everything else?
I've only toyed with my movie renaming - I had them manually named as I like them, so haven't needed to re-organize them.
But when trying, I have the same thing happen - about 3/4 of the movies, while correctly named, even well-known names, do not come up with matches. I sense (not really tested) that ISO files will fail, as if FB is ignoring them.

So I can't advise on movies right now; that collection will be the next thing I do after I finish up my TV format in the next week or two.
Understood. I'm gonna keep at it myself until I get it fine tuned and automated. I appreciate the assistance, David.
Post Reply