From 6897dab6477f0ce2e1ba05c6849272b772ea3ab7 Mon Sep 17 00:00:00 2001 From: fenduru Date: Sat, 9 Aug 2014 11:20:23 -0400 Subject: [PATCH 1/9] Give higher weight to freeleech torrents --- .../media/_base/providers/torrent/passthepopcorn.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/couchpotato/core/media/_base/providers/torrent/passthepopcorn.py b/couchpotato/core/media/_base/providers/torrent/passthepopcorn.py index 609ef2d4..40a55674 100644 --- a/couchpotato/core/media/_base/providers/torrent/passthepopcorn.py +++ b/couchpotato/core/media/_base/providers/torrent/passthepopcorn.py @@ -64,6 +64,10 @@ class Base(TorrentProvider): torrentdesc += ' HQ' if self.conf('prefer_golden'): torrentscore += 5000 + if 'FreeleechType' in torrent: + torrentdesc += ' Freeleech' + if self.conf('prefer_freeleech'): + torrentscore += 7000 if 'Scene' in torrent and torrent['Scene']: torrentdesc += ' Scene' if self.conf('prefer_scene'): @@ -223,6 +227,14 @@ config = [{ 'default': 1, 'description': 'Favors Golden Popcorn-releases over all other releases.' }, + { + 'name': 'prefer_freeleech', + 'advanced': True, + 'type': 'bool', + 'label': 'Prefer Freeleech', + 'default': 1, + 'description': 'Favors torrents marked as freeleech over all other releases.' + }, { 'name': 'prefer_scene', 'advanced': True, From 89f3b6624e148d707c0abd795592480d916806a1 Mon Sep 17 00:00:00 2001 From: dkboy Date: Sun, 17 Aug 2014 14:52:43 +1200 Subject: [PATCH 2/9] Update bitsoup.py They've rearranged the table --- couchpotato/core/media/_base/providers/torrent/bitsoup.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/couchpotato/core/media/_base/providers/torrent/bitsoup.py b/couchpotato/core/media/_base/providers/torrent/bitsoup.py index 9519e58b..392706c8 100644 --- a/couchpotato/core/media/_base/providers/torrent/bitsoup.py +++ b/couchpotato/core/media/_base/providers/torrent/bitsoup.py @@ -49,9 +49,9 @@ class Base(TorrentProvider): torrent_name = torrent.getText() - torrent_size = self.parseSize(all_cells[7].getText()) - torrent_seeders = tryInt(all_cells[9].getText()) - torrent_leechers = tryInt(all_cells[10].getText()) + torrent_size = self.parseSize(all_cells[8].getText()) + torrent_seeders = tryInt(all_cells[10].getText()) + torrent_leechers = tryInt(all_cells[11].getText()) torrent_url = self.urls['baseurl'] % download['href'] torrent_detail_url = self.urls['baseurl'] % torrent['href'] From c0492a41d90bb3c336642054b732412fe57d3164 Mon Sep 17 00:00:00 2001 From: Clinton Hall Date: Fri, 22 Aug 2014 11:58:29 +0930 Subject: [PATCH 3/9] Ignore separator at end of string. Fixes #3823 --- couchpotato/core/plugins/renamer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/couchpotato/core/plugins/renamer.py b/couchpotato/core/plugins/renamer.py index ad72086e..238f1501 100644 --- a/couchpotato/core/plugins/renamer.py +++ b/couchpotato/core/plugins/renamer.py @@ -847,7 +847,7 @@ Remove it if you want it to be renamed (again, or at least let it try again) replaces = [ ('\.+', '.'), ('_+', '_'), ('-+', '-'), ('\s+', ' '), (' \\\\', '\\\\'), (' /', '/'), - ('(\s\.)+', '.'), ('(-\.)+', '.'), ('(\s-)+', '-'), + ('(\s\.)+', '.'), ('(-\.)+', '.'), ('(\s-)+', '-'), ('([\s\.\,\_\-\/\\]$)', ''), ] for r in replaces: From c545c9aab1dd0c809d6e89689ae13e30796eff92 Mon Sep 17 00:00:00 2001 From: Andrew Parker Date: Mon, 25 Aug 2014 09:43:06 -0600 Subject: [PATCH 4/9] Couchpotato will identify a release with 'hdtv' in the name as brrip. The passthepopcorn provider searched for brrip with the parameters media=Blu-ray. This created a condition where a 720p hdtv movie would not be snatched because the 720p quality would skip it due to being marked as 'brrip', and br-rip quality would not find it because it was not from a Blu-ray source. This changes the search parameters for brrip to resolution=anyhd to remove the requirement that it's source media is Blu-ray. --- .../core/media/movie/providers/torrent/passthepopcorn.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/couchpotato/core/media/movie/providers/torrent/passthepopcorn.py b/couchpotato/core/media/movie/providers/torrent/passthepopcorn.py index bbaea265..2b577ad9 100644 --- a/couchpotato/core/media/movie/providers/torrent/passthepopcorn.py +++ b/couchpotato/core/media/movie/providers/torrent/passthepopcorn.py @@ -13,7 +13,7 @@ class PassThePopcorn(MovieProvider, Base): 'bd50': {'media': 'Blu-ray', 'format': 'BD50'}, '1080p': {'resolution': '1080p'}, '720p': {'resolution': '720p'}, - 'brrip': {'media': 'Blu-ray'}, + 'brrip': {'resolution': 'anyhd'}, 'dvdr': {'resolution': 'anysd'}, 'dvdrip': {'media': 'DVD'}, 'scr': {'media': 'DVD-Screener'}, @@ -27,7 +27,7 @@ class PassThePopcorn(MovieProvider, Base): 'bd50': {'Codec': ['BD50']}, '1080p': {'Resolution': ['1080p']}, '720p': {'Resolution': ['720p']}, - 'brrip': {'Source': ['Blu-ray'], 'Quality': ['High Definition'], 'Container': ['!ISO']}, + 'brrip': {'Quality': ['High Definition'], 'Container': ['!ISO']}, 'dvdr': {'Codec': ['DVD5', 'DVD9']}, 'dvdrip': {'Source': ['DVD'], 'Codec': ['!DVD5', '!DVD9']}, 'scr': {'Source': ['DVD-Screener']}, From b4a15f344d0a4437ac5a3575938274b6c4419567 Mon Sep 17 00:00:00 2001 From: Michael Walker Date: Tue, 26 Aug 2014 15:53:10 +0100 Subject: [PATCH 5/9] Updated URL's Replaced TPB links with working URL's --- .../media/_base/providers/torrent/thepiratebay.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/couchpotato/core/media/_base/providers/torrent/thepiratebay.py b/couchpotato/core/media/_base/providers/torrent/thepiratebay.py index 57bcfbdc..6a1de8d4 100644 --- a/couchpotato/core/media/_base/providers/torrent/thepiratebay.py +++ b/couchpotato/core/media/_base/providers/torrent/thepiratebay.py @@ -24,16 +24,16 @@ class Base(TorrentMagnetProvider): http_time_between_calls = 0 proxy_list = [ - 'https://nobay.net', + 'https://www.dieroschtibay.org', 'https://thebay.al', 'https://thepiratebay.se', - 'http://thepiratebay.cd', + 'http://thepiratebay.se.net', 'http://thebootlegbay.com', - 'http://www.tpb.gr', - 'http://tpbproxy.co.uk', + 'http://tpb.ninja.so', + 'http://proxybay.fr', 'http://pirateproxy.in', - 'http://www.getpirate.com', - 'http://piratebay.io', + 'http://piratebay.skey.sk', + 'http://pirateproxy.be', 'http://bayproxy.li', 'http://proxybay.pw', ] From 416c9eabdedd7a7ae509c72503d9c65f8c415721 Mon Sep 17 00:00:00 2001 From: Ruud Date: Wed, 27 Aug 2014 19:35:32 +0200 Subject: [PATCH 6/9] Update charts every 3 days --- couchpotato/core/media/movie/charts/__init__.py | 7 ------- couchpotato/core/media/movie/charts/main.py | 5 +++-- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/couchpotato/core/media/movie/charts/__init__.py b/couchpotato/core/media/movie/charts/__init__.py index 361da51a..cc17d97e 100644 --- a/couchpotato/core/media/movie/charts/__init__.py +++ b/couchpotato/core/media/movie/charts/__init__.py @@ -21,13 +21,6 @@ config = [{ 'type': 'int', 'description': 'Maximum number of items displayed from each chart.', }, - { - 'name': 'update_interval', - 'default': 12, - 'type': 'int', - 'advanced': True, - 'description': '(hours)', - }, { 'name': 'hide_wanted', 'default': False, diff --git a/couchpotato/core/media/movie/charts/main.py b/couchpotato/core/media/movie/charts/main.py index fe6ddc0f..28d5d68a 100644 --- a/couchpotato/core/media/movie/charts/main.py +++ b/couchpotato/core/media/movie/charts/main.py @@ -13,13 +13,14 @@ log = CPLog(__name__) class Charts(Plugin): update_in_progress = False + update_interval = 72 # hours def __init__(self): addApiView('charts.view', self.automationView) addEvent('app.load', self.setCrons) def setCrons(self): - fireEvent('schedule.interval', 'charts.update_cache', self.updateViewCache, hours = self.conf('update_interval', default = 12)) + fireEvent('schedule.interval', 'charts.update_cache', self.updateViewCache, hours = self.update_interval) def automationView(self, force_update = False, **kwargs): @@ -52,7 +53,7 @@ class Charts(Plugin): for chart in charts: chart['hide_wanted'] = self.conf('hide_wanted') chart['hide_library'] = self.conf('hide_library') - self.setCache('charts_cached', charts, timeout = 7200 * tryInt(self.conf('update_interval', default = 12))) + self.setCache('charts_cached', charts, timeout = self.update_interval * 3600) except: log.error('Failed refreshing charts') From 282f6fb73a8c04fc5228d7e18627fcd2872e4567 Mon Sep 17 00:00:00 2001 From: Ruud Date: Wed, 27 Aug 2014 19:35:52 +0200 Subject: [PATCH 7/9] Only get fanart with extended info --- couchpotato/core/media/movie/providers/info/fanarttv.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/couchpotato/core/media/movie/providers/info/fanarttv.py b/couchpotato/core/media/movie/providers/info/fanarttv.py index fcd3891b..49d944e0 100644 --- a/couchpotato/core/media/movie/providers/info/fanarttv.py +++ b/couchpotato/core/media/movie/providers/info/fanarttv.py @@ -23,10 +23,9 @@ class FanartTV(MovieProvider): def __init__(self): addEvent('movie.info', self.getArt, priority = 1) - def getArt(self, identifier = None, **kwargs): + def getArt(self, identifier = None, extended = True, **kwargs): - log.debug("Getting Extra Artwork from Fanart.tv...") - if not identifier: + if not identifier or not extended: return {} images = {} From 42d728f71e99e9e65c0f2aa48900f927dc573b33 Mon Sep 17 00:00:00 2001 From: Ruud Date: Wed, 27 Aug 2014 19:40:28 +0200 Subject: [PATCH 8/9] Update ubuntu start script closes #3846 --- init/ubuntu | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/init/ubuntu b/init/ubuntu index 1d2eb57a..8c5d556a 100755 --- a/init/ubuntu +++ b/init/ubuntu @@ -46,7 +46,7 @@ DESC=CouchPotato # Run CP as username RUN_AS=${CP_USER-couchpotato} -# Path to app +# Path to app # CP_HOME=path_to_app_CouchPotato.py APP_PATH=${CP_HOME-/opt/couchpotato/} @@ -100,12 +100,12 @@ case "$1" in ;; stop) echo "Stopping $DESC" - start-stop-daemon --stop --pidfile $PID_FILE --retry 15 + start-stop-daemon --stop --pidfile $PID_FILE --retry 15 --oknodo ;; restart|force-reload) echo "Restarting $DESC" - start-stop-daemon --stop --pidfile $PID_FILE --retry 15 + start-stop-daemon --stop --pidfile $PID_FILE --retry 15 --oknodo start-stop-daemon -d $APP_PATH -c $RUN_AS $EXTRA_SSD_OPTS --start --pidfile $PID_FILE --exec $DAEMON -- $DAEMON_OPTS ;; From 91c24105cc78265aa429eb187274564fae111f1a Mon Sep 17 00:00:00 2001 From: Ruud Date: Wed, 27 Aug 2014 19:45:46 +0200 Subject: [PATCH 9/9] Dockers readme install --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index a38c0520..1ccf6892 100644 --- a/README.md +++ b/README.md @@ -46,6 +46,8 @@ Linux: * (systemd) Enable it at boot with `sudo systemctl enable couchpotato` * Open your browser and go to `http://localhost:5050/` +Docker: +* You can use [razorgirl's Dockerfile](https://github.com/razorgirl/docker-couchpotato) to quickly build your own isolated app container. It's based on the Linux instructions above. For more info about Docker check out the [official website](https://www.docker.com). FreeBSD :