clinton-hall / nzbToMedia

Provides NZB and Torrent postprocessing To CouchPotatoServer, SickBeard/SickRage, HeadPhones, Mylar and Gamez
GNU General Public License v3.0
671 stars 176 forks source link

Option to remove part of release name #485

Closed TRaSH- closed 9 years ago

TRaSH- commented 10 years ago

because i use a external program for downloading my subs automatic i need to use scene/release naming. but sometimes some indexers/torrent sites add there own name in the filename. would be nice if we could add a option to remove that. example: The.Last.Ship.S01E02.1080p.WEB-DL.DD5.1.H.264-pcsyndicate[rarbg].mkv after process it would be The.Last.Ship.S01E02.1080p.WEB-DL.DD5.1.H.264-pcsyndicate.mkv so still keeping the credits to the real group.

clinton-hall commented 10 years ago

So basically remove the last sequence that is contained inside [] and rename the file?

Is this just for the subtitle search or are you saying this should be an option for passing to the user-script, or should this be a global option, done at the start of processing?

TRaSH- commented 10 years ago

sorry for the late reply, i was afk for work. i don't know if you already added it, or that nzbdrone added the option but it seems that that part is removed from the filenames now when nzbdrone processes it. so i think it can be closed then for me.

clinton-hall commented 10 years ago

Interesting... I hadn't added this yet.

I'll leAve this open for now as I want to test to see if subliminal returns subtitles better without this extra tag etc...

TRaSH- commented 9 years ago

it's me again ;) well i have found another one. Hawaii.Five-0.S04E01.1080p.WEB-DL.DD5.1.H.264-KiNGS-NZBgeek as you can see the indexer adds there name to the end of the file. the release name should be Hawaii.Five-0.S04E01.1080p.WEB-DL.DD5.1.H.264-KiNGS

clinton-hall commented 9 years ago

i could add a regex filter to the process exceptions. just strip off known tags from the end of the filename. so basically [rarbag] and -NZBgeek would be two replacement terms... then we could add the list as we go/ the problem is there is no clear standard to how this is, or should be, named. So identifying others is not simple... it would just be a case of adding to the list as we find them?

I could add a test for any 'extra stuff' following H.264-(some characters). then any word break (., -, etc) followed by some characters would be stripped off...(obviously we ignore the file extension)

TRaSH- commented 9 years ago

I think the regex filter sound good, As long as the user can add words to it.

Verzonden vanaf Samsung Mobile.

-------- Oorspronkelijk bericht --------
Van: Clinton Hall notifications@github.com
Datum:12-09-2014 22:10 (GMT+01:00)
Aan: clinton-hall/nzbToMedia nzbToMedia@noreply.github.com
Cc: TRaSH trash@anime-supreme.com
Onderwerp: Re: [nzbToMedia] Option to remove part of release name (#485)
i could add a regex filter to the process exceptions. just strip off known tags from the end of the filename. so basically [rarbag] and -NZBgeek would be two replacement terms... then we could add the list as we go/ the problem is there is no clear standard to how this is, or should be, named. So identifying others is not simple... it would just be a case of adding to the list as we find them? I could add a test for any 'extra stuff' following H.264-(some characters). then any word break (., -, etc) followed by some characters would be stripped off...(obviously we ignore the file extension) — Reply to this email directly or view it on GitHub.
clinton-hall commented 9 years ago

Ok.. this should be added in latest nightly. This is a custom thing you can add...

[Custom]
    # enter a list (comma separated) of Group Tags you want removed from filenames to help with subtitle matching.
    # e.g remove_group = [rarbag],-NZBgeek
    # be careful if your "group" is a common "real" word. Please report if you have any group replacments that would fall in this category.
    remove_group = 

I can look to add more logic later to not remove these from the middle of releases etc for "real word" groups.... But this is a start.

TRaSH- commented 9 years ago

seems it fails, edited the .cfg file as you explained.

[Custom]
    # enter a list (comma separated) of Group Tags you want removed from filenames to help with subtitle matching.
    # e.g remove_group = [rarbag],-NZBgeek
    # be careful if your "group" is a common "real" word. Please report if you have any group replacments that would fall in this category.
    remove_group = [rarbag],-NZBgeek

nzbget log

Sat Sep 20 09:16:08 2014    INFO    Executing post-process-script nzbToMedia\nzbToNzbDrone.py for Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL-NZBgeek
....
Github update blabla
....
Sat Sep 20 09:16:12 2014    INFO    nzbToNzbDrone: [09:16:12] [INFO]::MAIN: #########################################################
Sat Sep 20 09:16:12 2014    INFO    nzbToNzbDrone: [09:16:12] [INFO]::MAIN: ## ..::[nzbToMedia.pyc]::.. ##
Sat Sep 20 09:16:12 2014    INFO    nzbToNzbDrone: [09:16:12] [INFO]::MAIN: #########################################################
Sat Sep 20 09:16:12 2014    INFO    nzbToNzbDrone: [09:16:12] [DEBUG]::MAIN: Options passed into nzbToMedia: ['c:\\NZBGet\\scripts\\nzbToMedia\\nzbToNzbDrone.py', '*']
Sat Sep 20 09:16:12 2014    INFO    nzbToNzbDrone: [09:16:12] [INFO]::MAIN: Script triggered from NZBGet Version 14.0-testing-r1121.
Sat Sep 20 09:16:12 2014    INFO    nzbToNzbDrone: [09:16:12] [DEBUG]::MAIN: Adding NZB download info for directory D:\ServerFolders\UseNet-Complete\tv\Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL-NZBgeek to database
Sat Sep 20 09:16:12 2014    INFO    nzbToNzbDrone: [09:16:12] [DB]::MAIN: nzbtomedia.db: UPDATE downloads SET status = ?, client_agent = ?, last_update = ?, input_id = ?, input_hash = ?, input_name = ? WHERE input_directory = ? with args [0, u'nzbget', 735496, u'', u'', u'Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL-NZBgeek', u'D:\\ServerFolders\\UseNet-Complete\\tv\\Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL-NZBgeek']
Sat Sep 20 09:16:12 2014    INFO    nzbToNzbDrone: [09:16:12] [DB]::MAIN: nzbtomedia.db: INSERT OR IGNORE INTO downloads (status, client_agent, last_update, input_id, input_hash, input_name, input_directory) VALUES (?, ?, ?, ?, ?, ?, ?) with args [0, u'nzbget', 735496, u'', u'', u'Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL-NZBgeek', u'D:\\ServerFolders\\UseNet-Complete\\tv\\Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL-NZBgeek']
Sat Sep 20 09:16:12 2014    INFO    nzbToNzbDrone: [09:16:12] [INFO]::MAIN: Auto-detected SECTION:NzbDrone
Sat Sep 20 09:16:12 2014    INFO    nzbToNzbDrone: [09:16:12] [DEBUG]::MAIN: Checking for archives to extract in directory: D:\ServerFolders\UseNet-Complete\tv\Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL-NZBgeek
Sat Sep 20 09:16:12 2014    INFO    nzbToNzbDrone: [09:16:12] [INFO]::MAIN: Calling NzbDrone:tv to post-process:Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL-NZBgeek
Sat Sep 20 09:16:12 2014    INFO    nzbToNzbDrone: [09:16:12] [INFO]::MAIN: Attempting to verify tv fork
Sat Sep 20 09:16:12 2014    INFO    nzbToNzbDrone: [09:16:12] [INFO]::MAIN: NzbDrone:tv fork set to default
Sat Sep 20 09:16:12 2014    INFO    nzbToNzbDrone: [09:16:12] [DEBUG]::MAIN: calling command: c:\ffmpeg\bin\ffprobe.exe -v quiet -print_format json -show_format -show_streams -show_error c:\NZBGet\scripts\nzbToMedia\tests\test.mp4
Sat Sep 20 09:16:12 2014    INFO    nzbToNzbDrone: [09:16:12] [INFO]::TRANSCODER: Checking [Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL-NZBgeek.mkv] for corruption, please stand by ...
Sat Sep 20 09:16:12 2014    INFO    nzbToNzbDrone: [09:16:12] [DEBUG]::MAIN: calling command: c:\ffmpeg\bin\ffprobe.exe -v quiet -print_format json -show_format -show_streams -show_error D:\ServerFolders\UseNet-Complete\tv\Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL-NZBgeek\Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL-NZBgeek.mkv
Sat Sep 20 09:16:13 2014    INFO    nzbToNzbDrone: [09:16:13] [INFO]::TRANSCODER: SUCCESS: [Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL-NZBgeek.mkv] has no corruption.
Sat Sep 20 09:16:13 2014    INFO    nzbToNzbDrone: Traceback (most recent call last):
Sat Sep 20 09:16:13 2014    INFO    nzbToNzbDrone:   File "c:\NZBGet\scripts\nzbToMedia\nzbToNzbDrone.py", line 234, in <module>
Sat Sep 20 09:16:13 2014    INFO    nzbToNzbDrone:     result = nzbToMedia.main(sys.argv, section)
Sat Sep 20 09:16:13 2014    INFO    nzbToNzbDrone:   File "c:\NZBGet\scripts\nzbToMedia\nzbToMedia.py", line 677, in main
Sat Sep 20 09:16:13 2014    INFO    nzbToNzbDrone:     failureLink=failureLink)
Sat Sep 20 09:16:13 2014    INFO    nzbToNzbDrone:   File "c:\NZBGet\scripts\nzbToMedia\nzbToMedia.py", line 583, in process
Sat Sep 20 09:16:13 2014    INFO    nzbToNzbDrone:     inputCategory, failureLink)
Sat Sep 20 09:16:13 2014    INFO    nzbToNzbDrone:   File "c:\NZBGet\scripts\nzbToMedia\nzbtomedia\autoProcess\autoProcessTV.py", line 143, in processEpisode
Sat Sep 20 09:16:13 2014    INFO    nzbToNzbDrone:     process_all_exceptions(inputName, dirName)
Sat Sep 20 09:16:13 2014    INFO    nzbToNzbDrone:   File "c:\NZBGet\scripts\nzbToMedia\nzbtomedia\nzbToMediaSceneExceptions.py", line 37, in process_all_exceptions
Sat Sep 20 09:16:13 2014    INFO    nzbToNzbDrone:     newfilename = strip_groups(newfilename)
Sat Sep 20 09:16:13 2014    INFO    nzbToNzbDrone:   File "c:\NZBGet\scripts\nzbToMedia\nzbtomedia\nzbToMediaSceneExceptions.py", line 50, in strip_groups
Sat Sep 20 09:16:13 2014    INFO    nzbToNzbDrone:     newfilePath = os.path.join(dirname, newfile)
Sat Sep 20 09:16:13 2014    INFO    nzbToNzbDrone: NameError: global name 'dirname' is not defined
Sat Sep 20 09:16:13 2014    ERROR   Post-process-script nzbToMedia\nzbToNzbDrone.py for Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL-NZBgeek failed (terminated with unknown status)
Sat Sep 20 09:16:13 2014    INFO    Executing post-process-script Logger.py for Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL-NZBgeek
Sat Sep 20 09:16:13 2014    INFO    Post-process-script Logger.py for Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL-NZBgeek successful
Sat Sep 20 09:16:13 2014    INFO    Cleaning up download queue for Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL-NZBgeek
Sat Sep 20 09:16:13 2014    DETAIL  Deleting file 7f756ee55929dca71a095c21e51a55e3951d3fce.vol000+001.par2 from download queue
Sat Sep 20 09:16:13 2014    DETAIL  Deleting file 7f756ee55929dca71a095c21e51a55e3951d3fce.vol001+002.par2 from download queue
Sat Sep 20 09:16:13 2014    DETAIL  Deleting file 7f756ee55929dca71a095c21e51a55e3951d3fce.vol003+004.par2 from download queue
Sat Sep 20 09:16:13 2014    DETAIL  Deleting file 7f756ee55929dca71a095c21e51a55e3951d3fce.vol007+008.par2 from download queue
Sat Sep 20 09:16:13 2014    DETAIL  Deleting file 7f756ee55929dca71a095c21e51a55e3951d3fce.vol015+016.par2 from download queue
Sat Sep 20 09:16:13 2014    DETAIL  Deleting file 7f756ee55929dca71a095c21e51a55e3951d3fce.vol031+032.par2 from download queue
Sat Sep 20 09:16:13 2014    DETAIL  Deleting file 7f756ee55929dca71a095c21e51a55e3951d3fce.vol063+064.par2 from download queue
Sat Sep 20 09:16:13 2014    DETAIL  Deleting file 7f756ee55929dca71a095c21e51a55e3951d3fce.vol127+100.par2 from download queue
Sat Sep 20 09:16:13 2014    INFO    Collection Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL-NZBgeek added to history

nzbtomedia log

#########################################################
2014-09-20 09:16:12 INFO    ::MAIN: ## ..::[nzbToMedia.pyc]::.. ##
2014-09-20 09:16:12 INFO    ::MAIN: #########################################################
2014-09-20 09:16:12 DEBUG   ::MAIN: Options passed into nzbToMedia: ['c:\\NZBGet\\scripts\\nzbToMedia\\nzbToNzbDrone.py', '*']
2014-09-20 09:16:12 INFO    ::MAIN: Script triggered from NZBGet Version 14.0-testing-r1121.
2014-09-20 09:16:12 DEBUG   ::MAIN: Adding NZB download info for directory D:\ServerFolders\UseNet-Complete\tv\Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL-NZBgeek to database
2014-09-20 09:16:12 DB      ::MAIN: nzbtomedia.db: UPDATE downloads SET status = ?, client_agent = ?, last_update = ?, input_id = ?, input_hash = ?, input_name = ? WHERE input_directory = ? with args [0, u'nzbget', 735496, u'', u'', u'Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL-NZBgeek', u'D:\\ServerFolders\\UseNet-Complete\\tv\\Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL-NZBgeek']
2014-09-20 09:16:12 DB      ::MAIN: nzbtomedia.db: INSERT OR IGNORE INTO downloads (status, client_agent, last_update, input_id, input_hash, input_name, input_directory) VALUES (?, ?, ?, ?, ?, ?, ?) with args [0, u'nzbget', 735496, u'', u'', u'Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL-NZBgeek', u'D:\\ServerFolders\\UseNet-Complete\\tv\\Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL-NZBgeek']
2014-09-20 09:16:12 INFO    ::MAIN: Auto-detected SECTION:NzbDrone
2014-09-20 09:16:12 DEBUG   ::MAIN: Checking for archives to extract in directory: D:\ServerFolders\UseNet-Complete\tv\Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL-NZBgeek
2014-09-20 09:16:12 INFO    ::MAIN: Calling NzbDrone:tv to post-process:Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL-NZBgeek
2014-09-20 09:16:12 INFO    ::MAIN: Attempting to verify tv fork
2014-09-20 09:16:12 INFO    ::MAIN: NzbDrone:tv fork set to default
2014-09-20 09:16:12 DEBUG   ::MAIN: calling command: c:\ffmpeg\bin\ffprobe.exe -v quiet -print_format json -show_format -show_streams -show_error c:\NZBGet\scripts\nzbToMedia\tests\test.mp4
2014-09-20 09:16:12 INFO    ::TRANSCODER: Checking [Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL-NZBgeek.mkv] for corruption, please stand by ...
2014-09-20 09:16:12 DEBUG   ::MAIN: calling command: c:\ffmpeg\bin\ffprobe.exe -v quiet -print_format json -show_format -show_streams -show_error D:\ServerFolders\UseNet-Complete\tv\Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL-NZBgeek\Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL-NZBgeek.mkv
2014-09-20 09:16:13 INFO    ::TRANSCODER: SUCCESS: [Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL-NZBgeek.mkv] has no corruption. 
clinton-hall commented 9 years ago

hopefully this fixes it... can't believe I missed this. Please let me know how it goes.

TRaSH- commented 9 years ago

i did a postprocess again, or should i redownload it again ?

