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

IndentationError: expected an indented block #16

Closed avluis closed 10 years ago

avluis commented 10 years ago

Hello there! I have been looking at your scripts for a while now and I had your sabToAniDB.py downloaded but unused. Today I decided to further automate my anime downloads (torrents for now) and make use of your script via a cron upon job completion (synoindex and notify).

I was able to run the script with no issue (besides a small issue with symbolic links, script does not seem to like those, but that was easy to fix, just point to the non-symbolic path).

I then noticed that you had updated your script and are now calling it nzbToAniDB so I got that downloaded and copied my prefered naming choices after making sure they were still the same but upon running the script I get the following error:

AVnet-DS> python nzbToAniDB.py /volume1/downloads/completed/anime/
File "anidb.py", line 489
updateCommand = '{"jsonrpc":"2.0","method":"VideoLibrary.Scan","params":{"directory":%s},"id":1}' % json.dumps(xbmc['path'] + subdir + '/')
^
IndentationError: expected an indented block

[http://pastebin.com/QELHYqmV]

This is what my config file looks like:

[AniDB] username = avluis password = xxxxxx suffix = avi ogm mkv mp4 wmv m4v directory = /volume1/video/anime/

[plex] host = sections =

[xbmc] host = port = user = password = path =

[rename] TVFormat = %ATr% - %EpNo% - %ETe% - [%GTs%]%Source% MovieFormat = %ATr% %EpNo% - [%GTs%][%FVideoRes%]%Source% OVAFormat = %ATr% %EpNo% - [%GTs%][%FVideoRes%]%Source% folderName = %ATr% TVDBEpisodeFormat = %ATe% - %TSE% (%EpNo%) - %TETe% [%GTs%][%FVideoRes%][%Source%]%Cen%[%FCRC%] TVDBFolderName = %TSTe% TVDBSeasonFolder = Season %TS% TVDBSpecialsFolder = Specials

[integration] nzbToAnidb_switches = --recursive --rename --add --move

[http://pastebin.com/r5mycfJ1]

Any ideas as to what may be going on?

Benni-chan commented 10 years ago

sorry about that, missed some spaces that should have been tabs in the last update. fixed and should work now (couldn't test, as i'm not at my own pc right now)

avluis commented 10 years ago

Just tested it, worked right away.

Thank you very much for addressing this so quickly!