From ef4470bd789da13878d1a8db328b08374f501f63 Mon Sep 17 00:00:00 2001 From: JackDandy Date: Wed, 5 Nov 2014 05:36:16 +0000 Subject: [PATCH] Add send2trash, General Config/Send to trash, and catch show dir not found exception. Add send2trash, a small package that sends files to the Trash (or Recycle Bin) natively and on all platforms. If send2trash is found not compatible, the user can use the default delete and manually delete failed send2trash files. Add General Config/Misc/Send to trash for actions that involve removing shows and log rotation. Add handling for the exception raised while deleting a show and show folder no longer exists. --- CHANGES.md | 4 +- gui/slick/css/style.css | 2 +- .../interfaces/default/config_general.tmpl | 15 ++ lib/send2trash/__init__.py | 19 +++ lib/send2trash/compat.py | 13 ++ lib/send2trash/plat_gio.py | 14 ++ lib/send2trash/plat_osx.py | 48 ++++++ lib/send2trash/plat_other.py | 160 ++++++++++++++++++ lib/send2trash/plat_win.py | 59 +++++++ sickbeard/__init__.py | 9 +- sickbeard/logger.py | 12 +- sickbeard/tv.py | 38 ++++- sickbeard/webserve.py | 9 +- 13 files changed, 389 insertions(+), 13 deletions(-) create mode 100644 lib/send2trash/__init__.py create mode 100644 lib/send2trash/compat.py create mode 100644 lib/send2trash/plat_gio.py create mode 100644 lib/send2trash/plat_osx.py create mode 100644 lib/send2trash/plat_other.py create mode 100644 lib/send2trash/plat_win.py diff --git a/CHANGES.md b/CHANGES.md index cc252b85..d4b36d95 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,4 +1,4 @@ -### 0.x.x (2014-11-03 xx:xx:xx UTC) +### 0.x.x (2014-11-05 xx:xx:xx UTC) * Add Bootstrap for UI features * Change UI to resize fluidly on different display sizes, fixes the issue where top menu items would disappear on smaller screens. @@ -37,6 +37,8 @@ * Removed requirement for http login for API when an API key is provided * Change API now uses Timezone setting at General Config/Interface/User Interface/ at relevant endpoints * Fixes changing root dirs on the mass edit page +* Add the ability to use trash (or Recycle Bin) for selected actions on General Config/Misc/Send to trash +* Add handling for when deleting a show and the show folder no longer exists [develop changelog] * Improve display of progress bars in the Downloads columns of the show list page diff --git a/gui/slick/css/style.css b/gui/slick/css/style.css index fdea91e0..17cb500b 100644 --- a/gui/slick/css/style.css +++ b/gui/slick/css/style.css @@ -3009,7 +3009,7 @@ span.token-input-delete-token { .red-text {color:#d33} .clear-left {clear:left} - +.nextline-block {display:block} /* ======================================================================= jquery.confirm.css ========================================================================== */ diff --git a/gui/slick/interfaces/default/config_general.tmpl b/gui/slick/interfaces/default/config_general.tmpl index 3c73da17..23b23f39 100644 --- a/gui/slick/interfaces/default/config_general.tmpl +++ b/gui/slick/interfaces/default/config_general.tmpl @@ -72,6 +72,21 @@ +
+ Send to trash for actions + + + +

selected actions use trash (recycle bin) instead of the default permanent delete

+
+
+