2014-09-20 14:03:57 INFO    ::MAIN: nzbToMedia Version:29a939ffaeb8d66e43fbe540a725835888f9931f Branch:nightly (Windows 2008ServerR2)
2014-09-20 14:03:57 DEBUG   ::MAIN: Connecting to utorrent: http://localhost:7000/gui/
2014-09-20 14:03:57 INFO    ::MAIN: #########################################################
2014-09-20 14:03:57 INFO    ::MAIN: ## ..::[nzbToMedia.pyc]::.. ##
2014-09-20 14:03:57 INFO    ::MAIN: #########################################################
2014-09-20 14:03:57 DEBUG   ::MAIN: Options passed into nzbToMedia: ['c:\\NZBGet\\scripts\\nzbToMedia\\nzbToNzbDrone.py', '*']
2014-09-20 14:03:57 INFO    ::MAIN: Script triggered from NZBGet Version 14.0-testing-r1121.
2014-09-20 14:03:57 DEBUG   ::MAIN: Adding NZB download info for directory D:\ServerFolders\UseNet-Complete\tv\Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL-NZBgeek to database
2014-09-20 14:03:57 DB      ::MAIN: nzbtomedia.db: UPDATE downloads SET status = ?, client_agent = ?, last_update = ?, input_id = ?, input_hash = ?, input_name = ? WHERE input_directory = ? with args [0, u'nzbget', 735496, u'', u'', u'Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL-NZBgeek', u'D:\\ServerFolders\\UseNet-Complete\\tv\\Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL-NZBgeek']
2014-09-20 14:03:57 INFO    ::MAIN: Auto-detected SECTION:NzbDrone
2014-09-20 14:03:57 DEBUG   ::MAIN: Checking for archives to extract in directory: D:\ServerFolders\UseNet-Complete\tv\Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL-NZBgeek
2014-09-20 14:03:57 INFO    ::MAIN: Calling NzbDrone:tv to post-process:Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL-NZBgeek
2014-09-20 14:03:57 INFO    ::MAIN: Attempting to verify tv fork
2014-09-20 14:03:57 INFO    ::MAIN: NzbDrone:tv fork set to default
2014-09-20 14:03:57 DEBUG   ::MAIN: calling command: c:\ffmpeg\bin\ffprobe.exe -v quiet -print_format json -show_format -show_streams -show_error c:\NZBGet\scripts\nzbToMedia\tests\test.mp4
2014-09-20 14:03:57 INFO    ::TRANSCODER: Checking [Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL-NZBgeek.mkv] for corruption, please stand by ...
2014-09-20 14:03:57 DEBUG   ::MAIN: calling command: c:\ffmpeg\bin\ffprobe.exe -v quiet -print_format json -show_format -show_streams -show_error D:\ServerFolders\UseNet-Complete\tv\Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL-NZBgeek\Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL-NZBgeek.mkv
2014-09-20 14:03:58 INFO    ::TRANSCODER: SUCCESS: [Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL-NZBgeek.mkv] has no corruption. 
Sat Sep 20 14:03:57 2014    INFO    nzbToNzbDrone: [14:03:57] [INFO]::MAIN: #########################################################
Sat Sep 20 14:03:57 2014    INFO    nzbToNzbDrone: [14:03:57] [INFO]::MAIN: ## ..::[nzbToMedia.pyc]::.. ##
Sat Sep 20 14:03:57 2014    INFO    nzbToNzbDrone: [14:03:57] [INFO]::MAIN: #########################################################
Sat Sep 20 14:03:57 2014    INFO    nzbToNzbDrone: [14:03:57] [DEBUG]::MAIN: Options passed into nzbToMedia: ['c:\\NZBGet\\scripts\\nzbToMedia\\nzbToNzbDrone.py', '*']
Sat Sep 20 14:03:57 2014    INFO    nzbToNzbDrone: [14:03:57] [INFO]::MAIN: Script triggered from NZBGet Version 14.0-testing-r1121.
Sat Sep 20 14:03:57 2014    INFO    nzbToNzbDrone: [14:03:57] [DEBUG]::MAIN: Adding NZB download info for directory D:\ServerFolders\UseNet-Complete\tv\Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL-NZBgeek to database
Sat Sep 20 14:03:57 2014    INFO    nzbToNzbDrone: [14:03:57] [DB]::MAIN: nzbtomedia.db: UPDATE downloads SET status = ?, client_agent = ?, last_update = ?, input_id = ?, input_hash = ?, input_name = ? WHERE input_directory = ? with args [0, u'nzbget', 735496, u'', u'', u'Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL-NZBgeek', u'D:\\ServerFolders\\UseNet-Complete\\tv\\Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL-NZBgeek']
Sat Sep 20 14:03:57 2014    INFO    nzbToNzbDrone: [14:03:57] [INFO]::MAIN: Auto-detected SECTION:NzbDrone
Sat Sep 20 14:03:57 2014    INFO    nzbToNzbDrone: [14:03:57] [DEBUG]::MAIN: Checking for archives to extract in directory: D:\ServerFolders\UseNet-Complete\tv\Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL-NZBgeek
Sat Sep 20 14:03:57 2014    INFO    nzbToNzbDrone: [14:03:57] [INFO]::MAIN: Calling NzbDrone:tv to post-process:Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL-NZBgeek
Sat Sep 20 14:03:57 2014    INFO    nzbToNzbDrone: [14:03:57] [INFO]::MAIN: Attempting to verify tv fork
Sat Sep 20 14:03:57 2014    INFO    nzbToNzbDrone: [14:03:57] [INFO]::MAIN: NzbDrone:tv fork set to default
Sat Sep 20 14:03:57 2014    INFO    nzbToNzbDrone: [14:03:57] [DEBUG]::MAIN: calling command: c:\ffmpeg\bin\ffprobe.exe -v quiet -print_format json -show_format -show_streams -show_error c:\NZBGet\scripts\nzbToMedia\tests\test.mp4
Sat Sep 20 14:03:57 2014    INFO    nzbToNzbDrone: [14:03:57] [INFO]::TRANSCODER: Checking [Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL-NZBgeek.mkv] for corruption, please stand by ...
Sat Sep 20 14:03:57 2014    INFO    nzbToNzbDrone: [14:03:57] [DEBUG]::MAIN: calling command: c:\ffmpeg\bin\ffprobe.exe -v quiet -print_format json -show_format -show_streams -show_error D:\ServerFolders\UseNet-Complete\tv\Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL-NZBgeek\Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL-NZBgeek.mkv
Sat Sep 20 14:03:58 2014    INFO    nzbToNzbDrone: [14:03:58] [INFO]::TRANSCODER: SUCCESS: [Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL-NZBgeek.mkv] has no corruption.
Sat Sep 20 14:03:58 2014    INFO    nzbToNzbDrone: Traceback (most recent call last):
Sat Sep 20 14:03:58 2014    INFO    nzbToNzbDrone:   File "c:\NZBGet\scripts\nzbToMedia\nzbToNzbDrone.py", line 234, in <module>
Sat Sep 20 14:03:58 2014    INFO    nzbToNzbDrone:     result = nzbToMedia.main(sys.argv, section)
Sat Sep 20 14:03:58 2014    INFO    nzbToNzbDrone:   File "c:\NZBGet\scripts\nzbToMedia\nzbToMedia.py", line 677, in main
Sat Sep 20 14:03:58 2014    INFO    nzbToNzbDrone:     failureLink=failureLink)
Sat Sep 20 14:03:58 2014    INFO    nzbToNzbDrone:   File "c:\NZBGet\scripts\nzbToMedia\nzbToMedia.py", line 583, in process
Sat Sep 20 14:03:58 2014    INFO    nzbToNzbDrone:     inputCategory, failureLink)
Sat Sep 20 14:03:58 2014    INFO    nzbToNzbDrone:   File "c:\NZBGet\scripts\nzbToMedia\nzbtomedia\autoProcess\autoProcessTV.py", line 143, in processEpisode
Sat Sep 20 14:03:58 2014    INFO    nzbToNzbDrone:     process_all_exceptions(inputName, dirName)
Sat Sep 20 14:03:58 2014    INFO    nzbToNzbDrone:   File "c:\NZBGet\scripts\nzbToMedia\nzbtomedia\nzbToMediaSceneExceptions.py", line 39, in process_all_exceptions
Sat Sep 20 14:03:58 2014    INFO    nzbToNzbDrone:     rename_file(filename, newfilename)
Sat Sep 20 14:03:58 2014    INFO    nzbToNzbDrone:   File "c:\NZBGet\scripts\nzbToMedia\nzbtomedia\nzbToMediaSceneExceptions.py", line 55, in rename_file
Sat Sep 20 14:03:58 2014    INFO    nzbToNzbDrone:     logger.debug("Replacing file name %s with download name %s" % (head, newname), "EXCEPTION")
Sat Sep 20 14:03:58 2014    INFO    nzbToNzbDrone: NameError: global name 'head' is not defined
Sat Sep 20 14:03:58 2014    ERROR   Post-process-script nzbToMedia\nzbToNzbDrone.py for Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL-NZBgeek failed (terminated with unknown status)
Sat Sep 20 14:03:58 2014    INFO    Executing post-process-script Logger.py for Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL-NZBgeek
Sat Sep 20 14:03:58 2014    INFO    Post-process-script Logger.py for Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL-NZBgeek successful
Sat Sep 20 14:03:58 2014    INFO    Collection Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL-NZBgeek added to history
clinton-hall commented 9 years ago

