From 291be93382e2069edc9c3390079a7d6353df03ab Mon Sep 17 00:00:00 2001 From: Michael Johnson Date: Thu, 26 Jun 2014 06:05:36 -0400 Subject: [PATCH 1/2] Fix a bug where SickRage won't process failed downloads because the directory doesn't exist --- nzbtomedia/autoProcess/autoProcessTV.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/nzbtomedia/autoProcess/autoProcessTV.py b/nzbtomedia/autoProcess/autoProcessTV.py index 4e002fb0..46907bc2 100644 --- a/nzbtomedia/autoProcess/autoProcessTV.py +++ b/nzbtomedia/autoProcess/autoProcessTV.py @@ -85,6 +85,16 @@ class autoProcessTV: if os.path.isdir(SpecificPath): dirName = SpecificPath + # Attempt to create the directory if it doesn't exist and ignore any + # error stating that it already exists. This fixes a bug where SickRage + # won't process the directory because it doesn't exist. + try: + os.makedirs(dirName) # Attempt to create the directory + except OSError, e: + # Re-raise the error if it wasn't about the directory not existing + if exception.errno != errno.EEXIST: + raise + # Check video files for corruption status = int(failed) good_files = 0 From bc21aeab893cb0beb381944125e1b8ac4c0f3270 Mon Sep 17 00:00:00 2001 From: Michael Johnson Date: Thu, 26 Jun 2014 06:14:07 -0400 Subject: [PATCH 2/2] Specify Python version to use --- DeleteSamples.py | 2 +- ResetDateTime.py | 2 +- TorrentToMedia.py | 2 +- nzbToCouchPotato.py | 2 +- nzbToGamez.py | 2 +- nzbToHeadPhones.py | 2 +- nzbToMedia.py | 2 +- nzbToMylar.py | 2 +- nzbToNzbDrone.py | 2 +- nzbToSickBeard.py | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/DeleteSamples.py b/DeleteSamples.py index 4f644ff9..885158f0 100755 --- a/DeleteSamples.py +++ b/DeleteSamples.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # ############################################################################## ### NZBGET POST-PROCESSING SCRIPT ### diff --git a/ResetDateTime.py b/ResetDateTime.py index 1a99a3f5..1bfdfb1c 100755 --- a/ResetDateTime.py +++ b/ResetDateTime.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # ############################################################################## ### NZBGET POST-PROCESSING SCRIPT ### diff --git a/TorrentToMedia.py b/TorrentToMedia.py index 8e45a586..4f9a457e 100755 --- a/TorrentToMedia.py +++ b/TorrentToMedia.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 import datetime import os import time diff --git a/nzbToCouchPotato.py b/nzbToCouchPotato.py index c37d82ee..3338168b 100755 --- a/nzbToCouchPotato.py +++ b/nzbToCouchPotato.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # ############################################################################## ### NZBGET POST-PROCESSING SCRIPT ### diff --git a/nzbToGamez.py b/nzbToGamez.py index 2f1208f6..3fb99843 100755 --- a/nzbToGamez.py +++ b/nzbToGamez.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # ############################################################################## ### NZBGET POST-PROCESSING SCRIPT ### diff --git a/nzbToHeadPhones.py b/nzbToHeadPhones.py index ce7b654a..6bae012e 100755 --- a/nzbToHeadPhones.py +++ b/nzbToHeadPhones.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # ############################################################################## ### NZBGET POST-PROCESSING SCRIPT ### diff --git a/nzbToMedia.py b/nzbToMedia.py index 8000edd2..63c87513 100755 --- a/nzbToMedia.py +++ b/nzbToMedia.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # ############################################################################## ### NZBGET POST-PROCESSING SCRIPT ### diff --git a/nzbToMylar.py b/nzbToMylar.py index 9a9d31bc..68ab0a55 100755 --- a/nzbToMylar.py +++ b/nzbToMylar.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # ############################################################################## ### NZBGET POST-PROCESSING SCRIPT ### diff --git a/nzbToNzbDrone.py b/nzbToNzbDrone.py index 709435d0..97d4900f 100755 --- a/nzbToNzbDrone.py +++ b/nzbToNzbDrone.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # ############################################################################## ### NZBGET POST-PROCESSING SCRIPT ### diff --git a/nzbToSickBeard.py b/nzbToSickBeard.py index afee486b..94c5f25d 100755 --- a/nzbToSickBeard.py +++ b/nzbToSickBeard.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # ############################################################################## ### NZBGET POST-PROCESSING SCRIPT ###