[Linux, MacOSX, Windows] Media Sorting + XBMC Updater

Come up with a useful post-processing script? Share it here!
sixones
Release Testers
Release Testers
Posts: 43
Joined: January 13th, 2009, 6:10 am

Re: [Linux, MacOSX, Windows] Media Processing + XBMC Updater

Post by sixones »

i've been using this script for a while whilst running SABnzbd+ from source, recently though i switched to using the beta build and the pre processing fails with;

Code: Select all

           'import site' failed; use -v for traceback
Traceback (most recent call last):
  File "/Users/Shared/Scripts/media_process.py", line 3, in <module>
    import os
zipimport.ZipImportError: can't decompress data; zlib not available
Im running on Mac OSX, iv tried making a new python install (via macports) with the zlib library compiled in but it has the same results.

Any ideas on how to fix?
medyaye
Newbie
Newbie
Posts: 3
Joined: November 8th, 2009, 4:39 am

Re: [Linux, MacOSX, Windows] Media Processing + XBMC Updater

Post by medyaye »

Hi,

I've just discovered your script. Sounds great ! I'm planning using it, but before i start a long process of setting up all my system, i have question :

i'm running SABnzbplus on a synology DS207+ NAS. The NAS is only used to store photos and to download. I'd like to send to my media center (pc running visa) the files downloaded once they're done. How can i send the file  using your script. I was thinking about creating samba share folder on my htpc but i don't know what king of path i'll have to specify in the config file of the script.

Thank for your help
Last edited by medyaye on November 8th, 2009, 5:09 am, edited 1 time in total.
weldon
Release Testers
Release Testers
Posts: 21
Joined: October 29th, 2009, 3:22 pm

Re: [Linux, MacOSX, Windows] Media Processing + XBMC Updater

Post by weldon »

Is there a log / a way to view python commands on windows? I just got this to work, and by work I mean delete a 1/3 of my library. Just want to see what I need to rerip. Thanks
WP7 Sabnzbd/NZBMatrix/Newzbin App: Sab Watch http://forums.sabnzbd.org/index.php?topic=5556.0
kulprit
Release Testers
Release Testers
Posts: 16
Joined: October 3rd, 2009, 12:41 am

Re: [Linux, MacOSX, Windows] Media Processing + XBMC Updater

Post by kulprit »

Are you able to provide the just update xbmc part of this script for windows. The other thread doesn't contain anything that works with sabnzbd running on a windows server. Thanks
JohnSCS
Newbie
Newbie
Posts: 42
Joined: August 17th, 2009, 12:23 am

Re: [Linux, MacOSX, Windows] Media Processing + XBMC Updater

Post by JohnSCS »

kulprit wrote: Are you able to provide the just update xbmc part of this script for windows. The other thread doesn't contain anything that works with sabnzbd running on a windows server. Thanks
Have a look here http://forums.sabnzbd.org/http://forums ... 147#p22147
tret
Full Member
Full Member
Posts: 148
Joined: August 2nd, 2008, 2:07 pm

Re: [Linux, MacOSX, Windows] Media Processing + XBMC Updater

Post by tret »

Well it's been a long time coming but I've completely re-written the script, fixed a lot of annoying bugs and added a few new tricks/features. Stay tuned as I'll be posting the new version and all the important usage details sometime tonight or early tomorrow. Just need a bit more testing and code commenting.

Once released I'll need some feedback from Mac OS X and Windows users as I have only tested under Linux thus far.

Rob
tret
Full Member
Full Member
Posts: 148
Joined: August 2nd, 2008, 2:07 pm

Re: [Linux, MacOSX, Windows] Media Sorting + XBMC Updater

Post by tret »

version 2.00 (Use the download link at the bottom of the 1st post in the thread)

- The code has been completely re-written
- Re-designed failed download handling
- Faster download moving (files will be moved rather than copied when source and destination are located on the same partition)
- Storage use and availability information is written to script output
- Moved to an ini type settings file to allow unlimited categories and XBMC library updating
- Removed imdb and thetvdb.com scraping (XBMC scrapers are now working well and this was no longer needed)

There are many more improvements and changes and I believe the script will perform better and more reliably than previous versions. I have not had time to test this fully with Windows and Mac OS X machines and will appreciate any feedback good or bad.

Need to do:
- handle password protected downloads as failed

tret
Last edited by tret on January 17th, 2010, 2:53 pm, edited 1 time in total.
Smoke
Newbie
Newbie
Posts: 10
Joined: January 24th, 2010, 4:41 pm

Re: [Linux, MacOSX, Windows] Media Sorting + XBMC Updater

Post by Smoke »

I am completely new to both SABnzbd+ and this script ( and I know next to nothing about programming ), so I apologize in advance if my issue is a stupid mistake on my part, but I get the following error when I attempt to use this script which causes it to fail to move the file(s):

Code: Select all

Traceback (most recent call last):
  File "C:\PROGRA~2\SABnzbd\Scripts\media_sort.py", line 328, in <module>
    if verifySpaceAvailable(categorySource, categoryDestination) == 0:
  File "C:\PROGRA~2\SABnzbd\Scripts\media_sort.py", line 106, in verifySpaceAvailable
    if getStorageAvailable(source) != getStorageAvailable(dest):
  File "C:\PROGRA~2\SABnzbd\Scripts\media_sort.py", line 84, in getStorageAvailable
    disk = os.statvfs(path)