re-postprocess is fine... please try again (this should have been a simple change... but I really wasn't on my "A" game that day :( )

TRaSH- commented 9 years ago

well it looks like it works, it also removed the stuff that needs to be removed

2014-09-20 14:39:53 INFO    ::MAIN: #########################################################
2014-09-20 14:39:53 INFO    ::MAIN: ## ..::[nzbToMedia.pyc]::.. ##
2014-09-20 14:39:53 INFO    ::MAIN: #########################################################
2014-09-20 14:39:53 DEBUG   ::MAIN: Options passed into nzbToMedia: ['c:\\NZBGet\\scripts\\nzbToMedia\\nzbToNzbDrone.py', '*']
2014-09-20 14:39:53 INFO    ::MAIN: Script triggered from NZBGet Version 14.0-testing-r1121.
2014-09-20 14:39:53 DEBUG   ::MAIN: Adding NZB download info for directory D:\ServerFolders\UseNet-Complete\tv\Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL-NZBgeek to database
2014-09-20 14:39:53 DB      ::MAIN: nzbtomedia.db: UPDATE downloads SET status = ?, client_agent = ?, last_update = ?, input_id = ?, input_hash = ?, input_name = ? WHERE input_directory = ? with args [0, u'nzbget', 735496, u'', u'', u'Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL-NZBgeek', u'D:\\ServerFolders\\UseNet-Complete\\tv\\Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL-NZBgeek']
2014-09-20 14:39:53 INFO    ::MAIN: Auto-detected SECTION:NzbDrone
2014-09-20 14:39:53 DEBUG   ::MAIN: Checking for archives to extract in directory: D:\ServerFolders\UseNet-Complete\tv\Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL-NZBgeek
2014-09-20 14:39:53 INFO    ::MAIN: Calling NzbDrone:tv to post-process:Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL-NZBgeek
2014-09-20 14:39:53 INFO    ::MAIN: Attempting to verify tv fork
2014-09-20 14:39:53 INFO    ::MAIN: NzbDrone:tv fork set to default
2014-09-20 14:39:53 DEBUG   ::MAIN: calling command: c:\ffmpeg\bin\ffprobe.exe -v quiet -print_format json -show_format -show_streams -show_error c:\NZBGet\scripts\nzbToMedia\tests\test.mp4
2014-09-20 14:39:53 INFO    ::TRANSCODER: Checking [Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL-NZBgeek.mkv] for corruption, please stand by ...
2014-09-20 14:39:53 DEBUG   ::MAIN: calling command: c:\ffmpeg\bin\ffprobe.exe -v quiet -print_format json -show_format -show_streams -show_error D:\ServerFolders\UseNet-Complete\tv\Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL-NZBgeek\Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL-NZBgeek.mkv
2014-09-20 14:39:54 INFO    ::TRANSCODER: SUCCESS: [Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL-NZBgeek.mkv] has no corruption.
2014-09-20 14:39:54 DEBUG   ::EXCEPTION: Replacing file name D:\ServerFolders\UseNet-Complete\tv\Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL-NZBgeek\Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL-NZBgeek.mkv with download name D:\ServerFolders\UseNet-Complete\tv\Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL-NZBgeek\Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL.mkv
2014-09-20 14:39:54 INFO    ::MAIN: FLATTEN: Flattening directory: D:\ServerFolders\UseNet-Complete\tv\Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL-NZBgeek
2014-09-20 14:39:54 DEBUG   ::MAIN: Checking for empty folders in:D:\ServerFolders\UseNet-Complete\tv\Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL-NZBgeek
2014-09-20 14:39:54 INFO    ::MAIN: FLATTEN: Flattening directory: D:\ServerFolders\UseNet-Complete\tv\Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL-NZBgeek
2014-09-20 14:39:54 DEBUG   ::MAIN: Checking for empty folders in:D:\ServerFolders\UseNet-Complete\tv\Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL-NZBgeek
2014-09-20 14:39:54 POSTPROCESS::NZBDRONE: SUCCESS: The download succeeded, sending a post-process request
2014-09-20 14:39:54 DEBUG   ::NZBDRONE: path: D:\ServerFolders\UseNet-Complete\tv\Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL-NZBgeek
2014-09-20 14:39:54 DEBUG   ::NZBDRONE: Opening URL: http://localhost:8989/api/command with data: {"path": "D:\\ServerFolders\\UseNet-Complete\\tv\\Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL-NZBgeek", "name": "DownloadedEpisodesScan"}
2014-09-20 14:39:54 POSTPROCESS::NZBDRONE: {
2014-09-20 14:39:54 POSTPROCESS::NZBDRONE:   "name": "DownloadedEpisodesScan",
2014-09-20 14:39:54 POSTPROCESS::NZBDRONE:   "startedOn": "0001-01-01T00:00:00Z",
2014-09-20 14:39:54 POSTPROCESS::NZBDRONE:   "stateChangeTime": "2014-09-20T12:39:54.4439998Z",
2014-09-20 14:39:54 POSTPROCESS::NZBDRONE:   "sendUpdatesToClient": false,
2014-09-20 14:39:54 POSTPROCESS::NZBDRONE:   "state": "pending",
2014-09-20 14:39:54 POSTPROCESS::NZBDRONE:   "manual": true,
2014-09-20 14:39:54 POSTPROCESS::NZBDRONE:   "id": 16433
2014-09-20 14:39:54 POSTPROCESS::NZBDRONE: }
2014-09-20 14:41:55 DEBUG   ::NZBDRONE: The directory D:\ServerFolders\UseNet-Complete\tv\Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL-NZBgeek has been removed. Renaming was successful.
2014-09-20 14:41:55 DB      ::DB: Updating status of our download Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL-NZBgeek in the DB to 1
2014-09-20 14:41:55 DB      ::MAIN: nzbtomedia.db: UPDATE downloads SET status=?, last_update=? WHERE input_name=? with args [1, 735496, u'Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL-NZBgeek']
2014-09-20 14:41:55 INFO    ::CLEANDIR: Directory D:\ServerFolders\UseNet-Complete\tv\Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL-NZBgeek has been processed and removed ...
2014-09-20 14:41:55 INFO    ::MAIN: The c:\NZBGet\scripts\nzbToMedia\nzbToNzbDrone.py script completed successfully. 

but there's another issue now but it also removed a bit more

image

clinton-hall commented 9 years ago

is this in the final tv directory? if so, this was named by NZBDrone. Check the NZBDrone logs...

The name of the file passed to NZBDrone was D:\ServerFolders\UseNet-Complete\tv\Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL-NZBgeek\Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL.mkv

TRaSH- commented 9 years ago

nzbdrone isn't set to rename anything it's disabled. the nzbdrone is huge because it seems todo a refresh at the same time

clinton-hall commented 9 years ago

so what directory is this .mkv located in?

NZBDRONE: The directory D:\ServerFolders\UseNet-Complete\tv\Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL-NZBgeek has been removed. Renaming was successful. this suggests something (not nzbToMedia) has moved and renamed the files in this directory.

TRaSH- commented 9 years ago

the final directory where the file is located is I:\ServerFolders\TV\Resurrection\Season 01 here's the shortened nzbdrone log

14-9-20 15:21:29.3|Debug|Parser|Parsing string 'Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL-NZBgeek'
14-9-20 15:21:29.3|Debug|Parser|Episode Parsed. resurrection - S01E07 
14-9-20 15:21:29.3|Debug|Parser|Language parsed: English
14-9-20 15:21:29.3|Debug|NzbDrone.Core.Parser.QualityParser|Trying to parse quality for Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL-NZBgeek
14-9-20 15:21:29.3|Debug|Parser|Quality parsed: WEBDL-1080p
14-9-20 15:21:29.3|Debug|Parser|Release Group parsed: NZBgeek
14-9-20 15:21:29.3|Debug|NzbDrone.Core.Parser.QualityParser|Trying to parse quality for Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL-NZBgeek
14-9-20 15:21:29.3|Debug|DownloadedEpisodesImportService|Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL-NZBgeek folder quality: WEBDL-1080p
14-9-20 15:21:29.3|Debug|DiskScanService|Scanning 'D:\ServerFolders\UseNet-Complete\tv\Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL-NZBgeek' for video files
14-9-20 15:21:29.3|Debug|DiskScanService|1 video files were found in D:\ServerFolders\UseNet-Complete\tv\Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL-NZBgeek
14-9-20 15:21:29.3|Debug|ImportDecisionMaker|Analyzing 1/1 files.
14-9-20 15:21:29.3|Debug|Parser|Parsing string 'Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL.mkv'
14-9-20 15:21:29.3|Debug|Parser|Episode Parsed. resurrection - S01E07 
14-9-20 15:21:29.3|Debug|Parser|Language parsed: English
14-9-20 15:21:29.3|Debug|NzbDrone.Core.Parser.QualityParser|Trying to parse quality for Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL.mkv
14-9-20 15:21:29.3|Debug|Parser|Quality parsed: WEBDL-1080p
14-9-20 15:21:29.3|Debug|Parser|Release Group parsed: 
14-9-20 15:21:29.3|Debug|ImportDecisionMaker|Size: 1694689277
14-9-20 15:21:29.3|Debug|VideoFileInfoReader|Getting media info from D:\ServerFolders\UseNet-Complete\tv\Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL-NZBgeek\Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL.mkv
14-9-20 15:21:29.4|Debug|VideoFileInfoReader|Getting media info from D:\ServerFolders\UseNet-Complete\tv\Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL-NZBgeek\Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL.mkv
14-9-20 15:21:29.4|Debug|SampleService|Runtime is over 90 seconds
14-9-20 15:21:29.4|Debug|Parser|Parsing string 'Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL'
14-9-20 15:21:29.4|Debug|Parser|Episode Parsed. resurrection - S01E07 
14-9-20 15:21:29.4|Debug|Parser|Language parsed: English
14-9-20 15:21:29.4|Debug|NzbDrone.Core.Parser.QualityParser|Trying to parse quality for Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL
14-9-20 15:21:29.4|Debug|Parser|Quality parsed: WEBDL-1080p
14-9-20 15:21:29.4|Debug|Parser|Release Group parsed: 
14-9-20 15:21:29.4|Debug|EpisodeFileMovingService|Moving episode file: [0]  to I:\ServerFolders\TV\Resurrection\Season 01\.mkv
14-9-20 15:21:29.4|Debug|EpisodeFileMovingService|Move [D:\ServerFolders\UseNet-Complete\tv\Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL-NZBgeek\Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL.mkv] > [I:\ServerFolders\TV\Resurrection\Season 01\.mkv]
14-9-20 15:21:36.0|Debug|EpisodeFileMovingService|Setting last write time on series folder: I:\ServerFolders\TV\Resurrection
14-9-20 15:21:36.0|Warn|EpisodeFileMovingService|Unable to set last write time

System.IO.IOException: Kan geen toegang krijgen tot het bestand I:\ServerFolders\TV\Resurrection omdat het wordt gebruikt door een ander proces.
   bij System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   bij System.IO.Directory.OpenHandle(String path)
   bij System.IO.Directory.SetLastWriteTimeUtc(String path, DateTime lastWriteTimeUtc)
   bij NzbDrone.Common.Disk.DiskProviderBase.FolderSetLastWriteTimeUtc(String path, DateTime dateTime) in m:\BuildAgent2\work\328d72309b633a8\src\NzbDrone.Common\Disk\DiskProviderBase.cs:regel 317
   bij NzbDrone.Core.MediaFiles.EpisodeFileMovingService.SetFolderLastWriteTime(String path, DateTime time) in m:\BuildAgent2\work\328d72309b633a8\src\NzbDrone.Core\MediaFiles\EpisodeFileMovingService.cs:regel 210
   bij NzbDrone.Core.MediaFiles.EpisodeFileMovingService.TransferFile(EpisodeFile episodeFile, Series series, List`1 episodes, String destinationFilename, TransferMode mode) in m:\BuildAgent2\work\328d72309b633a8\src\NzbDrone.Core\MediaFiles\EpisodeFileMovingService.cs:regel 134

14-9-20 15:21:36.2|Debug|EpisodeService|Linking [Season 01\.mkv] > [[1873]Schemes of the Devil]
14-9-20 15:21:36.4|Debug|QualityUpgradableSpecification|Existing item meets cut-off. skipping.
14-9-20 15:21:36.4|Error|EventAggregator|HistoryService failed while processing [EpisodeImportedEvent]

System.Data.SQLite.SQLiteException (0x80004005): constraint failed
NOT NULL constraint failed: History.SourceTitle
   bij System.Data.SQLite.SQLite3.Reset(SQLiteStatement stmt)
   bij System.Data.SQLite.SQLite3.Step(SQLiteStatement stmt)
   bij System.Data.SQLite.SQLiteDataReader.NextResult()
   bij System.Data.SQLite.SQLiteDataReader..ctor(SQLiteCommand cmd, CommandBehavior behave)
   bij System.Data.SQLite.SQLiteCommand.ExecuteReader(CommandBehavior behavior)
   bij System.Data.SQLite.SQLiteCommand.ExecuteScalar()
   bij Marr.Data.QGen.InsertQueryBuilder`1.Execute() in m:\BuildAgent2\work\328d72309b633a8\src\Marr.Data\QGen\InsertQueryBuilder.cs:regel 138
   bij Marr.Data.DataMapper.Insert[T](T entity) in m:\BuildAgent2\work\328d72309b633a8\src\Marr.Data\DataMapper.cs:regel 728
   bij NzbDrone.Core.Datastore.BasicRepository`1.Insert(TModel model) in m:\BuildAgent2\work\328d72309b633a8\src\NzbDrone.Core\Datastore\BasicRepository.cs:regel 113
   bij NzbDrone.Core.History.HistoryService.Handle(EpisodeImportedEvent message) in m:\BuildAgent2\work\328d72309b633a8\src\NzbDrone.Core\History\HistoryService.cs:regel 182
   bij NzbDrone.Core.Messaging.Events.EventAggregator.PublishEvent[TEvent](TEvent event) in m:\BuildAgent2\work\328d72309b633a8\src\NzbDrone.Core\Messaging\Events\EventAggregator.cs:regel 56

14-9-20 15:21:36.4|Debug|XbmcMetadata|Generating Episode Metadata for: I:\ServerFolders\TV\Resurrection\Season 01\.mkv
14-9-20 15:21:36.4|Debug|MetadataService|Writing Episode Metadata to: I:\ServerFolders\TV\Resurrection\Season 01\.nfo
14-9-20 15:21:36.4|Debug|HttpClient|Downloading [http://slurm.trakt.us/images/episodes/23762-1-7.1.jpg] to [I:\ServerFolders\TV\Resurrection\Season 01\-thumb.jpg]
14-9-20 15:21:36.5|Debug|HttpClient|Downloading Completed. took 0s
TRaSH- commented 9 years ago

here a debug of nzbdrone without the nbtomedia custom option enabled

14-9-20 15:40:10.6|Debug|Parser|Parsing string 'Resurrection.S01E06.Home.1080p.WEB-DL.DD5.1.H.264-ECI'
14-9-20 15:40:10.6|Debug|Parser|Episode Parsed. resurrection - S01E06 
14-9-20 15:40:10.6|Debug|Parser|Language parsed: English
14-9-20 15:40:10.6|Debug|NzbDrone.Core.Parser.QualityParser|Trying to parse quality for Resurrection.S01E06.Home.1080p.WEB-DL.DD5.1.H.264-ECI
14-9-20 15:40:10.6|Debug|Parser|Quality parsed: WEBDL-1080p
14-9-20 15:40:10.6|Debug|Parser|Release Group parsed: ECI
14-9-20 15:40:10.6|Debug|NzbDrone.Core.Parser.QualityParser|Trying to parse quality for Resurrection.S01E06.Home.1080p.WEB-DL.DD5.1.H.264-ECI
14-9-20 15:40:10.6|Debug|DownloadedEpisodesImportService|Resurrection.S01E06.Home.1080p.WEB-DL.DD5.1.H.264-ECI folder quality: WEBDL-1080p
14-9-20 15:40:10.6|Debug|DiskScanService|Scanning 'D:\ServerFolders\UseNet-Complete\tv\Resurrection.S01E06.Home.1080p.WEB-DL.DD5.1.H.264-ECI' for video files
14-9-20 15:40:10.6|Debug|DiskScanService|1 video files were found in D:\ServerFolders\UseNet-Complete\tv\Resurrection.S01E06.Home.1080p.WEB-DL.DD5.1.H.264-ECI
14-9-20 15:40:10.8|Debug|ImportDecisionMaker|Analyzing 1/1 files.
14-9-20 15:40:10.8|Debug|Parser|Parsing string 'Resurrection.S01E06.Home.1080p.WEB-DL.DD5.1.H.264-ECI.mkv'
14-9-20 15:40:10.8|Debug|Parser|Episode Parsed. resurrection - S01E06 
14-9-20 15:40:10.8|Debug|Parser|Language parsed: English
14-9-20 15:40:10.8|Debug|NzbDrone.Core.Parser.QualityParser|Trying to parse quality for Resurrection.S01E06.Home.1080p.WEB-DL.DD5.1.H.264-ECI.mkv
14-9-20 15:40:10.8|Debug|Parser|Quality parsed: WEBDL-1080p
14-9-20 15:40:10.8|Debug|Parser|Release Group parsed: ECI
14-9-20 15:40:10.8|Debug|ImportDecisionMaker|Size: 1731250482
14-9-20 15:40:10.8|Debug|VideoFileInfoReader|Getting media info from D:\ServerFolders\UseNet-Complete\tv\Resurrection.S01E06.Home.1080p.WEB-DL.DD5.1.H.264-ECI\Resurrection.S01E06.Home.1080p.WEB-DL.DD5.1.H.264-ECI.mkv
14-9-20 15:40:10.8|Debug|VideoFileInfoReader|Getting media info from D:\ServerFolders\UseNet-Complete\tv\Resurrection.S01E06.Home.1080p.WEB-DL.DD5.1.H.264-ECI\Resurrection.S01E06.Home.1080p.WEB-DL.DD5.1.H.264-ECI.mkv
14-9-20 15:40:10.9|Debug|SampleService|Runtime is over 90 seconds
14-9-20 15:40:10.9|Debug|Parser|Parsing string 'Resurrection.S01E06.Home.1080p.WEB-DL.DD5.1.H.264-ECI'
14-9-20 15:40:10.9|Debug|Parser|Episode Parsed. resurrection - S01E06 
14-9-20 15:40:10.9|Debug|Parser|Language parsed: English
14-9-20 15:40:10.9|Debug|NzbDrone.Core.Parser.QualityParser|Trying to parse quality for Resurrection.S01E06.Home.1080p.WEB-DL.DD5.1.H.264-ECI
14-9-20 15:40:10.9|Debug|Parser|Quality parsed: WEBDL-1080p
14-9-20 15:40:10.9|Debug|Parser|Release Group parsed: ECI
14-9-20 15:40:10.9|Debug|UpgradeMediaFileService|Removing existing episode file: [406] Season 01\Resurrection.S01E06.Home.720p.WEB-DL.DD5.1.H.264-ECI.mkv
14-9-20 15:40:10.9|Debug|RecycleBinProvider|Attempting to send 'I:\ServerFolders\TV\Resurrection\Season 01\Resurrection.S01E06.Home.720p.WEB-DL.DD5.1.H.264-ECI.mkv' to recycling bin
14-9-20 15:40:10.9|Debug|RecycleBinProvider|Moving 'I:\ServerFolders\TV\Resurrection\Season 01\Resurrection.S01E06.Home.720p.WEB-DL.DD5.1.H.264-ECI.mkv' to 'I:\ServerFolders\TV-Canceled\Resurrection.S01E06.Home.720p.WEB-DL.DD5.1.H.264-ECI.mkv'
14-9-20 15:40:10.9|Debug|RecycleBinProvider|File has been moved to the recycling bin: I:\ServerFolders\TV-Canceled\Resurrection.S01E06.Home.720p.WEB-DL.DD5.1.H.264-ECI.mkv
14-9-20 15:40:11.0|Debug|EpisodeService|Detaching episode 1872 from file.
14-9-20 15:40:11.0|Debug|EpisodeFileMovingService|Moving episode file: [0]  to I:\ServerFolders\TV\Resurrection\Season 01\Resurrection.S01E06.Home.1080p.WEB-DL.DD5.1.H.264-ECI.mkv
14-9-20 15:40:11.0|Debug|EpisodeFileMovingService|Move [D:\ServerFolders\UseNet-Complete\tv\Resurrection.S01E06.Home.1080p.WEB-DL.DD5.1.H.264-ECI\Resurrection.S01E06.Home.1080p.WEB-DL.DD5.1.H.264-ECI.mkv] > [I:\ServerFolders\TV\Resurrection\Season 01\Resurrection.S01E06.Home.1080p.WEB-DL.DD5.1.H.264-ECI.mkv]
14-9-20 15:40:11.2|Debug|MetadataFileService|Deleting Metadata from database for episode file: [406] Season 01\Resurrection.S01E06.Home.720p.WEB-DL.DD5.1.H.264-ECI.mkv
14-9-20 15:40:16.1|Debug|EpisodeFileMovingService|Setting last write time on series folder: I:\ServerFolders\TV\Resurrection
14-9-20 15:40:16.1|Warn|EpisodeFileMovingService|Unable to set last write time

System.IO.IOException: Kan geen toegang krijgen tot het bestand I:\ServerFolders\TV\Resurrection omdat het wordt gebruikt door een ander proces.
   bij System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   bij System.IO.Directory.OpenHandle(String path)
   bij System.IO.Directory.SetLastWriteTimeUtc(String path, DateTime lastWriteTimeUtc)
   bij NzbDrone.Common.Disk.DiskProviderBase.FolderSetLastWriteTimeUtc(String path, DateTime dateTime) in m:\BuildAgent2\work\328d72309b633a8\src\NzbDrone.Common\Disk\DiskProviderBase.cs:regel 317
   bij NzbDrone.Core.MediaFiles.EpisodeFileMovingService.SetFolderLastWriteTime(String path, DateTime time) in m:\BuildAgent2\work\328d72309b633a8\src\NzbDrone.Core\MediaFiles\EpisodeFileMovingService.cs:regel 210
   bij NzbDrone.Core.MediaFiles.EpisodeFileMovingService.TransferFile(EpisodeFile episodeFile, Series series, List`1 episodes, String destinationFilename, TransferMode mode) in m:\BuildAgent2\work\328d72309b633a8\src\NzbDrone.Core\MediaFiles\EpisodeFileMovingService.cs:regel 134

14-9-20 15:40:16.4|Debug|EpisodeService|Linking [Season 01\Resurrection.S01E06.Home.1080p.WEB-DL.DD5.1.H.264-ECI.mkv] > [[1872]Home]
14-9-20 15:40:16.5|Debug|QualityUpgradableSpecification|Existing item meets cut-off. skipping.
clinton-hall commented 9 years ago

So the file is named correctly by nzbToMedia..

VideoFileInfoReader|Getting media info from D:\ServerFolders\UseNet-Complete\tv\Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL-NZBgeek\Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL.mkv
14-9-20 15:21:29.4|Debug|VideoFileInfoReader|Getting media info from D:\ServerFolders\UseNet-Complete\tv\Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL-NZBgeek\Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL.mkv

But then NZBDrone fails to determine the group and therefore can't rename correctly

14-9-20 15:21:29.4|Debug|Parser|Release Group parsed: 
14-9-20 15:21:29.4|Debug|EpisodeFileMovingService|Moving episode file: [0]  to I:\ServerFolders\TV\Resurrection\Season 01\.mkv
14-9-20 15:21:29.4|Debug|EpisodeFileMovingService|Move [D:\ServerFolders\UseNet-Complete\tv\Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL-NZBgeek\Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL.mkv] > [I:\ServerFolders\TV\Resurrection\Season 01\.mkv]

In the successful processing it finds the group

Parser|Release Group parsed: ECI

This appears to be a bug with NZBdrone... a simple rename of the file shouldn't cause this. I am confident this group replacement will work with SickBeard... I know this script is not causing this name-less (extension only) file... why this changed filename is killing NZBDrone's renaming is curious...

TRaSH- commented 9 years ago

but why would nzbdrone rename it ?

image

going to post on usenet a test without release group, and disable the option in nzbtomedia to see what happens. but that will take at least 1 hour to test.

TRaSH- commented 9 years ago

yep you're right, i uploaded the same file without a release group and disabled the option in nzbToMedia. and it turns out the same thing happens. weird that nzbdrone renames the file even that i tell it it shouldn't. reporting the issue to nzbdrone http://forums.nzbdrone.com/t/if-no-release-group-the-file-is-beeing-renamed-to-nothing/2102/1

14-9-20 18:34:33.9|Debug|Parser|Parsing string 'Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL'
14-9-20 18:34:33.9|Debug|Parser|Episode Parsed. resurrection - S01E07 
14-9-20 18:34:33.9|Debug|Parser|Language parsed: English
14-9-20 18:34:33.9|Debug|NzbDrone.Core.Parser.QualityParser|Trying to parse quality for Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL
14-9-20 18:34:33.9|Debug|Parser|Quality parsed: WEBDL-1080p
14-9-20 18:34:33.9|Debug|Parser|Release Group parsed: 
14-9-20 18:34:33.9|Debug|NzbDrone.Core.Parser.QualityParser|Trying to parse quality for Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL
14-9-20 18:34:33.9|Debug|DownloadedEpisodesImportService|Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL folder quality: WEBDL-1080p
14-9-20 18:34:33.9|Debug|DiskScanService|Scanning 'D:\ServerFolders\UseNet-Complete\tv\Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL' for video files
14-9-20 18:34:34.0|Debug|DiskScanService|1 video files were found in D:\ServerFolders\UseNet-Complete\tv\Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL
14-9-20 18:34:34.0|Debug|ImportDecisionMaker|Analyzing 1/1 files.
14-9-20 18:34:34.0|Debug|Parser|Parsing string 'Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL.mkv'
14-9-20 18:34:34.0|Debug|Parser|Episode Parsed. resurrection - S01E07 
14-9-20 18:34:34.0|Debug|Parser|Language parsed: English
14-9-20 18:34:34.0|Debug|NzbDrone.Core.Parser.QualityParser|Trying to parse quality for Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL.mkv
14-9-20 18:34:34.0|Debug|Parser|Quality parsed: WEBDL-1080p
14-9-20 18:34:34.0|Debug|Parser|Release Group parsed: 
14-9-20 18:34:34.1|Debug|ImportDecisionMaker|Size: 1694689277
14-9-20 18:34:34.1|Debug|VideoFileInfoReader|Getting media info from D:\ServerFolders\UseNet-Complete\tv\Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL\Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL.mkv
14-9-20 18:34:34.3|Debug|VideoFileInfoReader|Getting media info from D:\ServerFolders\UseNet-Complete\tv\Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL\Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL.mkv
14-9-20 18:34:34.3|Debug|SampleService|Runtime is over 90 seconds
14-9-20 18:34:34.3|Debug|Parser|Parsing string 'Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL'
14-9-20 18:34:34.3|Debug|Parser|Episode Parsed. resurrection - S01E07 
14-9-20 18:34:34.4|Debug|Parser|Language parsed: English
14-9-20 18:34:34.4|Debug|NzbDrone.Core.Parser.QualityParser|Trying to parse quality for Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL
14-9-20 18:34:34.4|Debug|Parser|Quality parsed: WEBDL-1080p
14-9-20 18:34:34.4|Debug|Parser|Release Group parsed: 
14-9-20 18:34:34.4|Debug|EpisodeFileMovingService|Moving episode file: [0]  to I:\ServerFolders\TV\Resurrection\Season 01\.mkv
14-9-20 18:34:34.4|Debug|EpisodeFileMovingService|Move [D:\ServerFolders\UseNet-Complete\tv\Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL\Resurrection.S01E07.Schemes.Of.The.Devil.1080p.WEB-DL.mkv] > [I:\ServerFolders\TV\Resurrection\Season 01\.mkv]
14-9-20 18:34:39.6|Debug|EpisodeFileMovingService|Setting last write time on series folder: I:\ServerFolders\TV\Resurrection
14-9-20 18:34:39.6|Warn|EpisodeFileMovingService|Unable to set last write time

System.IO.IOException: Kan geen toegang krijgen tot het bestand I:\ServerFolders\TV\Resurrection omdat het wordt gebruikt door een ander proces.
   bij System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   bij System.IO.Directory.OpenHandle(String path)
   bij System.IO.Directory.SetLastWriteTimeUtc(String path, DateTime lastWriteTimeUtc)
   bij NzbDrone.Common.Disk.DiskProviderBase.FolderSetLastWriteTimeUtc(String path, DateTime dateTime) in m:\BuildAgent2\work\328d72309b633a8\src\NzbDrone.Common\Disk\DiskProviderBase.cs:regel 317
   bij NzbDrone.Core.MediaFiles.EpisodeFileMovingService.SetFolderLastWriteTime(String path, DateTime time) in m:\BuildAgent2\work\328d72309b633a8\src\NzbDrone.Core\MediaFiles\EpisodeFileMovingService.cs:regel 210
   bij NzbDrone.Core.MediaFiles.EpisodeFileMovingService.TransferFile(EpisodeFile episodeFile, Series series, List`1 episodes, String destinationFilename, TransferMode mode) in m:\BuildAgent2\work\328d72309b633a8\src\NzbDrone.Core\MediaFiles\EpisodeFileMovingService.cs:regel 134

14-9-20 18:34:39.6|Debug|EpisodeService|Linking [Season 01\.mkv] > [[1873]Schemes of the Devil]
14-9-20 18:34:39.7|Debug|QualityUpgradableSpecification|Existing item meets cut-off. skipping.
14-9-20 18:34:39.7|Error|EventAggregator|HistoryService failed while processing [EpisodeImportedEvent]
clinton-hall commented 9 years ago

but this is the whole point of nzbToMedia. NZBDrone doesn't do "automated" renaming, but it does still do the renaming when triggered by nzbToMedia.

With SickBeard and CouchPotato it is the same, these don't scan the folder on their own, but this script passes them the files/location and tells them to do their thing.

this was the "loop" is still closed. all downloaded releases are marked as downloaded, or failed downloads are ignored and another is snatched etc. Also, this uses the built in naming features of SickBeards, CouchPotato NZBDrone, so I don't try and recreate these.

This is why the particular script is called nzbToNzbDrone (it does send the download TO NZBDrone).

As far as I can see, the major issue here is that NZBDrone freaks out when the release group is removed... This needs to be fixed.

As far as disabling the renamer, I thought that option only disabled the automatic scanning... so you might want some clarification on that from the NZBDrone team.

TRaSH- commented 9 years ago

working on it, seems they fixed it in the devolpment branch, but i'm also testing there torrent branch and that one lacks on patches from the devolpment patch. as soon as they get it fixed i will report back

clinton-hall commented 9 years ago

cool, let me know how it goes.

TRaSH- commented 9 years ago

fixed and working now. with the torrent and devolpment version of nzbdrone

clinton-hall commented 9 years ago

Great news.

Taloth commented 9 years ago

@clinton-hall The renamer is unrelated to importing. If the renamer is disabled is simply uses the original filename. A recent change related to handling hashed releases is what went wrong when renaming is disabled.

Drone actually has two different importing mechanisms. One is the dumb Drone Factory, which periodically scans the directory, and only had an unpack detection. The second is Completed Download Handling (CDH for short), this one periodically checks the download client api to see if something is finished. Since it talks directly to the download client, drone will wait for any pp-script to finish. It also reports progress and errors better on the UI. A while back I added a trello card to detect nzbToMedia notifications while CDH is enabled and trigger a scan instead. But I haven't gotten around to deal with that. https://trello.com/c/IifaxoMF/746-nzbtomedia-triggered-drone-factory-scan-with-cdh-enabled-causes-conflicts

If you have comments or questions, please let me know.

clinton-hall commented 9 years ago

@Taloth Thanks for the clarification. So from your side, should I add an option to Process all the corruption checks etc and NOT send the DownloadEpisodeScan command, or otherwise remove this? What if the download was a manual download (not snatched by NZBDrone, or even a Torrent Download)? How is this handled by NZBDrone?

I recognise that nzbToMedia is not needed specifically, and NZBDrone can handle end-to-end processing. Similar (but obviously not the same as ) SickBeard and CouchPotato, I offer nzbToMedia as an alternative... There are a few extra features which I try to throw in as requested, but primarily this started to avoid the need for constant directory scanning on small arm NAS etc. Obviously the api polling to the downloader itself has improved this situation, but I just kept adding new features and the script kinda grew ;)

So, I'm happy to try and improve this so that it doesn't conflict with anything in NZBDrone. As it was I tried to use what seemed to be an intended api command...

Taloth commented 9 years ago

That kinda depends on how you notify drone, if you just call the endpoint and do nothing else, then I could just adjust drone to ignore those api calls. But if you're actually waiting for drone to process it, that could be a problem. I'm also how you do that when drone & sab run on different computers.

clinton-hall commented 9 years ago

When Drone and the downloader are on different computers, I actually have a "mount points" setting. So if you say /usr/share/download (local) is mounted as F:\downloads on another system then the paths are change and /usr/share/download/series/myshow would be passed to drone as F:\downloads\series\myshow

The script does wait for confirmation of change to total number of episodes wanted (so if this changes, we are confident the episode was processed and we can then delete any leftovers etc... It only waits a maximum of 2 minutes (I think this can be customized, I'd need to check). The only place where t could get stuck is if drone never returned any response to the api call. This would cause nzbToMedia to hang.

Taloth commented 9 years ago

So similar to what Drone does with remote paths, that's good.

My concern is that if I respond to the api call but don't actually do anything, nzbToMedia might mark the download as failed. If that happens, drone won't import it. Neither can I try process the download during the api call, coz the download is still in the pp-script stage.

I'm beginning to think it might be best if you add a config option. You might also try access the drone api to get the configuration option via the endpoint "/api/config/downloadClient" which returns an object with "enableCompletedDownloadHandling": true.

Lemme know which option you prefer, drone ignoring the api-call or you detecting/configuring it.

clinton-hall commented 9 years ago

Currently, if we can't verify status change, the script does exit with an error status. This could be changed... would need to look into that.

Just to confirm, if we call /api/config/downloadClient and verify enableCompletedDownloadHandling: true then we can just exit as success and know that drone will complete the process?

what happens if this is a manual download? Presumably drone won't be watching this download? Would there be an easy way to tell drone that there is a new download to watch?

Taloth commented 9 years ago

As long as the manual download is in the category configured for drone, drone will attempt to import those as well. It won't do that if a black category was configured, to avoid conflicts with other downloads.

And yes, if that configuration option is enabled, drone will automatically import. If the user incorrectly configured drone that prevents the import, he will get a warning.

clinton-hall commented 9 years ago

Ok... this now checks in CHD enabled in drone. If so (and the script is called by SABnzbd/NZBGet then it will exit wit successful status and let drone handle the rest.

TRaSH- commented 9 years ago

so this means that nzbToMedia now fully works with complete CDH ?

Taloth commented 9 years ago

Did a quick test on my dev machine, seems to work as intended. Thanks for that.

One detail in the wiki though: (could probably edit it myself, but this way you know about it) The user must either have Drone Factory folder pointing to another dir OR leave it blank. Setting the interval to 0 is not enough. If CDH detects a download that resides inside the Drone Factory (disregarding the interval) it will refuse to import, expecting the Drone Factory to do it. This was done to prevent manual Drone Factory scans (via the drone UI or via the API) to conflict with CDH. It also helped detect whether a user incorrectly migrated to CDH.

TRaSH- commented 9 years ago

i tried this(turned on CDH in nzbdrone) with a torrent that i manually forced. (same what would happen when the rss feed triggers a download), but i'm running in to some issues now that worked before without any issues. when the torrent is finished it calls nzbToMedia, the it's get's PP by nzbToMedia. and it sends it to nzbdrone. nzbdrone then moves the file to the final destination bus renames it kinda weird by adding a extra .mk to it. it then also PP the file that nzbToMedia sends to it. resulting in: 2x the same file 1 of it wrong because of the double .mkv in it. and the main file get's moved so it isn't able to seed anymore.

nzbToMedia log

2014-09-25 21:11:32 INFO    ::MAIN: nzbToMedia Version:5653134596b3571eff78a1bd5f583e3515c23756 Branch:nightly (Windows 2008ServerR2)
2014-09-25 21:11:32 DEBUG   ::MAIN: Connecting to utorrent: http://localhost:7000/gui/
2014-09-25 21:11:32 INFO    ::MAIN: #########################################################
2014-09-25 21:11:32 INFO    ::MAIN: ## ..::[TorrentToMedia.py]::.. ##
2014-09-25 21:11:32 INFO    ::MAIN: #########################################################
2014-09-25 21:11:32 DEBUG   ::MAIN: Options passed into TorrentToMedia: ['C:\\NZBGet\\scripts\\nzbToMedia\\TorrentToMedia.py', 'D:\\ServerFolders\\Torrents-Complete\\tv', 'Person.of.Interest.S04E01.1080p.WEB-DL.DD5.1.H.264-KiNGS.mkv', 'tv', 'AD810A023A1682BEB4999A7BE3C5FC70307D52F9']
2014-09-25 21:11:32 DEBUG   ::MAIN: Adding TORRENT download info for directory D:\ServerFolders\Torrents-Complete\tv to database
2014-09-25 21:11:32 DB      ::MAIN: nzbtomedia.db: UPDATE downloads SET status = ?, client_agent = ?, last_update = ?, input_id = ?, input_hash = ?, input_name = ? WHERE input_directory = ? with args [0, u'utorrent', 735501, u'AD810A023A1682BEB4999A7BE3C5FC70307D52F9', u'AD810A023A1682BEB4999A7BE3C5FC70307D52F9', u'Person.of.Interest.S04E01.1080p.WEB-DL.DD5.1.H.264-KiNGS.mkv', u'D:\\ServerFolders\\Torrents-Complete\\tv']
2014-09-25 21:11:32 DB      ::MAIN: nzbtomedia.db: INSERT OR IGNORE INTO downloads (status, client_agent, last_update, input_id, input_hash, input_name, input_directory) VALUES (?, ?, ?, ?, ?, ?, ?) with args [0, u'utorrent', 735501, u'AD810A023A1682BEB4999A7BE3C5FC70307D52F9', u'AD810A023A1682BEB4999A7BE3C5FC70307D52F9', u'Person.of.Interest.S04E01.1080p.WEB-DL.DD5.1.H.264-KiNGS.mkv', u'D:\\ServerFolders\\Torrents-Complete\\tv']
2014-09-25 21:11:33 DEBUG   ::MAIN: Received Directory: D:\ServerFolders\Torrents-Complete\tv | Name: Person.of.Interest.S04E01.1080p.WEB-DL.DD5.1.H.264-KiNGS.mkv | Category: tv
2014-09-25 21:11:33 DEBUG   ::MAIN: SEARCH: Found the Category: tv in directory structure
2014-09-25 21:11:33 INFO    ::MAIN: SEARCH: Found torrent file Person.of.Interest.S04E01.1080p.WEB-DL.DD5.1.H.264-KiNGS.mkv in input directory directory D:\ServerFolders\Torrents-Complete\tv
2014-09-25 21:11:33 INFO    ::MAIN: SEARCH: Setting inputDirectory to D:\ServerFolders\Torrents-Complete\tv\Person.of.Interest.S04E01.1080p.WEB-DL.DD5.1.H.264-KiNGS.mkv
2014-09-25 21:11:33 DEBUG   ::MAIN: Determined Directory: D:\ServerFolders\Torrents-Complete\tv\Person.of.Interest.S04E01.1080p.WEB-DL.DD5.1.H.264-KiNGS.mkv | Name: Person.of.Interest.S04E01.1080p.WEB-DL.DD5.1.H.264-KiNGS.mkv | Category: tv
2014-09-25 21:11:33 INFO    ::MAIN: Auto-detected SECTION:NzbDrone
2014-09-25 21:11:33 DEBUG   ::MAIN: Stopping torrent Person.of.Interest.S04E01.1080p.WEB-DL.DD5.1.H.264-KiNGS.mkv in utorrent while processing
2014-09-25 21:11:38 INFO    ::MAIN: Output directory set to: D:\ServerFolders\Torrents-Processed\tv\Person.of.Interest.S04E01.1080p.WEB-DL.DD5.1.H.264-KiNGS.mkv
2014-09-25 21:11:38 DEBUG   ::MAIN: Scanning files in directory: D:\ServerFolders\Torrents-Complete\tv\Person.of.Interest.S04E01.1080p.WEB-DL.DD5.1.H.264-KiNGS.mkv
2014-09-25 21:11:38 DEBUG   ::MAIN: Found 1 files in D:\ServerFolders\Torrents-Complete\tv\Person.of.Interest.S04E01.1080p.WEB-DL.DD5.1.H.264-KiNGS.mkv
2014-09-25 21:11:38 INFO    ::COPYLINK: MEDIAFILE: [Person.of.Interest.S04E01.1080p.WEB-DL.DD5.1.H.264-KiNGS.mkv]
2014-09-25 21:11:38 INFO    ::COPYLINK: SOURCE FOLDER: [D:\ServerFolders\Torrents-Complete\tv]
2014-09-25 21:11:38 INFO    ::COPYLINK: TARGET FOLDER: [D:\ServerFolders\Torrents-Processed\tv\Person.of.Interest.S04E01.1080p.WEB-DL.DD5.1.H.264-KiNGS.mkv]
2014-09-25 21:11:38 INFO    ::COPYLINK: Hard linking SOURCE MEDIAFILE -> TARGET FOLDER
2014-09-25 21:11:38 DEBUG   ::MAIN: Checking for archives to extract in directory: D:\ServerFolders\Torrents-Processed\tv\Person.of.Interest.S04E01.1080p.WEB-DL.DD5.1.H.264-KiNGS.mkv
2014-09-25 21:11:38 INFO    ::MAIN: FLATTEN: Flattening directory: D:\ServerFolders\Torrents-Processed\tv\Person.of.Interest.S04E01.1080p.WEB-DL.DD5.1.H.264-KiNGS.mkv
2014-09-25 21:11:38 DEBUG   ::MAIN: Checking for empty folders in:D:\ServerFolders\Torrents-Processed\tv\Person.of.Interest.S04E01.1080p.WEB-DL.DD5.1.H.264-KiNGS.mkv
2014-09-25 21:11:38 INFO    ::MAIN: Found 1 media files in D:\ServerFolders\Torrents-Processed\tv\Person.of.Interest.S04E01.1080p.WEB-DL.DD5.1.H.264-KiNGS.mkv
2014-09-25 21:11:38 INFO    ::MAIN: Calling NzbDrone:tv to post-process:Person.of.Interest.S04E01.1080p.WEB-DL.DD5.1.H.264-KiNGS.mkv
2014-09-25 21:11:38 INFO    ::MAIN: Attempting to verify tv fork
2014-09-25 21:11:38 INFO    ::MAIN: NzbDrone:tv fork set to default
2014-09-25 21:11:38 DEBUG   ::MAIN: calling command: c:\ffmpeg\bin\ffprobe.exe -v quiet -print_format json -show_format -show_streams -show_error C:\NZBGet\scripts\nzbToMedia\tests\test.mp4
2014-09-25 21:11:38 INFO    ::TRANSCODER: Checking [Person.of.Interest.S04E01.1080p.WEB-DL.DD5.1.H.264-KiNGS.mkv] for corruption, please stand by ...
2014-09-25 21:11:38 DEBUG   ::MAIN: calling command: c:\ffmpeg\bin\ffprobe.exe -v quiet -print_format json -show_format -show_streams -show_error D:\ServerFolders\Torrents-Processed\tv\Person.of.Interest.S04E01.1080p.WEB-DL.DD5.1.H.264-KiNGS.mkv\Person.of.Interest.S04E01.1080p.WEB-DL.DD5.1.H.264-KiNGS.mkv
2014-09-25 21:11:39 INFO    ::TRANSCODER: SUCCESS: [Person.of.Interest.S04E01.1080p.WEB-DL.DD5.1.H.264-KiNGS.mkv] has no corruption.
2014-09-25 21:11:39 INFO    ::MAIN: FLATTEN: Flattening directory: D:\ServerFolders\Torrents-Processed\tv\Person.of.Interest.S04E01.1080p.WEB-DL.DD5.1.H.264-KiNGS.mkv
2014-09-25 21:11:39 DEBUG   ::MAIN: Checking for empty folders in:D:\ServerFolders\Torrents-Processed\tv\Person.of.Interest.S04E01.1080p.WEB-DL.DD5.1.H.264-KiNGS.mkv
2014-09-25 21:11:39 INFO    ::MAIN: FLATTEN: Flattening directory: D:\ServerFolders\Torrents-Processed\tv\Person.of.Interest.S04E01.1080p.WEB-DL.DD5.1.H.264-KiNGS.mkv
2014-09-25 21:11:39 DEBUG   ::MAIN: Checking for empty folders in:D:\ServerFolders\Torrents-Processed\tv\Person.of.Interest.S04E01.1080p.WEB-DL.DD5.1.H.264-KiNGS.mkv
2014-09-25 21:11:39 POSTPROCESS::NZBDRONE: SUCCESS: The download succeeded, sending a post-process request
2014-09-25 21:11:39 DEBUG   ::NZBDRONE: path: D:\ServerFolders\Torrents-Processed\tv\Person.of.Interest.S04E01.1080p.WEB-DL.DD5.1.H.264-KiNGS.mkv
2014-09-25 21:11:39 DEBUG   ::NZBDRONE: Opening URL: http://localhost:8989/api/command with data: {"path": "D:\\ServerFolders\\Torrents-Processed\\tv\\Person.of.Interest.S04E01.1080p.WEB-DL.DD5.1.H.264-KiNGS.mkv", "name": "DownloadedEpisodesScan"}
2014-09-25 21:11:39 POSTPROCESS::NZBDRONE: {
2014-09-25 21:11:39 POSTPROCESS::NZBDRONE:   "name": "DownloadedEpisodesScan",
2014-09-25 21:11:39 POSTPROCESS::NZBDRONE:   "startedOn": "0001-01-01T00:00:00Z",
2014-09-25 21:11:39 POSTPROCESS::NZBDRONE:   "stateChangeTime": "2014-09-25T19:11:39.2801245Z",
2014-09-25 21:11:39 POSTPROCESS::NZBDRONE:   "sendUpdatesToClient": false,
2014-09-25 21:11:39 POSTPROCESS::NZBDRONE:   "state": "pending",
2014-09-25 21:11:39 POSTPROCESS::NZBDRONE:   "manual": true,
2014-09-25 21:11:39 POSTPROCESS::NZBDRONE:   "id": 99
2014-09-25 21:11:39 POSTPROCESS::NZBDRONE: }
2014-09-25 21:13:19 DEBUG   ::NZBDRONE: The directory D:\ServerFolders\Torrents-Processed\tv\Person.of.Interest.S04E01.1080p.WEB-DL.DD5.1.H.264-KiNGS.mkv has been removed. Renaming was successful.
2014-09-25 21:13:19 DB      ::DB: Updating status of our download Person.of.Interest.S04E01.1080p.WEB-DL.DD5.1.H.264-KiNGS.mkv in the DB to 1
2014-09-25 21:13:19 DB      ::MAIN: nzbtomedia.db: UPDATE downloads SET status=?, last_update=? WHERE input_name=? with args [1, 735501, u'Person.of.Interest.S04E01.1080p.WEB-DL.DD5.1.H.264-KiNGS.mkv']
2014-09-25 21:13:19 DEBUG   ::MAIN: Starting torrent Person.of.Interest.S04E01.1080p.WEB-DL.DD5.1.H.264-KiNGS.mkv in utorrent
2014-09-25 21:13:24 INFO    ::CLEANDIR: Directory D:\ServerFolders\Torrents-Processed\tv\Person.of.Interest.S04E01.1080p.WEB-DL.DD5.1.H.264-KiNGS.mkv has been processed and removed ...
2014-09-25 21:13:24 INFO    ::MAIN: The C:\NZBGet\scripts\nzbToMedia\TorrentToMedia.py script completed successfully. 

nzbdrone log

14-9-25 21:11:54.6|Debug|Parser|Parsing string 'Person.of.Interest.S04E01.1080p.WEB-DL.DD5.1.H.264-KiNGS.mkv'
14-9-25 21:11:54.6|Debug|Parser|Episode Parsed. personinterest - S04E01 
14-9-25 21:11:54.6|Debug|Parser|Language parsed: English
14-9-25 21:11:54.6|Debug|NzbDrone.Core.Parser.QualityParser|Trying to parse quality for Person.of.Interest.S04E01.1080p.WEB-DL.DD5.1.H.264-KiNGS.mkv
14-9-25 21:11:54.6|Debug|Parser|Quality parsed: WEBDL-1080p
14-9-25 21:11:54.6|Debug|Parser|Release Group parsed: KiNGS
14-9-25 21:11:54.7|Debug|Parser|Parsing string 'Person.of.Interest.S04E01.1080p.WEB-DL.DD5.1.H.264-KiNGS'
14-9-25 21:11:54.7|Debug|Parser|Episode Parsed. personinterest - S04E01 
14-9-25 21:11:54.7|Debug|Parser|Language parsed: English
14-9-25 21:11:54.7|Debug|NzbDrone.Core.Parser.QualityParser|Trying to parse quality for Person.of.Interest.S04E01.1080p.WEB-DL.DD5.1.H.264-KiNGS
14-9-25 21:11:54.7|Debug|Parser|Quality parsed: WEBDL-1080p
14-9-25 21:11:54.7|Debug|Parser|Release Group parsed: KiNGS
14-9-25 21:11:54.7|Debug|ImportDecisionMaker|Analyzing 1/1 files.
14-9-25 21:11:54.7|Debug|Parser|Parsing string 'Person.of.Interest.S04E01.1080p.WEB-DL.DD5.1.H.264-KiNGS.mkv'
14-9-25 21:11:54.7|Debug|Parser|Episode Parsed. personinterest - S04E01 
14-9-25 21:11:54.7|Debug|Parser|Language parsed: English
14-9-25 21:11:54.7|Debug|NzbDrone.Core.Parser.QualityParser|Trying to parse quality for Person.of.Interest.S04E01.1080p.WEB-DL.DD5.1.H.264-KiNGS.mkv
14-9-25 21:11:54.7|Debug|Parser|Quality parsed: WEBDL-1080p
14-9-25 21:11:54.7|Debug|Parser|Release Group parsed: KiNGS
14-9-25 21:11:54.7|Debug|ImportDecisionMaker|Size: 1688472103
14-9-25 21:11:54.7|Debug|VideoFileInfoReader|Getting media info from D:\ServerFolders\Torrents-Complete\tv\Person.of.Interest.S04E01.1080p.WEB-DL.DD5.1.H.264-KiNGS.mkv
14-9-25 21:11:56.0|Debug|VideoFileInfoReader|Getting media info from D:\ServerFolders\Torrents-Complete\tv\Person.of.Interest.S04E01.1080p.WEB-DL.DD5.1.H.264-KiNGS.mkv
14-9-25 21:11:56.2|Debug|SampleService|Runtime is over 90 seconds
14-9-25 21:11:56.2|Debug|Parser|Parsing string 'Person.of.Interest.S04E01.1080p.WEB-DL.DD5.1.H.264-KiNGS.mkv'
14-9-25 21:11:56.2|Debug|Parser|Episode Parsed. personinterest - S04E01 
14-9-25 21:11:56.2|Debug|Parser|Language parsed: English
14-9-25 21:11:56.2|Debug|NzbDrone.Core.Parser.QualityParser|Trying to parse quality for Person.of.Interest.S04E01.1080p.WEB-DL.DD5.1.H.264-KiNGS.mkv
14-9-25 21:11:56.2|Debug|Parser|Quality parsed: WEBDL-1080p
14-9-25 21:11:56.2|Debug|Parser|Release Group parsed: KiNGS
14-9-25 21:11:56.3|Debug|EpisodeFileMovingService|Moving episode file: [0]  to I:\ServerFolders\TV\Person of Interest\Season 04\Person.of.Interest.S04E01.1080p.WEB-DL.DD5.1.H.264-KiNGS.mkv.mkv
14-9-25 21:11:56.3|Debug|EpisodeFileMovingService|Move [D:\ServerFolders\Torrents-Complete\tv\Person.of.Interest.S04E01.1080p.WEB-DL.DD5.1.H.264-KiNGS.mkv] > [I:\ServerFolders\TV\Person of Interest\Season 04\Person.of.Interest.S04E01.1080p.WEB-DL.DD5.1.H.264-KiNGS.mkv.mkv]

if the file has a part of the name in it then nzbToMedia should remove then it works, because nzbdrones errors on it because the file is named different.

2014-09-25 20:58:54 DEBUG   ::MAIN: Options passed into TorrentToMedia: ['C:\\NZBGet\\scripts\\nzbToMedia\\TorrentToMedia.py', 'D:\\ServerFolders\\Torrents-Complete\\tv\\Person.of.Interest.S04E01.1080p.WEB-DL.DD5.1.H.264-KiNGS[rarbg]', 'Person.of.Interest.S04E01.1080p.WEB-DL.DD5.1.H.264-KiNGS[rarbg]', 'tv', '090BADE36BD6EEEBA2542C56208490F01623E70D']
2014-09-25 20:58:54 DEBUG   ::MAIN: Adding TORRENT download info for directory D:\ServerFolders\Torrents-Complete\tv\Person.of.Interest.S04E01.1080p.WEB-DL.DD5.1.H.264-KiNGS[rarbg] to database
2014-09-25 20:58:54 DB      ::MAIN: nzbtomedia.db: UPDATE downloads SET status = ?, client_agent = ?, last_update = ?, input_id = ?, input_hash = ?, input_name = ? WHERE input_directory = ? with args [0, u'utorrent', 735501, u'090BADE36BD6EEEBA2542C56208490F01623E70D', u'090BADE36BD6EEEBA2542C56208490F01623E70D', u'Person.of.Interest.S04E01.1080p.WEB-DL.DD5.1.H.264-KiNGS[rarbg]', u'D:\\ServerFolders\\Torrents-Complete\\tv\\Person.of.Interest.S04E01.1080p.WEB-DL.DD5.1.H.264-KiNGS[rarbg]']
2014-09-25 20:58:54 DEBUG   ::MAIN: Received Directory: D:\ServerFolders\Torrents-Complete\tv\Person.of.Interest.S04E01.1080p.WEB-DL.DD5.1.H.264-KiNGS[rarbg] | Name: Person.of.Interest.S04E01.1080p.WEB-DL.DD5.1.H.264-KiNGS[rarbg] | Category: tv
2014-09-25 20:58:54 DEBUG   ::MAIN: SEARCH: Found the Category: tv in directory structure
2014-09-25 20:58:54 INFO    ::MAIN: SEARCH: Found a unique directory Person.of.Interest.S04E01.1080p.WEB-DL.DD5.1.H.264-KiNGS[rarbg] in the category directory
2014-09-25 20:58:54 DEBUG   ::MAIN: Determined Directory: D:\ServerFolders\Torrents-Complete\tv\Person.of.Interest.S04E01.1080p.WEB-DL.DD5.1.H.264-KiNGS[rarbg] | Name: Person.of.Interest.S04E01.1080p.WEB-DL.DD5.1.H.264-KiNGS[rarbg] | Category: tv
2014-09-25 20:58:54 INFO    ::MAIN: Auto-detected SECTION:NzbDrone
2014-09-25 20:58:54 DEBUG   ::MAIN: Stopping torrent Person.of.Interest.S04E01.1080p.WEB-DL.DD5.1.H.264-KiNGS[rarbg] in utorrent while processing
2014-09-25 20:58:59 INFO    ::MAIN: Output directory set to: D:\ServerFolders\Torrents-Processed\tv\Person.of.Interest.S04E01.1080p.WEB-DL.DD5.1.H.264-KiNGS[rarbg]
2014-09-25 20:58:59 DEBUG   ::MAIN: Scanning files in directory: D:\ServerFolders\Torrents-Complete\tv\Person.of.Interest.S04E01.1080p.WEB-DL.DD5.1.H.264-KiNGS[rarbg]
2014-09-25 20:58:59 DEBUG   ::MAIN: Found 2 files in D:\ServerFolders\Torrents-Complete\tv\Person.of.Interest.S04E01.1080p.WEB-DL.DD5.1.H.264-KiNGS[rarbg]
2014-09-25 20:58:59 INFO    ::COPYLINK: MEDIAFILE: [Person.of.Interest.S04E01.1080p.WEB-DL.DD5.1.H.264-KiNGS.mkv]
2014-09-25 20:58:59 INFO    ::COPYLINK: SOURCE FOLDER: [D:\ServerFolders\Torrents-Complete\tv\Person.of.Interest.S04E01.1080p.WEB-DL.DD5.1.H.264-KiNGS[rarbg]]
2014-09-25 20:58:59 INFO    ::COPYLINK: TARGET FOLDER: [D:\ServerFolders\Torrents-Processed\tv\Person.of.Interest.S04E01.1080p.WEB-DL.DD5.1.H.264-KiNGS[rarbg]]
2014-09-25 20:58:59 INFO    ::COPYLINK: Hard linking SOURCE MEDIAFILE -> TARGET FOLDER
2014-09-25 20:58:59 INFO    ::COPYLINK: MEDIAFILE: [Person.of.Interest.S04E01.1080p.WEB-DL.DD5.1.H.264-KiNGS.srt]
2014-09-25 20:58:59 INFO    ::COPYLINK: SOURCE FOLDER: [D:\ServerFolders\Torrents-Complete\tv\Person.of.Interest.S04E01.1080p.WEB-DL.DD5.1.H.264-KiNGS[rarbg]]
2014-09-25 20:58:59 INFO    ::COPYLINK: TARGET FOLDER: [D:\ServerFolders\Torrents-Processed\tv\Person.of.Interest.S04E01.1080p.WEB-DL.DD5.1.H.264-KiNGS[rarbg]]
2014-09-25 20:58:59 INFO    ::COPYLINK: Hard linking SOURCE MEDIAFILE -> TARGET FOLDER
2014-09-25 20:58:59 DEBUG   ::MAIN: Checking for archives to extract in directory: D:\ServerFolders\Torrents-Processed\tv\Person.of.Interest.S04E01.1080p.WEB-DL.DD5.1.H.264-KiNGS[rarbg]
2014-09-25 20:58:59 INFO    ::MAIN: FLATTEN: Flattening directory: D:\ServerFolders\Torrents-Processed\tv\Person.of.Interest.S04E01.1080p.WEB-DL.DD5.1.H.264-KiNGS[rarbg]
2014-09-25 20:58:59 DEBUG   ::MAIN: Checking for empty folders in:D:\ServerFolders\Torrents-Processed\tv\Person.of.Interest.S04E01.1080p.WEB-DL.DD5.1.H.264-KiNGS[rarbg]
2014-09-25 20:58:59 INFO    ::MAIN: Found 1 media files in D:\ServerFolders\Torrents-Processed\tv\Person.of.Interest.S04E01.1080p.WEB-DL.DD5.1.H.264-KiNGS[rarbg]
2014-09-25 20:59:00 INFO    ::MAIN: Calling NzbDrone:tv to post-process:Person.of.Interest.S04E01.1080p.WEB-DL.DD5.1.H.264-KiNGS[rarbg]
2014-09-25 20:59:00 INFO    ::MAIN: Attempting to verify tv fork
2014-09-25 20:59:00 INFO    ::MAIN: NzbDrone:tv fork set to default
2014-09-25 20:59:00 DEBUG   ::MAIN: calling command: c:\ffmpeg\bin\ffprobe.exe -v quiet -print_format json -show_format -show_streams -show_error C:\NZBGet\scripts\nzbToMedia\tests\test.mp4
2014-09-25 20:59:00 INFO    ::TRANSCODER: Checking [Person.of.Interest.S04E01.1080p.WEB-DL.DD5.1.H.264-KiNGS.mkv] for corruption, please stand by ...
2014-09-25 20:59:00 DEBUG   ::MAIN: calling command: c:\ffmpeg\bin\ffprobe.exe -v quiet -print_format json -show_format -show_streams -show_error D:\ServerFolders\Torrents-Processed\tv\Person.of.Interest.S04E01.1080p.WEB-DL.DD5.1.H.264-KiNGS[rarbg]\Person.of.Interest.S04E01.1080p.WEB-DL.DD5.1.H.264-KiNGS.mkv
2014-09-25 20:59:00 INFO    ::TRANSCODER: SUCCESS: [Person.of.Interest.S04E01.1080p.WEB-DL.DD5.1.H.264-KiNGS.mkv] has no corruption.
2014-09-25 20:59:00 INFO    ::MAIN: FLATTEN: Flattening directory: D:\ServerFolders\Torrents-Processed\tv\Person.of.Interest.S04E01.1080p.WEB-DL.DD5.1.H.264-KiNGS[rarbg]
2014-09-25 20:59:00 DEBUG   ::MAIN: Checking for empty folders in:D:\ServerFolders\Torrents-Processed\tv\Person.of.Interest.S04E01.1080p.WEB-DL.DD5.1.H.264-KiNGS[rarbg]
2014-09-25 20:59:00 INFO    ::MAIN: FLATTEN: Flattening directory: D:\ServerFolders\Torrents-Processed\tv\Person.of.Interest.S04E01.1080p.WEB-DL.DD5.1.H.264-KiNGS[rarbg]
2014-09-25 20:59:00 DEBUG   ::MAIN: Checking for empty folders in:D:\ServerFolders\Torrents-Processed\tv\Person.of.Interest.S04E01.1080p.WEB-DL.DD5.1.H.264-KiNGS[rarbg]
2014-09-25 20:59:00 POSTPROCESS::NZBDRONE: SUCCESS: The download succeeded, sending a post-process request
2014-09-25 20:59:00 DEBUG   ::NZBDRONE: path: D:\ServerFolders\Torrents-Processed\tv\Person.of.Interest.S04E01.1080p.WEB-DL.DD5.1.H.264-KiNGS[rarbg]
2014-09-25 20:59:00 DEBUG   ::NZBDRONE: Opening URL: http://localhost:8989/api/command with data: {"path": "D:\\ServerFolders\\Torrents-Processed\\tv\\Person.of.Interest.S04E01.1080p.WEB-DL.DD5.1.H.264-KiNGS[rarbg]", "name": "DownloadedEpisodesScan"}
2014-09-25 20:59:00 POSTPROCESS::NZBDRONE: {
2014-09-25 20:59:00 POSTPROCESS::NZBDRONE:   "name": "DownloadedEpisodesScan",
2014-09-25 20:59:00 POSTPROCESS::NZBDRONE:   "startedOn": "0001-01-01T00:00:00Z",
2014-09-25 20:59:00 POSTPROCESS::NZBDRONE:   "stateChangeTime": "2014-09-25T18:59:00.8393245Z",
2014-09-25 20:59:00 POSTPROCESS::NZBDRONE:   "sendUpdatesToClient": false,
2014-09-25 20:59:00 POSTPROCESS::NZBDRONE:   "state": "pending",
2014-09-25 20:59:00 POSTPROCESS::NZBDRONE:   "manual": true,
2014-09-25 20:59:00 POSTPROCESS::NZBDRONE:   "id": 70
2014-09-25 20:59:00 POSTPROCESS::NZBDRONE: }
2014-09-25 21:01:01 WARNING ::NZBDRONE: The number of missing episodes: 2 does not appear to have changed status after 2 minutes, Please check your logs.
2014-09-25 21:01:01 ERROR   ::MAIN: A problem was reported in the autoProcess* script. If torrent was paused we will resume seeding
2014-09-25 21:01:01 DEBUG   ::MAIN: Starting torrent Person.of.Interest.S04E01.1080p.WEB-DL.DD5.1.H.264-KiNGS[rarbg] in utorrent
2014-09-25 21:01:06 ERROR   ::MAIN: A problem was reported in the C:\NZBGet\scripts\nzbToMedia\TorrentToMedia.py script. 
clinton-hall commented 9 years ago

@Taloth I'll edit the wiki now... thanks. @TRaSH- The changes made are only (currently) used for SABnzbd/NZBGet downloads. Manual and Torrent Downloads still use the previous method. I'm not certain if this should respond to the CDH since Drone doesn't interact with your Torrent Downloader? So as far as this goes, the behaviour shouldn't have changed... I'll try and dig into the logs to see what haappened.

clinton-hall commented 9 years ago

@Taloth Is there anything else I should be doing for Torrent Downloads? Does the double extension as per the logs above make any sense?

Taloth commented 9 years ago

We have a torrent branch but that's not released yet (which actually can do hardlinking). I think TRaSH might be using that test branch. Probably means we could get a conflict if ppl mix CDH and the Drone Factory.

A few observations about the torrent import: nzbToMedia sends the folder in the command D:\ServerFolders\Torrents-Processed\tv\Person.of.Interest.S04E01.1080p.WEB-DL.DD5.1.H.264-KiNGS[rarbg]
But drone moves from D:\ServerFolders\Torrents-Complete\tv\Person.of.Interest.S04E01.1080p.WEB-DL.DD5.1.H.264-KiNGS.mkv
That doesn't seem right. I think this isn't the Drone Factory logic, it's probably CDH using info provided by the torrent client, but need more context in the log to be sure.

Anyway, the double extension stuff should probably be posted on our forum instead. Including which torrent client, log, etc.

clinton-hall commented 9 years ago

Ah, yes, Drone is processing the original...

I'll need to think how I should handle Torrents with Torrent Branch of Drone. If drone is going to process the original location, and do the hard linking, then I should really skip the linking and extracting etc... (or basically not do anything for Drone Category). The only features that my script would be adding would be Corruption checking (which is probably really only an issue for NZBs) and transcoding (I'm not sure how many people are using this for TV series).

So, I guess the question is, would there be a way to do some manipulation of the files (transcode) and then give the new files to Drone?

Taloth commented 9 years ago

Hm, I thought pp-scripts could modify the output path, at least for some download clients. Less likely for torrents I suppose. Transcoding while seeding might be a bit hard to support with CDH, unless you can change the output dir.

Actually, I might have an idea, nothing short of a hack though. You could abuse NzbDrone Remote Path Mapping feature. By specifying Host="127.0.0.1" RemotePath="D:\ServerFolders\Torrents-Complete" LocalPath="D:\ServerFolders\Torrents-Processed" you could trick drone to remap the path reported by the torrent client. Only works if the torrent client creates subdirectories.

Even corruption checking might not be very useful with torrents. Only public trackers have some risk of corrupted files and very few ppl will keep seeding those.

clinton-hall commented 9 years ago

agreed... I think for Torrents, I'll just do an exit and hand to Drone... is there anyway I can Poll Drone to see if Torrent Client CDH is enabled?

TRaSH- commented 9 years ago

I'm on the road now so I add some short info. Yes I'm using the torrent branch, Drone factory is set to 0 and not used. And set to a empty dir that isn't used. The double extension stuff looks like it only happens when nzbToMedia doesn't do a renaming.

Verzonden vanaf Samsung Mobile.

-------- Oorspronkelijk bericht --------
Van: Taloth notifications@github.com
Datum:25-09-2014 23:09 (GMT+01:00)
Aan: clinton-hall/nzbToMedia nzbToMedia@noreply.github.com
Cc: TRaSH trash@anime-supreme.com
Onderwerp: Re: [nzbToMedia] Option to remove part of release name (#485)
We have a torrent branch but that's not released yet (which actually can do hardlinking). I think TRaSH might be using that test branch. Probably means we could get a conflict if ppl mix CDH and the Drone Factory. A few observations about the torrent import: nzbToMedia sends the folder in the command D:\ServerFolders\Torrents-Processed\tv\Person.of.Interest.S04E01.1080p.WEB-DL.DD5.1.H.264-KiNGS[rarbg] But drone moves from D:\ServerFolders\Torrents-Complete\tv\Person.of.Interest.S04E01.1080p.WEB-DL.DD5.1.H.264-KiNGS.mkv That doesn't seem right. I think this isn't the Drone Factory logic, it's probably CDH using info provided by the torrent client, but need more context in the log to be sure. Anyway, the double extension stuff should probably be posted on our forum instead. Including which torrent client, log, etc. — Reply to this email directly or view it on GitHub.
Taloth commented 9 years ago

@clinton-hall I suspect quite a few people might be using it to get some level of torrent support via the Drone Factory. Using rss feeds in the torrent client and have it automatically import into drone. The only way to make the distinction is to verify if the path lies within the Drone Factory folder, and only post the command to drone in that case. Same api endpoint but then the 'downloadedEpisodesFolder' property. But that's not backward compatible. I would wait and see what the real issue is with TRaSH so we can determine the severity.

CDH is enabled globally and how drone behaves depends on which torrent clients the user configured. Personally I wouldn't go that route.

clinton-hall commented 9 years ago

thanks @Taloth I'll wait for some more info... but adding the check for downloadedEpisodesFolder and seeing if that is contained within the current path would be easy enough. Obviously a blank downloadedEpisodesFolder would also be something to look for (or just check if Drone Factory is enabled).

TRaSH- commented 9 years ago

So which info do you need from me ?

Verzonden vanaf Samsung Mobile.

-------- Oorspronkelijk bericht --------
Van: Taloth notifications@github.com
Datum:26-09-2014 08:47 (GMT+01:00)
Aan: clinton-hall/nzbToMedia nzbToMedia@noreply.github.com
Cc: TRaSH trash@anime-supreme.com
Onderwerp: Re: [nzbToMedia] Option to remove part of release name (#485)
@clinton-hall I suspect quite a few people might be using it to get some level of torrent support via the Drone Factory. Using rss feeds in the torrent client and have it automatically import into drone. The only way to make the distinction is to verify if the path lies within the Drone Factory folder, and only post the command to drone in that case. Same api endpoint but then the 'downloadedEpisodesFolder' property. But that's not backward compatible. I would wait and see what the real issue is with TRaSH so we can determine the severity. CDH is enabled globally and how drone behaves depends on which torrent clients the user configured. Personally I wouldn't go that route. — Reply to this email directly or view it on GitHub.
Taloth commented 9 years ago

You need to post more of your log on our forum. The double-extension issue and the weird output path drone tries to move from contradicts what nzbToMedia sees. This needs to be addressed as torrent issue in drone. complete with tracelogs to see what the torrent client reports prior to import.

The other issue is that torrentToMedia requests a DF scan while CDH is enabled. That's by design atm, but we're looking at how to properly support torrentToMedia together with CDH.

@clinton-hall Using the downloadedEpisodesFolder in addition to the CDH check would prevent the torrentToMedia & CDH from clashing, but it won't solve problems with corruption checks and transcoding. With NzbGet you can actually change the FinalDir. (http://nzbget.net/Extension_scripts#Control_commands) But I doubt every torrent client has a similar feature. It's especially tricky with single-file download, for which uTorrent doesn't create a subdirectory.

TRaSH- commented 9 years ago

@Taloth i've created a topic on the nzbdrone forum http://forums.nzbdrone.com/t/nzbtomedia-torrent-problem-with-cdh/2169 added a link to download the log from my dropbox.

clinton-hall commented 9 years ago

Marking this as fixes since the rename option works. Still working on CDH with Torrents..

TRaSH- commented 9 years ago

i turned on CDH, but now sometimes it seems that the remove part doesn't work anymore log file where rename works

2014-11-26 21:50:14 INFO    ::MAIN: Loading config from [C:\NZBGet\scripts\nzbToMedia\autoProcessMedia.cfg]
2014-11-26 21:50:14 INFO    ::MAIN: Checking database structure...
2014-11-26 21:50:14 DEBUG   ::MAIN: Checking Initial Schema database upgrade
2014-11-26 21:50:14 DB      ::MAIN: nzbtomedia.db: SELECT 1 FROM sqlite_master WHERE name = ?; with args ('db_version',)
2014-11-26 21:50:15 DB      ::MAIN: nzbtomedia.db: SELECT db_version FROM db_version
2014-11-26 21:50:15 DEBUG   ::MAIN: InitialSchema upgrade not required
2014-11-26 21:50:15 DEBUG   ::MAIN: Checking if we can use git commands: "C:\Program Files (x86)\Git\bin\git.exe" version
2014-11-26 21:50:15 DEBUG   ::MAIN: Executing "C:\Program Files (x86)\Git\bin\git.exe" version with your shell in C:\NZBGet\scripts\nzbToMedia
2014-11-26 21:50:15 DEBUG   ::MAIN: "C:\Program Files (x86)\Git\bin\git.exe" version : returned successful
2014-11-26 21:50:15 DEBUG   ::MAIN: Using: "C:\Program Files (x86)\Git\bin\git.exe"
2014-11-26 21:50:15 DEBUG   ::MAIN: Executing "C:\Program Files (x86)\Git\bin\git.exe" symbolic-ref -q HEAD with your shell in C:\NZBGet\scripts\nzbToMedia
2014-11-26 21:50:15 DEBUG   ::MAIN: "C:\Program Files (x86)\Git\bin\git.exe" symbolic-ref -q HEAD : returned successful
2014-11-26 21:50:15 INFO    ::MAIN: Checking if git needs an update
2014-11-26 21:50:15 DEBUG   ::MAIN: Executing "C:\Program Files (x86)\Git\bin\git.exe" rev-parse HEAD with your shell in C:\NZBGet\scripts\nzbToMedia
2014-11-26 21:50:15 DEBUG   ::MAIN: "C:\Program Files (x86)\Git\bin\git.exe" rev-parse HEAD : returned successful
2014-11-26 21:50:15 DEBUG   ::MAIN: Executing "C:\Program Files (x86)\Git\bin\git.exe" fetch origin with your shell in C:\NZBGet\scripts\nzbToMedia
2014-11-26 21:50:16 DEBUG   ::MAIN: "C:\Program Files (x86)\Git\bin\git.exe" fetch origin : returned successful
2014-11-26 21:50:16 DEBUG   ::MAIN: Executing "C:\Program Files (x86)\Git\bin\git.exe" rev-parse --verify --quiet "@{upstream}" with your shell in C:\NZBGet\scripts\nzbToMedia
2014-11-26 21:50:16 DEBUG   ::MAIN: "C:\Program Files (x86)\Git\bin\git.exe" rev-parse --verify --quiet "@{upstream}" : returned successful
2014-11-26 21:50:16 DEBUG   ::MAIN: Executing "C:\Program Files (x86)\Git\bin\git.exe" rev-list --left-right "@{upstream}"...HEAD with your shell in C:\NZBGet\scripts\nzbToMedia
2014-11-26 21:50:16 DEBUG   ::MAIN: "C:\Program Files (x86)\Git\bin\git.exe" rev-list --left-right "@{upstream}"...HEAD : returned successful
2014-11-26 21:50:16 DEBUG   ::MAIN: cur_commit = 0c4003a8b1ab6d495f08cbe64b90c17ff7a2a5c8 % (newest_commit)= 0c4003a8b1ab6d495f08cbe64b90c17ff7a2a5c8, num_commits_behind = 0, num_commits_ahead = 0
2014-11-26 21:50:16 INFO    ::MAIN: No update needed
2014-11-26 21:50:16 INFO    ::MAIN: nzbToMedia Version:0c4003a8b1ab6d495f08cbe64b90c17ff7a2a5c8 Branch:nightly (Windows 2008ServerR2)
2014-11-26 21:50:17 DEBUG   ::MAIN: Connecting to utorrent: http://localhost:7000/gui/
2014-11-26 21:50:17 INFO    ::MAIN: #########################################################
2014-11-26 21:50:17 INFO    ::MAIN: ## ..::[TorrentToMedia.py]::.. ##
2014-11-26 21:50:17 INFO    ::MAIN: #########################################################
2014-11-26 21:50:17 DEBUG   ::MAIN: Options passed into TorrentToMedia: ['C:\\NZBGet\\scripts\\nzbToMedia\\TorrentToMedia.py', 'D:\\ServerFolders\\Torrents-Complete\\tv\\Supernatural.S10E07.Girls.Girls.Girls.1080p.WEB-DL.DD5.1.H.264-ECI[rarbg]', 'Supernatural.S10E07.Girls.Girls.Girls.1080p.WEB-DL.DD5.1.H.264-ECI[rarbg]', 'tv', '2BC5724D6D846E6168618475C7BB00F8C4E336DA']
2014-11-26 21:50:17 DEBUG   ::MAIN: Adding TORRENT download info for directory D:\ServerFolders\Torrents-Complete\tv\Supernatural.S10E07.Girls.Girls.Girls.1080p.WEB-DL.DD5.1.H.264-ECI[rarbg] to database
2014-11-26 21:50:17 DB      ::MAIN: nzbtomedia.db: UPDATE downloads SET status = ?, client_agent = ?, last_update = ?, input_id = ?, input_hash = ?, input_name = ? WHERE input_directory = ? with args [0, u'utorrent', 735563, u'2BC5724D6D846E6168618475C7BB00F8C4E336DA', u'2BC5724D6D846E6168618475C7BB00F8C4E336DA', u'Supernatural.S10E07.Girls.Girls.Girls.1080p.WEB-DL.DD5.1.H.264-ECI[rarbg]', u'D:\\ServerFolders\\Torrents-Complete\\tv\\Supernatural.S10E07.Girls.Girls.Girls.1080p.WEB-DL.DD5.1.H.264-ECI[rarbg]']
2014-11-26 21:50:17 DB      ::MAIN: nzbtomedia.db: INSERT OR IGNORE INTO downloads (status, client_agent, last_update, input_id, input_hash, input_name, input_directory) VALUES (?, ?, ?, ?, ?, ?, ?) with args [0, u'utorrent', 735563, u'2BC5724D6D846E6168618475C7BB00F8C4E336DA', u'2BC5724D6D846E6168618475C7BB00F8C4E336DA', u'Supernatural.S10E07.Girls.Girls.Girls.1080p.WEB-DL.DD5.1.H.264-ECI[rarbg]', u'D:\\ServerFolders\\Torrents-Complete\\tv\\Supernatural.S10E07.Girls.Girls.Girls.1080p.WEB-DL.DD5.1.H.264-ECI[rarbg]']
2014-11-26 21:50:17 DEBUG   ::MAIN: Received Directory: D:\ServerFolders\Torrents-Complete\tv\Supernatural.S10E07.Girls.Girls.Girls.1080p.WEB-DL.DD5.1.H.264-ECI[rarbg] | Name: Supernatural.S10E07.Girls.Girls.Girls.1080p.WEB-DL.DD5.1.H.264-ECI[rarbg] | Category: tv
2014-11-26 21:50:17 DEBUG   ::MAIN: SEARCH: Found the Category: tv in directory structure
2014-11-26 21:50:17 INFO    ::MAIN: SEARCH: Found a unique directory Supernatural.S10E07.Girls.Girls.Girls.1080p.WEB-DL.DD5.1.H.264-ECI[rarbg] in the category directory
2014-11-26 21:50:17 DEBUG   ::MAIN: Determined Directory: D:\ServerFolders\Torrents-Complete\tv\Supernatural.S10E07.Girls.Girls.Girls.1080p.WEB-DL.DD5.1.H.264-ECI[rarbg] | Name: Supernatural.S10E07.Girls.Girls.Girls.1080p.WEB-DL.DD5.1.H.264-ECI[rarbg] | Category: tv
2014-11-26 21:50:17 INFO    ::MAIN: Auto-detected SECTION:NzbDrone
2014-11-26 21:50:17 DEBUG   ::MAIN: Stopping torrent Supernatural.S10E07.Girls.Girls.Girls.1080p.WEB-DL.DD5.1.H.264-ECI[rarbg] in utorrent while processing
2014-11-26 21:50:22 INFO    ::MAIN: Output directory set to: D:\ServerFolders\Torrents-Processed\tv\Supernatural.S10E07.Girls.Girls.Girls.1080p.WEB-DL.DD5.1.H.264-ECI[rarbg]
2014-11-26 21:50:22 DEBUG   ::MAIN: Scanning files in directory: D:\ServerFolders\Torrents-Complete\tv\Supernatural.S10E07.Girls.Girls.Girls.1080p.WEB-DL.DD5.1.H.264-ECI[rarbg]
2014-11-26 21:50:22 DEBUG   ::MAIN: Found 2 files in D:\ServerFolders\Torrents-Complete\tv\Supernatural.S10E07.Girls.Girls.Girls.1080p.WEB-DL.DD5.1.H.264-ECI[rarbg]
2014-11-26 21:50:22 INFO    ::COPYLINK: MEDIAFILE: [Supernatural.S10E07.Girls.Girls.Girls.1080p.WEB-DL.DD5.1.H.264-ECI.mkv]
2014-11-26 21:50:22 INFO    ::COPYLINK: SOURCE FOLDER: [D:\ServerFolders\Torrents-Complete\tv\Supernatural.S10E07.Girls.Girls.Girls.1080p.WEB-DL.DD5.1.H.264-ECI[rarbg]]
2014-11-26 21:50:22 INFO    ::COPYLINK: TARGET FOLDER: [D:\ServerFolders\Torrents-Processed\tv\Supernatural.S10E07.Girls.Girls.Girls.1080p.WEB-DL.DD5.1.H.264-ECI[rarbg]]
2014-11-26 21:50:22 INFO    ::COPYLINK: Hard linking SOURCE MEDIAFILE -> TARGET FOLDER
2014-11-26 21:50:22 INFO    ::COPYLINK: MEDIAFILE: [Supernatural.S10E07.Girls.Girls.Girls.1080p.WEB-DL.DD5.1.H.264-ECI.srt]
2014-11-26 21:50:22 INFO    ::COPYLINK: SOURCE FOLDER: [D:\ServerFolders\Torrents-Complete\tv\Supernatural.S10E07.Girls.Girls.Girls.1080p.WEB-DL.DD5.1.H.264-ECI[rarbg]]
2014-11-26 21:50:22 INFO    ::COPYLINK: TARGET FOLDER: [D:\ServerFolders\Torrents-Processed\tv\Supernatural.S10E07.Girls.Girls.Girls.1080p.WEB-DL.DD5.1.H.264-ECI[rarbg]]
2014-11-26 21:50:22 INFO    ::COPYLINK: Hard linking SOURCE MEDIAFILE -> TARGET FOLDER
2014-11-26 21:50:22 DEBUG   ::MAIN: Checking for archives to extract in directory: D:\ServerFolders\Torrents-Processed\tv\Supernatural.S10E07.Girls.Girls.Girls.1080p.WEB-DL.DD5.1.H.264-ECI[rarbg]
2014-11-26 21:50:22 INFO    ::MAIN: FLATTEN: Flattening directory: D:\ServerFolders\Torrents-Processed\tv\Supernatural.S10E07.Girls.Girls.Girls.1080p.WEB-DL.DD5.1.H.264-ECI[rarbg]
2014-11-26 21:50:22 DEBUG   ::MAIN: Checking for empty folders in:D:\ServerFolders\Torrents-Processed\tv\Supernatural.S10E07.Girls.Girls.Girls.1080p.WEB-DL.DD5.1.H.264-ECI[rarbg]
2014-11-26 21:50:22 INFO    ::MAIN: Found 1 media files in D:\ServerFolders\Torrents-Processed\tv\Supernatural.S10E07.Girls.Girls.Girls.1080p.WEB-DL.DD5.1.H.264-ECI[rarbg]
2014-11-26 21:50:22 INFO    ::MAIN: Calling NzbDrone:tv to post-process:Supernatural.S10E07.Girls.Girls.Girls.1080p.WEB-DL.DD5.1.H.264-ECI[rarbg]
2014-11-26 21:50:22 INFO    ::MAIN: Attempting to verify tv fork
2014-11-26 21:50:22 INFO    ::MAIN: NzbDrone:tv fork set to default
2014-11-26 21:50:22 DEBUG   ::MAIN: calling command: c:\ffmpeg\bin\ffprobe.exe -v quiet -print_format json -show_format -show_streams -show_error C:\NZBGet\scripts\nzbToMedia\tests\test.mp4
2014-11-26 21:50:22 INFO    ::TRANSCODER: Checking [Supernatural.S10E07.Girls.Girls.Girls.1080p.WEB-DL.DD5.1.H.264-ECI.mkv] for corruption, please stand by ...
2014-11-26 21:50:22 DEBUG   ::MAIN: calling command: c:\ffmpeg\bin\ffprobe.exe -v quiet -print_format json -show_format -show_streams -show_error D:\ServerFolders\Torrents-Processed\tv\Supernatural.S10E07.Girls.Girls.Girls.1080p.WEB-DL.DD5.1.H.264-ECI[rarbg]\Supernatural.S10E07.Girls.Girls.Girls.1080p.WEB-DL.DD5.1.H.264-ECI.mkv
2014-11-26 21:50:23 INFO    ::TRANSCODER: SUCCESS: [Supernatural.S10E07.Girls.Girls.Girls.1080p.WEB-DL.DD5.1.H.264-ECI.mkv] has no corruption.
2014-11-26 21:50:23 INFO    ::MAIN: FLATTEN: Flattening directory: D:\ServerFolders\Torrents-Processed\tv\Supernatural.S10E07.Girls.Girls.Girls.1080p.WEB-DL.DD5.1.H.264-ECI[rarbg]
2014-11-26 21:50:23 DEBUG   ::MAIN: Checking for empty folders in:D:\ServerFolders\Torrents-Processed\tv\Supernatural.S10E07.Girls.Girls.Girls.1080p.WEB-DL.DD5.1.H.264-ECI[rarbg]
2014-11-26 21:50:23 INFO    ::MAIN: FLATTEN: Flattening directory: D:\ServerFolders\Torrents-Processed\tv\Supernatural.S10E07.Girls.Girls.Girls.1080p.WEB-DL.DD5.1.H.264-ECI[rarbg]
2014-11-26 21:50:23 DEBUG   ::MAIN: Checking for empty folders in:D:\ServerFolders\Torrents-Processed\tv\Supernatural.S10E07.Girls.Girls.Girls.1080p.WEB-DL.DD5.1.H.264-ECI[rarbg]
2014-11-26 21:50:23 POSTPROCESS::NZBDRONE: SUCCESS: The download succeeded, sending a post-process request
2014-11-26 21:50:23 DEBUG   ::NZBDRONE: path: D:\ServerFolders\Torrents-Processed\tv\Supernatural.S10E07.Girls.Girls.Girls.1080p.WEB-DL.DD5.1.H.264-ECI[rarbg]
2014-11-26 21:50:23 DEBUG   ::NZBDRONE: Opening URL: http://localhost:8989/api/command with data: {"path": "D:\\ServerFolders\\Torrents-Processed\\tv\\Supernatural.S10E07.Girls.Girls.Girls.1080p.WEB-DL.DD5.1.H.264-ECI[rarbg]", "name": "DownloadedEpisodesScan", "downloadClientId": "2BC5724D6D846E6168618475C7BB00F8C4E336DA"}
2014-11-26 21:50:23 DEBUG   ::NZBDRONE: Scan started with id: 4715
2014-11-26 21:50:43 DEBUG   ::NZBDRONE: The Scan command return status: completed
2014-11-26 21:50:43 DEBUG   ::NZBDRONE: The directory D:\ServerFolders\Torrents-Processed\tv\Supernatural.S10E07.Girls.Girls.Girls.1080p.WEB-DL.DD5.1.H.264-ECI[rarbg] has been removed. Renaming was successful.
2014-11-26 21:50:43 DB      ::DB: Updating status of our download Supernatural.S10E07.Girls.Girls.Girls.1080p.WEB-DL.DD5.1.H.264-ECI[rarbg] in the DB to 1
2014-11-26 21:50:43 DB      ::MAIN: nzbtomedia.db: UPDATE downloads SET status=?, last_update=? WHERE input_name=? with args [1, 735563, u'Supernatural.S10E07.Girls.Girls.Girls.1080p.WEB-DL.DD5.1.H.264-ECI[rarbg]']
2014-11-26 21:50:43 DEBUG   ::MAIN: Starting torrent Supernatural.S10E07.Girls.Girls.Girls.1080p.WEB-DL.DD5.1.H.264-ECI[rarbg] in utorrent
2014-11-26 21:50:48 INFO    ::CLEANDIR: Directory D:\ServerFolders\Torrents-Processed\tv\Supernatural.S10E07.Girls.Girls.Girls.1080p.WEB-DL.DD5.1.H.264-ECI[rarbg] has been processed and removed ...
2014-11-26 21:50:48 INFO    ::MAIN: The C:\NZBGet\scripts\nzbToMedia\TorrentToMedia.py script completed successfully. 

sonarr message

External directory scan request for unknown download 2BC5724D6D846E6168618475C7BB00F8C4E336DA, attempting normal import. [D:\ServerFolders\Torrents-Processed\tv\Supernatural.S10E07.Girls.Girls.Girls.1080p.WEB-DL.DD5.1.H.264-ECI[rarbg]]

in the destination folder there's a file called. Supernatural.S10E07.Girls.Girls.Girls.1080p.WEB-DL.DD5.1.H.264-ECI.mkv

logfile rename doesn't work

2014-11-27 17:10:37 INFO    ::MAIN: Loading config from [C:\NZBGet\scripts\nzbToMedia\autoProcessMedia.cfg]
2014-11-27 17:10:37 INFO    ::MAIN: Checking database structure...
2014-11-27 17:10:37 DEBUG   ::MAIN: Checking Initial Schema database upgrade
2014-11-27 17:10:37 DB      ::MAIN: nzbtomedia.db: SELECT 1 FROM sqlite_master WHERE name = ?; with args ('db_version',)
2014-11-27 17:10:37 DB      ::MAIN: nzbtomedia.db: SELECT db_version FROM db_version
2014-11-27 17:10:37 DEBUG   ::MAIN: InitialSchema upgrade not required
2014-11-27 17:10:37 DEBUG   ::MAIN: Checking if we can use git commands: "C:\Program Files (x86)\Git\bin\git.exe" version
2014-11-27 17:10:37 DEBUG   ::MAIN: Executing "C:\Program Files (x86)\Git\bin\git.exe" version with your shell in C:\NZBGet\scripts\nzbToMedia
2014-11-27 17:10:38 DEBUG   ::MAIN: "C:\Program Files (x86)\Git\bin\git.exe" version : returned successful
2014-11-27 17:10:38 DEBUG   ::MAIN: Using: "C:\Program Files (x86)\Git\bin\git.exe"
2014-11-27 17:10:38 DEBUG   ::MAIN: Executing "C:\Program Files (x86)\Git\bin\git.exe" symbolic-ref -q HEAD with your shell in C:\NZBGet\scripts\nzbToMedia
2014-11-27 17:10:38 DEBUG   ::MAIN: "C:\Program Files (x86)\Git\bin\git.exe" symbolic-ref -q HEAD : returned successful
2014-11-27 17:10:38 INFO    ::MAIN: Checking if git needs an update
2014-11-27 17:10:38 DEBUG   ::MAIN: Executing "C:\Program Files (x86)\Git\bin\git.exe" rev-parse HEAD with your shell in C:\NZBGet\scripts\nzbToMedia
2014-11-27 17:10:38 DEBUG   ::MAIN: "C:\Program Files (x86)\Git\bin\git.exe" rev-parse HEAD : returned successful
2014-11-27 17:10:38 DEBUG   ::MAIN: Executing "C:\Program Files (x86)\Git\bin\git.exe" fetch origin with your shell in C:\NZBGet\scripts\nzbToMedia
2014-11-27 17:10:39 DEBUG   ::MAIN: "C:\Program Files (x86)\Git\bin\git.exe" fetch origin : returned successful
2014-11-27 17:10:39 DEBUG   ::MAIN: Executing "C:\Program Files (x86)\Git\bin\git.exe" rev-parse --verify --quiet "@{upstream}" with your shell in C:\NZBGet\scripts\nzbToMedia
2014-11-27 17:10:39 DEBUG   ::MAIN: "C:\Program Files (x86)\Git\bin\git.exe" rev-parse --verify --quiet "@{upstream}" : returned successful
2014-11-27 17:10:39 DEBUG   ::MAIN: Executing "C:\Program Files (x86)\Git\bin\git.exe" rev-list --left-right "@{upstream}"...HEAD with your shell in C:\NZBGet\scripts\nzbToMedia
2014-11-27 17:10:39 DEBUG   ::MAIN: "C:\Program Files (x86)\Git\bin\git.exe" rev-list --left-right "@{upstream}"...HEAD : returned successful
2014-11-27 17:10:39 DEBUG   ::MAIN: cur_commit = 0c4003a8b1ab6d495f08cbe64b90c17ff7a2a5c8 % (newest_commit)= 0c4003a8b1ab6d495f08cbe64b90c17ff7a2a5c8, num_commits_behind = 0, num_commits_ahead = 0
2014-11-27 17:10:39 INFO    ::MAIN: No update needed
2014-11-27 17:10:39 INFO    ::MAIN: nzbToMedia Version:0c4003a8b1ab6d495f08cbe64b90c17ff7a2a5c8 Branch:nightly (Windows 2008ServerR2)
2014-11-27 17:10:39 DEBUG   ::MAIN: Connecting to utorrent: http://localhost:7000/gui/
2014-11-27 17:10:40 INFO    ::MAIN: #########################################################
2014-11-27 17:10:40 INFO    ::MAIN: ## ..::[TorrentToMedia.py]::.. ##
2014-11-27 17:10:40 INFO    ::MAIN: #########################################################
2014-11-27 17:10:40 DEBUG   ::MAIN: Options passed into TorrentToMedia: ['C:\\NZBGet\\scripts\\nzbToMedia\\TorrentToMedia.py', 'D:\\ServerFolders\\Torrents-Complete\\tv\\NCIS.New.Orleans.S01E09.Chasing.Ghosts.1080p.WEB-DL.DD5.1.H.264-CtrlHD[rarbg]', 'NCIS.New.Orleans.S01E09.Chasing.Ghosts.1080p.WEB-DL.DD5.1.H.264-CtrlHD[rarbg]', 'tv', '58714420767B74BAAB132F0BB38A11BF2A7C51CF']
2014-11-27 17:10:40 DEBUG   ::MAIN: Adding TORRENT download info for directory D:\ServerFolders\Torrents-Complete\tv\NCIS.New.Orleans.S01E09.Chasing.Ghosts.1080p.WEB-DL.DD5.1.H.264-CtrlHD[rarbg] to database
2014-11-27 17:10:40 DB      ::MAIN: nzbtomedia.db: UPDATE downloads SET status = ?, client_agent = ?, last_update = ?, input_id = ?, input_hash = ?, input_name = ? WHERE input_directory = ? with args [0, u'utorrent', 735564, u'58714420767B74BAAB132F0BB38A11BF2A7C51CF', u'58714420767B74BAAB132F0BB38A11BF2A7C51CF', u'NCIS.New.Orleans.S01E09.Chasing.Ghosts.1080p.WEB-DL.DD5.1.H.264-CtrlHD[rarbg]', u'D:\\ServerFolders\\Torrents-Complete\\tv\\NCIS.New.Orleans.S01E09.Chasing.Ghosts.1080p.WEB-DL.DD5.1.H.264-CtrlHD[rarbg]']
2014-11-27 17:10:40 DB      ::MAIN: nzbtomedia.db: INSERT OR IGNORE INTO downloads (status, client_agent, last_update, input_id, input_hash, input_name, input_directory) VALUES (?, ?, ?, ?, ?, ?, ?) with args [0, u'utorrent', 735564, u'58714420767B74BAAB132F0BB38A11BF2A7C51CF', u'58714420767B74BAAB132F0BB38A11BF2A7C51CF', u'NCIS.New.Orleans.S01E09.Chasing.Ghosts.1080p.WEB-DL.DD5.1.H.264-CtrlHD[rarbg]', u'D:\\ServerFolders\\Torrents-Complete\\tv\\NCIS.New.Orleans.S01E09.Chasing.Ghosts.1080p.WEB-DL.DD5.1.H.264-CtrlHD[rarbg]']
2014-11-27 17:10:40 DEBUG   ::MAIN: Received Directory: D:\ServerFolders\Torrents-Complete\tv\NCIS.New.Orleans.S01E09.Chasing.Ghosts.1080p.WEB-DL.DD5.1.H.264-CtrlHD[rarbg] | Name: NCIS.New.Orleans.S01E09.Chasing.Ghosts.1080p.WEB-DL.DD5.1.H.264-CtrlHD[rarbg] | Category: tv
2014-11-27 17:10:40 DEBUG   ::MAIN: SEARCH: Found the Category: tv in directory structure
2014-11-27 17:10:40 INFO    ::MAIN: SEARCH: Found a unique directory NCIS.New.Orleans.S01E09.Chasing.Ghosts.1080p.WEB-DL.DD5.1.H.264-CtrlHD[rarbg] in the category directory
2014-11-27 17:10:40 DEBUG   ::MAIN: Determined Directory: D:\ServerFolders\Torrents-Complete\tv\NCIS.New.Orleans.S01E09.Chasing.Ghosts.1080p.WEB-DL.DD5.1.H.264-CtrlHD[rarbg] | Name: NCIS.New.Orleans.S01E09.Chasing.Ghosts.1080p.WEB-DL.DD5.1.H.264-CtrlHD[rarbg] | Category: tv
2014-11-27 17:10:40 INFO    ::MAIN: Auto-detected SECTION:NzbDrone
2014-11-27 17:10:40 DEBUG   ::MAIN: Stopping torrent NCIS.New.Orleans.S01E09.Chasing.Ghosts.1080p.WEB-DL.DD5.1.H.264-CtrlHD[rarbg] in utorrent while processing
2014-11-27 17:10:45 INFO    ::MAIN: Output directory set to: D:\ServerFolders\Torrents-Processed\tv\NCIS.New.Orleans.S01E09.Chasing.Ghosts.1080p.WEB-DL.DD5.1.H.264-CtrlHD[rarbg]
2014-11-27 17:10:45 DEBUG   ::MAIN: Scanning files in directory: D:\ServerFolders\Torrents-Complete\tv\NCIS.New.Orleans.S01E09.Chasing.Ghosts.1080p.WEB-DL.DD5.1.H.264-CtrlHD[rarbg]
2014-11-27 17:10:45 DEBUG   ::MAIN: Found 2 files in D:\ServerFolders\Torrents-Complete\tv\NCIS.New.Orleans.S01E09.Chasing.Ghosts.1080p.WEB-DL.DD5.1.H.264-CtrlHD[rarbg]
2014-11-27 17:10:45 INFO    ::COPYLINK: MEDIAFILE: [NCIS.New.Orleans.S01E09.Chasing.Ghosts.1080p.WEB-DL.DD5.1.H.264-CtrlHD.mkv]
2014-11-27 17:10:45 INFO    ::COPYLINK: SOURCE FOLDER: [D:\ServerFolders\Torrents-Complete\tv\NCIS.New.Orleans.S01E09.Chasing.Ghosts.1080p.WEB-DL.DD5.1.H.264-CtrlHD[rarbg]]
2014-11-27 17:10:45 INFO    ::COPYLINK: TARGET FOLDER: [D:\ServerFolders\Torrents-Processed\tv\NCIS.New.Orleans.S01E09.Chasing.Ghosts.1080p.WEB-DL.DD5.1.H.264-CtrlHD[rarbg]]
2014-11-27 17:10:45 INFO    ::COPYLINK: Hard linking SOURCE MEDIAFILE -> TARGET FOLDER
2014-11-27 17:10:45 INFO    ::COPYLINK: MEDIAFILE: [NCIS.New.Orleans.S01E09.Chasing.Ghosts.1080p.WEB-DL.DD5.1.H.264-CtrlHD.srt]
2014-11-27 17:10:45 INFO    ::COPYLINK: SOURCE FOLDER: [D:\ServerFolders\Torrents-Complete\tv\NCIS.New.Orleans.S01E09.Chasing.Ghosts.1080p.WEB-DL.DD5.1.H.264-CtrlHD[rarbg]]
2014-11-27 17:10:45 INFO    ::COPYLINK: TARGET FOLDER: [D:\ServerFolders\Torrents-Processed\tv\NCIS.New.Orleans.S01E09.Chasing.Ghosts.1080p.WEB-DL.DD5.1.H.264-CtrlHD[rarbg]]
2014-11-27 17:10:45 INFO    ::COPYLINK: Hard linking SOURCE MEDIAFILE -> TARGET FOLDER
2014-11-27 17:10:45 DEBUG   ::MAIN: Checking for archives to extract in directory: D:\ServerFolders\Torrents-Processed\tv\NCIS.New.Orleans.S01E09.Chasing.Ghosts.1080p.WEB-DL.DD5.1.H.264-CtrlHD[rarbg]
2014-11-27 17:10:45 INFO    ::MAIN: FLATTEN: Flattening directory: D:\ServerFolders\Torrents-Processed\tv\NCIS.New.Orleans.S01E09.Chasing.Ghosts.1080p.WEB-DL.DD5.1.H.264-CtrlHD[rarbg]
2014-11-27 17:10:45 DEBUG   ::MAIN: Checking for empty folders in:D:\ServerFolders\Torrents-Processed\tv\NCIS.New.Orleans.S01E09.Chasing.Ghosts.1080p.WEB-DL.DD5.1.H.264-CtrlHD[rarbg]
2014-11-27 17:10:45 INFO    ::MAIN: Found 1 media files in D:\ServerFolders\Torrents-Processed\tv\NCIS.New.Orleans.S01E09.Chasing.Ghosts.1080p.WEB-DL.DD5.1.H.264-CtrlHD[rarbg]
2014-11-27 17:10:45 INFO    ::MAIN: Calling NzbDrone:tv to post-process:NCIS.New.Orleans.S01E09.Chasing.Ghosts.1080p.WEB-DL.DD5.1.H.264-CtrlHD[rarbg]
2014-11-27 17:10:45 INFO    ::MAIN: Attempting to verify tv fork
2014-11-27 17:10:45 INFO    ::MAIN: NzbDrone:tv fork set to default
2014-11-27 17:10:45 DEBUG   ::MAIN: calling command: c:\ffmpeg\bin\ffprobe.exe -v quiet -print_format json -show_format -show_streams -show_error C:\NZBGet\scripts\nzbToMedia\tests\test.mp4
2014-11-27 17:10:45 INFO    ::TRANSCODER: Checking [NCIS.New.Orleans.S01E09.Chasing.Ghosts.1080p.WEB-DL.DD5.1.H.264-CtrlHD.mkv] for corruption, please stand by ...
2014-11-27 17:10:45 DEBUG   ::MAIN: calling command: c:\ffmpeg\bin\ffprobe.exe -v quiet -print_format json -show_format -show_streams -show_error D:\ServerFolders\Torrents-Processed\tv\NCIS.New.Orleans.S01E09.Chasing.Ghosts.1080p.WEB-DL.DD5.1.H.264-CtrlHD[rarbg]\NCIS.New.Orleans.S01E09.Chasing.Ghosts.1080p.WEB-DL.DD5.1.H.264-CtrlHD.mkv
2014-11-27 17:10:45 INFO    ::TRANSCODER: SUCCESS: [NCIS.New.Orleans.S01E09.Chasing.Ghosts.1080p.WEB-DL.DD5.1.H.264-CtrlHD.mkv] has no corruption.
2014-11-27 17:10:45 INFO    ::MAIN: FLATTEN: Flattening directory: D:\ServerFolders\Torrents-Processed\tv\NCIS.New.Orleans.S01E09.Chasing.Ghosts.1080p.WEB-DL.DD5.1.H.264-CtrlHD[rarbg]
2014-11-27 17:10:45 DEBUG   ::MAIN: Checking for empty folders in:D:\ServerFolders\Torrents-Processed\tv\NCIS.New.Orleans.S01E09.Chasing.Ghosts.1080p.WEB-DL.DD5.1.H.264-CtrlHD[rarbg]
2014-11-27 17:10:46 INFO    ::MAIN: FLATTEN: Flattening directory: D:\ServerFolders\Torrents-Processed\tv\NCIS.New.Orleans.S01E09.Chasing.Ghosts.1080p.WEB-DL.DD5.1.H.264-CtrlHD[rarbg]
2014-11-27 17:10:46 DEBUG   ::MAIN: Checking for empty folders in:D:\ServerFolders\Torrents-Processed\tv\NCIS.New.Orleans.S01E09.Chasing.Ghosts.1080p.WEB-DL.DD5.1.H.264-CtrlHD[rarbg]
2014-11-27 17:10:46 POSTPROCESS::NZBDRONE: SUCCESS: The download succeeded, sending a post-process request
2014-11-27 17:10:46 DEBUG   ::NZBDRONE: path: D:\ServerFolders\Torrents-Processed\tv\NCIS.New.Orleans.S01E09.Chasing.Ghosts.1080p.WEB-DL.DD5.1.H.264-CtrlHD[rarbg]
2014-11-27 17:10:46 DEBUG   ::NZBDRONE: Opening URL: http://localhost:8989/api/command with data: {"path": "D:\\ServerFolders\\Torrents-Processed\\tv\\NCIS.New.Orleans.S01E09.Chasing.Ghosts.1080p.WEB-DL.DD5.1.H.264-CtrlHD[rarbg]", "name": "DownloadedEpisodesScan", "downloadClientId": "58714420767B74BAAB132F0BB38A11BF2A7C51CF"}
2014-11-27 17:10:46 DEBUG   ::NZBDRONE: Scan started with id: 485
2014-11-27 17:12:46 DEBUG   ::NZBDRONE: The Scan command return status: running
2014-11-27 17:12:46 DEBUG   ::NZBDRONE: The Scan command did not return status completed, but complete Download Handling is enabled. Passing back to NzbDrone.
2014-11-27 17:12:46 DB      ::DB: Updating status of our download NCIS.New.Orleans.S01E09.Chasing.Ghosts.1080p.WEB-DL.DD5.1.H.264-CtrlHD[rarbg] in the DB to 1
2014-11-27 17:12:46 DB      ::MAIN: nzbtomedia.db: UPDATE downloads SET status=?, last_update=? WHERE input_name=? with args [1, 735564, u'NCIS.New.Orleans.S01E09.Chasing.Ghosts.1080p.WEB-DL.DD5.1.H.264-CtrlHD[rarbg]']
2014-11-27 17:12:46 DEBUG   ::MAIN: Starting torrent NCIS.New.Orleans.S01E09.Chasing.Ghosts.1080p.WEB-DL.DD5.1.H.264-CtrlHD[rarbg] in utorrent
2014-11-27 17:12:51 INFO    ::CLEANDIR: Doing Forceful Clean of D:\ServerFolders\Torrents-Processed\tv\NCIS.New.Orleans.S01E09.Chasing.Ghosts.1080p.WEB-DL.DD5.1.H.264-CtrlHD[rarbg]
2014-11-27 17:12:51 INFO    ::MAIN: Deleting D:\ServerFolders\Torrents-Processed\tv\NCIS.New.Orleans.S01E09.Chasing.Ghosts.1080p.WEB-DL.DD5.1.H.264-CtrlHD[rarbg]
2014-11-27 17:12:51 ERROR   ::MAIN: Unable to delete folder D:\ServerFolders\Torrents-Processed\tv\NCIS.New.Orleans.S01E09.Chasing.Ghosts.1080p.WEB-DL.DD5.1.H.264-CtrlHD[rarbg]
2014-11-27 17:12:51 INFO    ::MAIN: The C:\NZBGet\scripts\nzbToMedia\TorrentToMedia.py script completed successfully. 

sonarr error message

[NCIS.New.Orleans.S01E09.Chasing.Ghosts.1080p.WEB-DL.DD5.1.H.264-CtrlHD[rarbg]] Failed to import:
NCIS.New.Orleans.S01E09.Chasing.Ghosts.1080p.WEB-DL.DD5.1.H.264-CtrlHD.mkv
- Failed to import episode

but when looking in the destination i can find the file NCIS.New.Orleans.S01E09.Chasing.Ghosts.1080p.WEB-DL.DD5.1.H.264-CtrlHD[rarbg].mkv