[Linux, MacOSX, Windows] Media Sorting + XBMC Updater
-
- Newbie
- Posts: 8
- Joined: October 26th, 2008, 1:08 pm
Re: [Linux, MacOSX, Windows] Media Processing + XBMC Updater
Tret, this looks terrific and I used your previous scripts. Thanks.
I'm having some problems. Sab is calling media_process.py, but nothing else is happening. I am not getting any activity besides:
Media Process v1.20 by tret
This is also true when I run #sudo python media_process.py.
Dirs are:
Completed Download Folder: /mnt/350gb/completed
which I set to SABNZBD Download Path in settings.conf (which is in the same dir as media_process.py).
Running this on ubuntu feisty server.
I know this isn't much to go on. Your older scripts worked perfect.
Thanks!
I'm having some problems. Sab is calling media_process.py, but nothing else is happening. I am not getting any activity besides:
Media Process v1.20 by tret
This is also true when I run #sudo python media_process.py.
Dirs are:
Completed Download Folder: /mnt/350gb/completed
which I set to SABNZBD Download Path in settings.conf (which is in the same dir as media_process.py).
Running this on ubuntu feisty server.
I know this isn't much to go on. Your older scripts worked perfect.
Thanks!
-
- Newbie
- Posts: 8
- Joined: October 26th, 2008, 1:08 pm
Re: [Linux, MacOSX, Windows] Media Processing + XBMC Updater
Also, is there a way to run the script manually from the command line to catch up on the media the script has missed?
Re: [Linux, MacOSX, Windows] Media Processing + XBMC Updater
Hi superultra,superultra wrote: Tret, this looks terrific and I used your previous scripts. Thanks.
I'm having some problems. Sab is calling media_process.py, but nothing else is happening. I am not getting any activity besides:
Media Process v1.20 by tret
This is also true when I run #sudo python media_process.py.
Dirs are:
Completed Download Folder: /mnt/350gb/completed
which I set to SABNZBD Download Path in settings.conf (which is in the same dir as media_process.py).
Running this on ubuntu feisty server.
I know this isn't much to go on. Your older scripts worked perfect.
Thanks!
Glad to hear that you have enjoyed the scripts. Typically if the script output shows only 'Media Process v1.20 by tret' it means that the script is not finding the category directories within the completed downloads location.
If you have some categories set to use the script, something like: Movies, Music, TV, etc...
You should end up with these directories once sab finishes working with downloads in these categories:
/mnt/350gb/completed/Movies
/mnt/350gb/completed/Music
/mnt/350gb/completed/TV
In the settings.conf file, your first settings is the completed downloads directory, in your case you will have this in the settings.conf file
Code: Select all
SABNZBD Download Path = "/mnt/350gb/completed"
Code: Select all
## Media Process categories
Category Name = "Movies"
Destination Path = "/wherever/you/store/stuff/movies"
Minimum File Size = "400"
Use thetvdb.com scraper (y/n) = "n"
Use imdb.com scraper (y/n) = "y"
Update XBMC Library (y/n) = "y"
Category Name = "Music"
Destination Path = "/wherever/you/store/stuff/music"
Minimum File Size = "1"
Use thetvdb.com scraper (y/n) = "n"
Use imdb.com scraper (y/n) = "n"
Update XBMC Library (y/n) = "y"
Category Name = "TV"
Destination Path = "/wherever/you/store/stuff/tv"
Minimum File Size = "75"
Use thetvdb.com scraper (y/n) = "y"
Use imdb.com scraper (y/n) = "n"
Update XBMC Library (y/n) = "y"
Code: Select all
/mnt/350gb/completed/Movies/Se7en (1995)
Hopefully this takes care of the issue. And yes you can manually run the script because it doesn't depend on any output from sab. Just use the terminal, cd to the scripts location and type ./media_process.py
Good luck! Let me know how it goes.
Rob
Last edited by tret on April 6th, 2009, 9:11 pm, edited 1 time in total.
Re: [Linux, MacOSX, Windows] Media Processing + XBMC Updater
Just a quick update, I am reworking some of the code, it seemed that this wasn't working right in windows when dealing with a mapped network drive. I have already resolved this but I am cleaning up some of the other issues I have noticed.
I am also working on the imdb movie.nfo creation, it hasn't worked quite right to this point so I am trying to come up with some new methods for accurately searching imdb when the downloads have extra garbage in the directory titles (the.dark.knight.720p.bluray.newrelease.blah.blah.blah.2008)
Anyway, I'll post the updates soon
thanks,
Rob
I am also working on the imdb movie.nfo creation, it hasn't worked quite right to this point so I am trying to come up with some new methods for accurately searching imdb when the downloads have extra garbage in the directory titles (the.dark.knight.720p.bluray.newrelease.blah.blah.blah.2008)
Anyway, I'll post the updates soon
thanks,
Rob
-
- Newbie
- Posts: 8
- Joined: October 26th, 2008, 1:08 pm
Re: [Linux, MacOSX, Windows] Media Processing + XBMC Updater
That did the trick. Excellent! Thanks so much Rob!
Re: [Linux, MacOSX, Windows] Media Processing + XBMC Updater
Awesome, btw i made a bit of a typo earlier, I said you need 3 categories but what I meant to say is just that you need to have some categories set. The categories.conf file can contain as many or as few categories as you like so long as you follow the same format, each category needs to have the same number of settings and the settings need be in the same ordersuperultra wrote: That did the trick. Excellent! Thanks so much Rob!
Anyway glad to hear that it is working and check back in the next week or so and I'll have an updated version with better imdb scraping capabilities as well as a few bug fixes here and there
Rob
Re: [Linux, MacOSX, Windows] Media Processing + XBMC Updater
Tret, perhaps you could clean the names like they do in the XBMC-scrapers?I am also working on the imdb movie.nfo creation, it hasn't worked quite right to this point so I am trying to come up with some new methods for accurately searching imdb when the downloads have extra garbage in the directory titles (the.dark.knight.720p.bluray.newrelease.blah.blah.blah.2008)
it's here. look for "PrepareSearchString"
Re: [Linux, MacOSX, Windows] Media Processing + XBMC Updater
excellent suggestion, thanks! Looks like they have a list of "Crap" words which they try to match within the title, if they find one of them they remove it and everything to the right of it. Simple but sounds as though it would be effective. I'll try and reproduce this.Laat wrote:Tret, perhaps you could clean the names like they do in the XBMC-scrapers?I am also working on the imdb movie.nfo creation, it hasn't worked quite right to this point so I am trying to come up with some new methods for accurately searching imdb when the downloads have extra garbage in the directory titles (the.dark.knight.720p.bluray.newrelease.blah.blah.blah.2008)
it's here. look for "PrepareSearchString"
Thanks again for the suggestion
Rob
Re: [Linux, MacOSX, Windows] Media Processing + XBMC Updater
Tret, I'm actually trying to use your script seperate from Sabnzbd as a scheduled script on a WHS machine - I just resolved an issue I was having with directory naming but had a question on something else. Should this be processing files themselves in the download directory or only subfolders? Also, what can the script handle naming wise (i.e. what's the format's it can handle)?
Also, anyway to get the script to rename files (preferably to a configurable format - I generally try Movie Name (Year) [IMDBId]).
I'm going to start messing around with the script to try to do the renaming, but the subfolder/file issue I kind of need to understand because from looking at the script it looks like it SHOULD be doing files as well but it's not.
Also, anyway to get the script to rename files (preferably to a configurable format - I generally try Movie Name (Year) [IMDBId]).
I'm going to start messing around with the script to try to do the renaming, but the subfolder/file issue I kind of need to understand because from looking at the script it looks like it SHOULD be doing files as well but it's not.
Last edited by Necro on April 9th, 2009, 5:50 pm, edited 1 time in total.
Re: [Linux, MacOSX, Windows] Media Processing + XBMC Updater
Last edited by Laat on April 9th, 2009, 6:01 pm, edited 1 time in total.
Re: [Linux, MacOSX, Windows] Media Processing + XBMC Updater
Hi necro,Necro wrote: Tret, I'm actually trying to use your script seperate from Sabnzbd as a scheduled script on a WHS machine - I just resolved an issue I was having with directory naming but had a question on something else. Should this be processing files themselves in the download directory or only subfolders? Also, what can the script handle naming wise (i.e. what's the format's it can handle)?
Also, anyway to get the script to rename files (preferably to a configurable format - I generally try Movie Name (Year) [IMDBId]).
I'm going to start messing around with the script to try to do the renaming, but the subfolder/file issue I kind of need to understand because from looking at the script it looks like it SHOULD be doing files as well but it's not.
The script only looks for directories within the provided category. I designed it that way because SAB always puts the downloads in a directory within a given category.
I plan in a later version to have the script rename Movie folders based on the imdb scraping results in the Movie Name (Year) format as you mentioned.
Thanks,
Rob
Re: [Linux, MacOSX, Windows] Media Processing + XBMC Updater
Excellent!! saved me a bit of work, thank you much
I'll likely have a reworked version of the script up by the end of the weekend for those interested. I have gone through pretty much the entire code and made improvements, fixed some bugs, etc.
I'm looking forward to using this new title cleanup method, should certainly help with getting a more reliable imdb fetch.
Rob
Re: [Linux, MacOSX, Windows] Media Processing + XBMC Updater
version 1.30 (Use the download link at the bottom of the 1st post in the thread)
I have reworked the entire code in this version. Aside from the more reliable scraping techniques (Big thanks to Laat for the name parsing code), copying across mapped network drives in windows is now working properly. I built this version in windows and suspect it still works fine for linux and MacOSX but I would appreciate anyone using these systems to report back on functionality. As usual please report any issues, errors, etc so I can attempt to work out any bugs I may have missed.
The new imdb scraper will filter out junk in the directory name to provide a more reliable search. Also this scraper takes the top 5 imdb hits, splits the imdb title up and provides a percentage based match (# of words matched vs. # of words in the title). Whichever title has the highest percentage match will be chosen
The new tvdb scraper has the same features, capabilities and matching technique as used in the imdb scraper
NOTE: please post the script output for any downloads which fail to properly match using thetvdb or the imdb scraper so I can continue to improve the scraper reliabilty
TO DO:
- Two outstanding issues with the imdb scraper that I need to resolve...
1. Foreign titles on imdb but english titles from sabnzbd... right now the two titles won't match, imdb provides an english title translation, I just need to work it in
2. Remakes when the year isn't provided... right now the scraper will most often select the original release but i suspect in most cases the user will be looking for the most recent release (The Day the Earth Stood Still) 1951 version or 2008 version???
- Rename Movie directories to match the imdb title: The.Dark.Knight.2008.x264.1080p.bluray -> The Dark Knight (2008)
- Identify unnecessary directory nesting, move files to the root of the download directory (VIDEO_TS being the exception)
I have reworked the entire code in this version. Aside from the more reliable scraping techniques (Big thanks to Laat for the name parsing code), copying across mapped network drives in windows is now working properly. I built this version in windows and suspect it still works fine for linux and MacOSX but I would appreciate anyone using these systems to report back on functionality. As usual please report any issues, errors, etc so I can attempt to work out any bugs I may have missed.
The new imdb scraper will filter out junk in the directory name to provide a more reliable search. Also this scraper takes the top 5 imdb hits, splits the imdb title up and provides a percentage based match (# of words matched vs. # of words in the title). Whichever title has the highest percentage match will be chosen
The new tvdb scraper has the same features, capabilities and matching technique as used in the imdb scraper
NOTE: please post the script output for any downloads which fail to properly match using thetvdb or the imdb scraper so I can continue to improve the scraper reliabilty
TO DO:
- Two outstanding issues with the imdb scraper that I need to resolve...
1. Foreign titles on imdb but english titles from sabnzbd... right now the two titles won't match, imdb provides an english title translation, I just need to work it in
2. Remakes when the year isn't provided... right now the scraper will most often select the original release but i suspect in most cases the user will be looking for the most recent release (The Day the Earth Stood Still) 1951 version or 2008 version???
- Rename Movie directories to match the imdb title: The.Dark.Knight.2008.x264.1080p.bluray -> The Dark Knight (2008)
- Identify unnecessary directory nesting, move files to the root of the download directory (VIDEO_TS being the exception)
Last edited by tret on April 11th, 2009, 7:28 pm, edited 1 time in total.
Re: [Linux, MacOSX, Windows] Media Processing + XBMC Updater
Anyone mind if I steal that little bit of code for stripping down the scene directory names for a 'simple' directory scanner and movie renamer/mover script I'm working on? (That's quickly getting a bit out of control).
Also, tret, not sure if you know about this but you may want to check out IMDbPY - saved me a ton of time and got me to a fully functional script fairly quickly. (http://imdbpy.sourceforge.net/)
Of course...UNC paths are now screwing everything up.
Also, tret, not sure if you know about this but you may want to check out IMDbPY - saved me a ton of time and got me to a fully functional script fairly quickly. (http://imdbpy.sourceforge.net/)
Of course...UNC paths are now screwing everything up.
Last edited by Necro on April 14th, 2009, 9:54 pm, edited 1 time in total.
Re: [Linux, MacOSX, Windows] Media Processing + XBMC Updater
Thanks for the imdbpy link, looks promising!!!Necro wrote: Anyone mind if I steal that little bit of code for stripping down the scene directory names for a 'simple' directory scanner and movie renamer/mover script I'm working on? (That's quickly getting a bit out of control).
Also, tret, not sure if you know about this but you may want to check out IMDbPY - saved me a ton of time and got me to a fully functional script fairly quickly. (http://imdbpy.sourceforge.net/)
Of course...UNC paths are now screwing everything up.
I don't mind if anyone uses any of the code.... btw tell me about your "Out of Control" script