DragonFly New User

Posts: 2 Join date: 2008-10-01
 | Subject: Genre by Parentfolder or Genre limitations/Fixed amount Wed Oct 01, 2008 2:51 pm | |
| In the XBMC forum, Kris Toff suggested a way to mass rename the genre tag (see: http://xbmc.org/forum/showthread.php?p=213776&highlight=genre#post213776). Please read. It's kind of what I also like but in a different way..... I have a large number of movies on a large drives, and as Kris, I already have those movies categorized in genre folders, just to keep a clarifying overview I'd like to limit the amount of genres: | Code: | Action & Thriller\ Cartoons\ Comedy\ Documentary\ Drama\ Family\ Fantasy\ Horror\ Sci-Fi\ |
Each genre folder contains movies in subfolders:
| Code: | Cartoons\ |_Wall-E\ |_ Wall-E.avi
|
In the NON library mode in XBMC would have this as the default view. It makes it easy for the wife and kids to find a particular movie
The Library mode however, does provide more movie information at one glance (media-info) and generally looks better. But after scanning in XBMC or with Media Companion, genres have been altered and/or have subgenres added.
Now, it becomes much more confusing for them to find a movie. The list of genres has increased an now for them to find a cartoon, they have to decide if it’s a comedy or an action movie or other and then find it in a huge list. Whereas in the non library mode they only had to choose the genre (cartoons) and do a bit of scrolling.
Can there be an option (in most preferred order) in Media Companion to: - When scanning the root, read the genre tag from the genre (parent) folder (and not be overwritten if scanned) or - Scanning the Genre folders one at a time and read tag from that folder or - mass rename genre tags afterwards if the above is not possible.
This probably only applies for people who have a large number of files and have them already categorized and like to keep it that way in XBMC. So please have a look. |
|
billyad2000 Admin

Posts: 1326 Join date: 2008-09-20
 | Subject: Re: Genre by Parentfolder or Genre limitations/Fixed amount Wed Oct 01, 2008 3:21 pm | |
| That sounds like a good idea on the face of it, I'll look into it. |
|
mnk6 New User

Posts: 8 Join date: 2008-09-23
 | Subject: Re: Genre by Parentfolder or Genre limitations/Fixed amount Wed Oct 01, 2008 4:09 pm | |
| I have a PHP script that I wrote that I would be glad to post if you feel brave enough to try it. You can download xampp lite (web server and php) and unzip the files into a particular folder and bring up the interface in your browser. It currently doesn't do much:
- Easy way to rename movies with the year on the end by looking at imdb - Editing the xml files to use the top level folder as the genre (I have mine a little different, something like Movies/Action/The Matrix/The Matrix 1.avi, Movies/Action/The Matrix/The Matrix 2.avi, Movies/Action/3.10 to Yuma.avi, but it should work) - Tests to see which files are missing .nfo/.tbn - Tests to see if TV shows are missing episodes (not by checking TVDB, if you have S01E01 and S01E03, it will tell you that you are missing S01E02 but won't tell you S01E04). Episodes must be named using S/E notation and not the three digit number like 101 for S01E01.
You would have to edit the path in the php file to make it work (you can't do that through the browser).
It doesn't have the polish put on it as I wasn't really intending on distributing it, but I will be glad to post it if you would find it useful. |
|
DragonFly New User

Posts: 2 Join date: 2008-10-01
 | Subject: Re: Genre by Parentfolder or Genre limitations/Fixed amount Wed Oct 01, 2008 5:08 pm | |
| Thanks billyad2000!
I would be grateful mnk6! |
|
mnk6 New User

Posts: 8 Join date: 2008-09-23
 | Subject: Re: Genre by Parentfolder or Genre limitations/Fixed amount Sat Oct 04, 2008 12:11 am | |
| You can find the source code and brief instructions here: http://mattsarchives.com/pages/display/media-manager |
|
jojitb New User

Posts: 2 Join date: 2008-11-15
 | Subject: Re: Genre by Parentfolder or Genre limitations/Fixed amount Sun Nov 16, 2008 12:40 pm | |
| I wanted to use the Genre filter to differentiate my hidef videos from my ordinary xvids. here is a perl script to add "Hi-Def" genre to the .nfo file | Code: | <genre>Crime / Drama / History / Thriller</genre>
|
becomes
| Code: | <genre>Hi-Def / Crime / Drama / History / Thriller</genre>
|
forgive me if it is not very pretty. I only studied perl today just to make this script. lol take note that your hidef movies should be in its own directory to use this script. you can separate them after.
runs only in linux right now.
| Code: | #!/usr/bin/perl -w
system ("find . -name '*.nfo' >> test.lst"); open (LIST1, 'test.lst'); while ($line = <LIST1>) { chomp $line; print "line 1 = $line\n"; $new = $line . ".bak"; print "line2 $new\n"; rename ($line, $new); open (MYFILE, $new); $line3 = ">" . $line; print "line 3 = $line3\n"; open (OUTFILE, $line3); while ($x = <MYFILE>) { chomp $x; if ($x =~ "<genre>") { if (!($x =~ "Hi-Def")) { $x =~ s/<genre>/<genre>Hi-Def \/ /; } } print OUTFILE "$x\n"; } close (MYFILE); close (OUTFILE); } close (LIST1);
|
|
|