AttributeError: 'module' object has no attribute 'statvfs'
To provide more information, I am running Windows 7, have plenty of free space on all drives, and my Movie category settings look like:

Code: Select all

[Movies]
source = F:\Downloads\SABnzbd\Movies
destination = H:\Movies
min_download_size = 500MB
min_file_size = 200MB
xbmc_library = video
Is the problem with the source and destination paths in the settings.ini? Any help would be greatly appreciated!
tret
Full Member
Full Member
Posts: 148
Joined: August 2nd, 2008, 2:07 pm

Re: [Linux, MacOSX, Windows] Media Sorting + XBMC Updater

Post by tret »

Smoke wrote: I am completely new to both SABnzbd+ and this script ( and I know next to nothing about programming ), so I apologize in advance if my issue is a stupid mistake on my part, but I get the following error when I attempt to use this script which causes it to fail to move the file(s):

Code: Select all

Traceback (most recent call last):
  File "C:\PROGRA~2\SABnzbd\Scripts\media_sort.py", line 328, in <module>
    if verifySpaceAvailable(categorySource, categoryDestination) == 0:
  File "C:\PROGRA~2\SABnzbd\Scripts\media_sort.py", line 106, in verifySpaceAvailable
    if getStorageAvailable(source) != getStorageAvailable(dest):
  File "C:\PROGRA~2\SABnzbd\Scripts\media_sort.py", line 84, in getStorageAvailable
    disk = os.statvfs(path)
AttributeError: 'module' object has no attribute 'statvfs'
To provide more information, I am running Windows 7, have plenty of free space on all drives, and my Movie category settings look like:

Code: Select all

[Movies]
source = F:\Downloads\SABnzbd\Movies
destination = H:\Movies
min_download_size = 500MB
min_file_size = 200MB
xbmc_library = video
Is the problem with the source and destination paths in the settings.ini? Any help would be greatly appreciated!
You category settings look fine. What type of storage is at drive H? Is it a network share mapped to that drive letter? External drive?

Also what version of Python did you install on your Windows7 machine?

Rob
Smoke
Newbie
Newbie
Posts: 10
Joined: January 24th, 2010, 4:41 pm

Re: [Linux, MacOSX, Windows] Media Sorting + XBMC Updater

Post by Smoke »

tret wrote:
You category settings look fine. What type of storage is at drive H? Is it a network share mapped to that drive letter? External drive?

Also what version of Python did you install on your Windows7 machine?

Rob
Both F: and H: are local internal drives on the same computer that is running SABnzbd+. And I installed the Python 2.6.1 that is linked in the first post.
Briam
Newbie
Newbie
Posts: 7
Joined: January 27th, 2010, 1:03 am

Re: [Linux, MacOSX, Windows] Media Sorting + XBMC Updater

Post by Briam »

Hi

I use your script for my movies and it does an awesome job at that. Is it currently possible to get an artisk/album/song.mp3 structure? and if yes how? if no would you consider implementing it ? :)
fergalom
Newbie
Newbie
Posts: 2
Joined: January 19th, 2010, 4:45 pm

Re: [Linux, MacOSX, Windows] Media Sorting + XBMC Updater

Post by fergalom »

Hi,

Using your script and it works like a dream except for one issue.
My setup:
QNAP NAS with sabnzbd, all movies etc also stored on the nas
Ubuntu XBMC box attached to TV

Basically when I go to update XBMC library to find the movies your script has just moved, they are not found.
I have traced this back to the fact that they are being moved and becoming "hidden" files as a result of your script.
"ctrl+h" shows them in ubuntu but XBMC can't find them.

My settings have the permissions set as 0777

Any ideas how to solve?

Brilliant script otherwise.
F
tret
Full Member
Full Member
Posts: 148
Joined: August 2nd, 2008, 2:07 pm

Re: [Linux, MacOSX, Windows] Media Sorting + XBMC Updater

Post by tret »

Hey guys, due to a busy work schedule and many personal obligations I'm not able to actively develop this script. I may at some point work on fixing issues here and there but who knows when. If anyone would like to go ahead and pick this up and develop it further that's cool with me.

Rob
rahduke
Newbie
Newbie
Posts: 4
Joined: February 13th, 2010, 4:20 am

Re: [Linux, MacOSX, Windows] Media Sorting + XBMC Updater

Post by rahduke »

I ran this script and it deleted my entire media collection  :'( :'( :'(

WTF Happened?

http://pastebin.org/126409

Can someone take a look at this pastebin? Its the output from the script......

Every time I download something it deletes itself and everything else script related. I'm really heated right now. I'm sure it's my own fault for screwing something up but there should be a warning in 1st post if its possible to delete your entire collection.
tret
Full Member
Full Member
Posts: 148
Joined: August 2nd, 2008, 2:07 pm

Re: [Linux, MacOSX, Windows] Media Sorting + XBMC Updater

Post by tret »

rahduke wrote: I ran this script and it deleted my entire media collection  :'( :'( :'(

WTF Happened?

http://pastebin.org/126409

Can someone take a look at this pastebin? Its the output from the script......

Every time I download something it deletes itself and everything else script related. I'm really heated right now. I'm sure it's my own fault for screwing something up but there should be a warning in 1st post if its possible to delete your entire collection.
Hey rahduke, Sorry to hear about this man. Can you post your settings and categories files?
Post Reply