From a5adffa8b8a6d456340cc9fce2dc7b3c6b877922 Mon Sep 17 00:00:00 2001 From: laharah Date: Thu, 27 Apr 2017 12:40:55 -0700 Subject: [PATCH 1/3] updated readme to reflect deluge's default 2.7 status --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 0b3ac3b..aaae7fb 100644 --- a/README.md +++ b/README.md @@ -57,7 +57,7 @@ if you want the very latest release, you can build the plugin from source. You will need: - git -- a version of python that matches your deluge version (2.6 by default) +- a version of python that matches your deluge version (2.7 by default) ######Instructions: - in a command window, type @@ -69,10 +69,10 @@ You will need: - then to build the plugin, on linux/osx type: ``` - python2.6 setup.py bdist_egg # replace with 2.7 if deluge uses python 2.7 + python2.7 setup.py bdist_egg # replace with 2.6 if your deluge uses python 2.6 ``` or on windows: ``` - py -2.6 setup.py bdist_egg + py -2.7 setup.py bdist_egg ``` - The new .egg file located in the `dist/` folder is now ready to be added to deluge. From ffeb8e5e8e02d0a99aa9384b3f47a3bb85a28aa8 Mon Sep 17 00:00:00 2001 From: laharah Date: Sat, 13 May 2017 10:19:19 -0700 Subject: [PATCH 2/3] Added some more debug logging for filebotfatalerror --- filebottool/core.py | 4 ++-- filebottool/pyfilebot.py | 4 ++-- setup.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/filebottool/core.py b/filebottool/core.py index 890578a..7c8f78c 100755 --- a/filebottool/core.py +++ b/filebottool/core.py @@ -94,8 +94,8 @@ def enable(self): self.filebot_version = pyfilebot.get_version() log.info("Filebot Found with version {0}".format( self.filebot_version)) - except pyfilebot.FilebotFatalError: - log.error("Filebot cannot be found!") + except pyfilebot.FilebotFatalError as e: + log.error('FilebotFatalError ' + str(e)) self.filebot_version = None self.torrent_manager = component.get("TorrentManager") diff --git a/filebottool/pyfilebot.py b/filebottool/pyfilebot.py index 10912f4..dd61f56 100644 --- a/filebottool/pyfilebot.py +++ b/filebottool/pyfilebot.py @@ -583,8 +583,8 @@ def _execute(process_arguments, workaround=True): stderr=killableprocess.subprocess.PIPE, stdin=killableprocess.subprocess.PIPE, startupinfo=startupinfo) - except OSError: - raise FilebotFatalError("Filebot could not be found!") + except OSError as e: + raise FilebotFatalError("Error running Filebot! {0}".format(str(e))) stdout, error = process.communicate() exit_code = process.returncode diff --git a/setup.py b/setup.py index f9832e4..6a0f651 100755 --- a/setup.py +++ b/setup.py @@ -42,7 +42,7 @@ __plugin_name__ = "FileBotTool" __author__ = "laharah" __author_email__ = "laharah+fbt@gmail.com" -__version__ = "1.1.8" +__version__ = "1.1.9" __url__ = "https://github.com/Laharah/deluge-FileBotTool" __license__ = "GPLv3" __description__ = "Integrates FileBot functionality to Deluge" From cc61a5011c2151b94668f6cbd4a64a4813d85015 Mon Sep 17 00:00:00 2001 From: laharah Date: Tue, 1 Aug 2017 18:14:26 -0700 Subject: [PATCH 3/3] Added fixes for #33 and #34 - ubuntu doesen't like `snap` apps to share tmp files, workarounds are now limited to just windows os' --- README.md | 2 +- filebottool/pyfilebot.py | 7 ++++--- setup.py | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index aaae7fb..7f30c2e 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # FilebotTool: FileBot Integration for Deluge *requires [Filebot](http://www.filebot.net/)* -**Version 1.1.8** +**Version 1.1.10** ##### [Download Latest Release](https://github.com/Laharah/deluge-FilebotTool/releases/latest) diff --git a/filebottool/pyfilebot.py b/filebottool/pyfilebot.py index dd61f56..2fcc21a 100644 --- a/filebottool/pyfilebot.py +++ b/filebottool/pyfilebot.py @@ -20,7 +20,7 @@ if not FILEBOT_EXE: locations = [ r'C:\Program Files\FileBot\filebot.exe', r'/usr/bin/filebot', - r'/usr/local/bin/filebot' + r'/usr/local/bin/filebot', r'/snap/bin/filebot' ] for loc in locations: if os.path.exists(loc): @@ -141,7 +141,8 @@ def rename(targets, language_code=language_code) # TODO:better error handling - exit_code, data, filebot_error = _execute(filebot_arguments) + workaround = True if os.name == 'nt' else False + exit_code, data, filebot_error = _execute(filebot_arguments, workaround) if exit_code != 0: raise FilebotRuntimeError("FILEBOT OUTPUT DUMP:\n{0}".format(data)) @@ -546,7 +547,7 @@ def _build_script_arguments(script_name, script_arguments): return process_arguments -def _execute(process_arguments, workaround=True): +def _execute(process_arguments, workaround=False): """underlying execution method to call filebot as subprocess Handles the actual execution and output capture diff --git a/setup.py b/setup.py index 6a0f651..726a2a8 100755 --- a/setup.py +++ b/setup.py @@ -42,7 +42,7 @@ __plugin_name__ = "FileBotTool" __author__ = "laharah" __author_email__ = "laharah+fbt@gmail.com" -__version__ = "1.1.9" +__version__ = "1.1.10" __url__ = "https://github.com/Laharah/deluge-FileBotTool" __license__ = "GPLv3" __description__ = "Integrates FileBot functionality to Deluge"