From e2f917ffbd7d2cac36520949271c69fff0e956f6 Mon Sep 17 00:00:00 2001 From: Berkona Date: Wed, 13 Feb 2013 20:31:33 -0500 Subject: [PATCH] Added VERSION constant to nzbToSickBeard, nzbToCouchPotato. Also finally renamed nzbToMediaEnv correctly... I was doing it on the github web interface so forgive the last commits --- env.py | 1 - nzbToCouchPotato.py | 16 +++++++++------- nznToMediaEnv => nzbToMediaEnv.py | 0 nzbToSickBeard.py | 16 +++++++++------- 4 files changed, 18 insertions(+), 15 deletions(-) delete mode 100644 env.py rename nznToMediaEnv => nzbToMediaEnv.py (100%) diff --git a/env.py b/env.py deleted file mode 100644 index e3611246..00000000 --- a/env.py +++ /dev/null @@ -1 +0,0 @@ -VERSION = 'V4.2' diff --git a/nzbToCouchPotato.py b/nzbToCouchPotato.py index d43cb7aa..d9bcd664 100755 --- a/nzbToCouchPotato.py +++ b/nzbToCouchPotato.py @@ -1,9 +1,11 @@ #!/usr/bin/env python import sys -import autoProcessMovie +import autoProcessMovie -print "nzbToCouchPotato V4.1" +from nzbToMediaEnv import * + +print "nzbToCouchPotato %s" % VERSION # SABnzbd if len(sys.argv) == 8: @@ -20,15 +22,15 @@ if len(sys.argv) == 8: # NZBGet elif len(sys.argv) == 4: -# NZBGet argv: -# 1 The final directory of the job (full path) -# 2 The original name of the NZB file +# NZBGet argv: +# 1 The final directory of the job (full path) +# 2 The original name of the NZB file # 3 The status of the download: 0 == successful print "Script triggered from NZBGet, starting autoProcessMovie..." - + autoProcessMovie.process(sys.argv[1], sys.argv[2], sys.argv[3]) else: - print "Invalid number of arguments received from client." + print "Invalid number of arguments received from client." print "Running autoProcessMovie as a manual run..." autoProcessMovie.process('Manual Run', 'Manual Run', 0) diff --git a/nznToMediaEnv b/nzbToMediaEnv.py similarity index 100% rename from nznToMediaEnv rename to nzbToMediaEnv.py diff --git a/nzbToSickBeard.py b/nzbToSickBeard.py index 635b36a2..d389097f 100755 --- a/nzbToSickBeard.py +++ b/nzbToSickBeard.py @@ -14,7 +14,7 @@ # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with Sick Beard. If not, see . # @@ -25,7 +25,9 @@ import sys import autoProcessTV -print "nzbToSickBeard V4.1" +from nzbToMediaEnv import * + +print "nzbToSickBeard %s" % VERSION # SABnzbd if len(sys.argv) == 8: @@ -42,15 +44,15 @@ if len(sys.argv) == 8: # NZBGet elif len(sys.argv) == 4: -# NZBGet argv: -# 1 The final directory of the job (full path) -# 2 The original name of the NZB file +# NZBGet argv: +# 1 The final directory of the job (full path) +# 2 The original name of the NZB file # 3 The status of the download: 0 == successful print "Script triggered from NZBGet, starting autoProcessTV..." - + autoProcessTV.processEpisode(sys.argv[1], sys.argv[2], sys.argv[3]) else: - print "Invalid number of arguments received from client." + print "Invalid number of arguments received from client." print "Running autoProcessTV as a manual run..." autoProcessTV.processEpisode('Manual Run', 'Manual Run', 0)