Benni-chan / nzbToAniDB

postprocessing script for animes (to use with sabnzbd+ or nzbget or even as stand alone) to rename files after a sync with anidb.net. files can additionally be renamed via tvdb
24 stars 7 forks source link

Windows support #1

Closed heksesang closed 12 years ago

heksesang commented 12 years ago

It would be nice if you could add some support for Windows in the script. For example, make a check on os.name to see if it is a posix OS when doing shlex.split:

if os.name != "posix":
    args = shlex.split(command, posix=False)
else
    args = shlex.split(command, posix=True)

And maybe explicitly call python when you execute anidb.py, in case the OS for some reason fails to execute it in python automatically.

heksesang commented 12 years ago
path = path.replace(':', '')

This statement on line 270 in anidb.py needs to only be executed when os.name == "posix" because it messes up Windows paths.

Benni-chan commented 12 years ago

fixed per pull from heksesang