diff --git a/CHANGELOG.md b/CHANGELOG.md
index 35193d6b34..cc057ebba1 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,17 @@
+## 0.2.13 (2018-11-21)
+
+#### Improvements
+- Improved perfect match for subtitles downloading by making it a bit less strict ([#5729](https://github.com/pymedusa/Medusa/issues/5729))
+
+#### Fixes
+- Fixed ImportError when using Download Station client ([#5748](https://github.com/pymedusa/Medusa/pull/5748))
+- Fixed Torrent Search path option not being saved ([#5736](https://github.com/pymedusa/Medusa/pull/5736))
+- Fixed adding anime release group when adding show ([#5749](https://github.com/pymedusa/Medusa/pull/5749))
+- Fixed Pushover debug log causing BraceException ([#5759](https://github.com/pymedusa/Medusa/pull/5759))
+- Fixed torrent method Downloadstation not selected after restart ([#5761](https://github.com/pymedusa/Medusa/pull/5761))
+
+-----
+
## 0.2.12 (2018-11-16)
#### New Features
diff --git a/medusa/__main__.py b/medusa/__main__.py
index b055deb36b..2ec7e5b04f 100755
--- a/medusa/__main__.py
+++ b/medusa/__main__.py
@@ -578,7 +578,7 @@ def initialize(self, console_logging=True):
app.NZB_METHOD = check_setting_str(app.CFG, 'General', 'nzb_method', 'blackhole', valid_values=('blackhole', 'sabnzbd', 'nzbget'))
app.TORRENT_METHOD = check_setting_str(app.CFG, 'General', 'torrent_method', 'blackhole',
valid_values=('blackhole', 'utorrent', 'transmission', 'deluge',
- 'deluged', 'download_station', 'rtorrent', 'qbittorrent', 'mlnet'))
+ 'deluged', 'downloadstation', 'rtorrent', 'qbittorrent', 'mlnet'))
app.DOWNLOAD_PROPERS = bool(check_setting_int(app.CFG, 'General', 'download_propers', 1))
app.PROPERS_SEARCH_DAYS = max(2, min(8, check_setting_int(app.CFG, 'General', 'propers_search_days', 2)))
diff --git a/medusa/clients/torrent/__init__.py b/medusa/clients/torrent/__init__.py
index 32e136cc28..2cd2c58bd5 100644
--- a/medusa/clients/torrent/__init__.py
+++ b/medusa/clients/torrent/__init__.py
@@ -23,7 +23,7 @@
_clients = [
'deluge',
'deluged',
- 'download_station',
+ 'downloadstation',
'mlnet',
'qbittorrent',
'rtorrent',
diff --git a/medusa/common.py b/medusa/common.py
index c013edbd9f..93747e7fc6 100644
--- a/medusa/common.py
+++ b/medusa/common.py
@@ -39,7 +39,7 @@
long = int
INSTANCE_ID = str(uuid.uuid1())
-VERSION = '0.2.12'
+VERSION = '0.2.13'
USER_AGENT = 'Medusa/{version} ({system}; {release}; {instance})'.format(
version=VERSION, system=platform.system(), release=platform.release(),
instance=INSTANCE_ID)
diff --git a/medusa/notifiers/pushover.py b/medusa/notifiers/pushover.py
index 352cda24aa..34c2fa3214 100644
--- a/medusa/notifiers/pushover.py
+++ b/medusa/notifiers/pushover.py
@@ -90,7 +90,7 @@ def _send_pushover(self, msg, title, sound=None, user_key=None, api_key=None, pr
args['device'] = ','.join(app.PUSHOVER_DEVICE)
log.debug('PUSHOVER: Sending notice with details: title="{0}" message="{1}", priority={2}, sound={3}',
- args['title'], args['message'], priority, sound)
+ title, msg, priority, sound)
conn = HTTPSConnection('api.pushover.net:443')
conn.request('POST', '/1/messages.json',
diff --git a/medusa/server/api/v2/config.py b/medusa/server/api/v2/config.py
index 959f726bfa..0f7c9b4e5e 100644
--- a/medusa/server/api/v2/config.py
+++ b/medusa/server/api/v2/config.py
@@ -81,7 +81,7 @@ class ConfigHandler(BaseRequestHandler):
'clients.torrents.labelAnime': StringField(app, 'TORRENT_LABEL_ANIME'),
'clients.torrents.method': StringField(app, 'TORRENT_METHOD'),
'clients.torrents.password': StringField(app, 'TORRENT_PASSWORD'),
- 'clients.torrents.path': BooleanField(app, 'TORRENT_PATH'),
+ 'clients.torrents.path': StringField(app, 'TORRENT_PATH'),
'clients.torrents.paused': BooleanField(app, 'TORRENT_PAUSED'),
'clients.torrents.rpcurl': StringField(app, 'TORRENT_RPCURL'),
'clients.torrents.seedLocation': StringField(app, 'TORRENT_SEED_LOCATION'),
@@ -210,9 +210,9 @@ class ConfigHandler(BaseRequestHandler):
'notifiers.plex.server.updateLibrary': BooleanField(app, 'PLEX_UPDATE_LIBRARY'),
'notifiers.plex.server.host': ListField(app, 'PLEX_SERVER_HOST'),
'notifiers.plex.server.https': BooleanField(app, 'PLEX_SERVER_HTTPS'),
- 'notifiers.plex.server.username': StringField(app, 'PLEX_SERVER_HOST'),
- 'notifiers.plex.server.password': StringField(app, 'PLEX_SERVER_HOST'),
- 'notifiers.plex.server.token': StringField(app, 'PLEX_SERVER_HOST'),
+ 'notifiers.plex.server.username': StringField(app, 'PLEX_SERVER_USERNAME'),
+ 'notifiers.plex.server.password': StringField(app, 'PLEX_SERVER_PASSWORD'),
+ 'notifiers.plex.server.token': StringField(app, 'PLEX_SERVER_TOKEN'),
'notifiers.plex.client.enabled': BooleanField(app, 'USE_PLEX_CLIENT'),
'notifiers.plex.client.username': StringField(app, 'PLEX_CLIENT_USERNAME'),
'notifiers.plex.client.host': ListField(app, 'PLEX_CLIENT_HOST'),
@@ -932,6 +932,7 @@ def data_clients():
section_data['torrents']['seedLocation'] = app.TORRENT_SEED_LOCATION
section_data['torrents']['seedTime'] = app.TORRENT_SEED_TIME
section_data['torrents']['username'] = app.TORRENT_USERNAME
+ section_data['torrents']['password'] = app.TORRENT_PASSWORD
section_data['torrents']['verifySSL'] = bool(app.TORRENT_VERIFY_CERT)
section_data['nzb'] = NonEmptyDict()
@@ -947,6 +948,7 @@ def data_clients():
section_data['nzb']['nzbget']['priority'] = int(app.NZBGET_PRIORITY)
section_data['nzb']['nzbget']['useHttps'] = bool(app.NZBGET_USE_HTTPS)
section_data['nzb']['nzbget']['username'] = app.NZBGET_USERNAME
+ section_data['nzb']['nzbget']['password'] = app.NZBGET_PASSWORD
section_data['nzb']['sabnzbd'] = NonEmptyDict()
section_data['nzb']['sabnzbd']['category'] = app.SAB_CATEGORY
@@ -956,5 +958,7 @@ def data_clients():
section_data['nzb']['sabnzbd']['forced'] = bool(app.SAB_FORCED)
section_data['nzb']['sabnzbd']['host'] = app.SAB_HOST
section_data['nzb']['sabnzbd']['username'] = app.SAB_USERNAME
+ section_data['nzb']['sabnzbd']['password'] = app.SAB_PASSWORD
+ section_data['nzb']['sabnzbd']['apiKey'] = app.SAB_APIKEY
return section_data
diff --git a/medusa/server/web/home/add_shows.py b/medusa/server/web/home/add_shows.py
index 04ab202b36..7032f9be06 100644
--- a/medusa/server/web/home/add_shows.py
+++ b/medusa/server/web/home/add_shows.py
@@ -480,8 +480,12 @@ def finishAddShow():
subtitles = config.checkbox_to_value(subtitles)
if whitelist:
+ if not isinstance(whitelist, list):
+ whitelist = [whitelist]
whitelist = short_group_names(whitelist)
if blacklist:
+ if not isinstance(blacklist, list):
+ blacklist = [blacklist]
blacklist = short_group_names(blacklist)
if not allowed_qualities:
diff --git a/medusa/server/web/manage/handler.py b/medusa/server/web/manage/handler.py
index 1cb4a23b21..0e664ff1dc 100644
--- a/medusa/server/web/manage/handler.py
+++ b/medusa/server/web/manage/handler.py
@@ -791,7 +791,7 @@ def manageTorrents(self):
if app.TORRENT_METHOD == 'utorrent':
webui_url = '/'.join(s.strip('/') for s in (webui_url, 'gui/'))
- if app.TORRENT_METHOD == 'download_station':
+ if app.TORRENT_METHOD == 'downloadstation':
if helpers.check_url('{url}download/'.format(url=webui_url)):
webui_url += 'download/'
else:
diff --git a/medusa/subtitles.py b/medusa/subtitles.py
index 6eff4917e4..cc45903669 100644
--- a/medusa/subtitles.py
+++ b/medusa/subtitles.py
@@ -563,18 +563,17 @@ def merge_subtitles(existing_subtitles, new_subtitles):
def get_min_score():
"""Return the min score to be used by subliminal.
- Perfect match = hash - resolution (subtitle for 720p is the same as for 1080p) - video_codec - audio_codec
+ Perfect match = series + year + season + episode + release_group
Non-perfect match = series + year + season + episode
:return: min score to be used to download subtitles
:rtype: int
"""
+ min_score = episode_scores['series'] + episode_scores['year'] + episode_scores['season'] + episode_scores['episode']
if app.SUBTITLES_PERFECT_MATCH:
- return episode_scores['hash'] - (episode_scores['resolution'] +
- episode_scores['video_codec'] +
- episode_scores['audio_codec'])
+ min_score += episode_scores['release_group']
- return episode_scores['series'] + episode_scores['year'] + episode_scores['season'] + episode_scores['episode']
+ return min_score
def get_current_subtitles(tv_episode):
diff --git a/package.json b/package.json
index 607bef4528..74e5520366 100644
--- a/package.json
+++ b/package.json
@@ -17,6 +17,6 @@
"devDependencies": {
"dredd": "5.2.0",
"execa": "1.0.0",
- "yargs": "12.0.2"
+ "yargs": "12.0.5"
}
}
diff --git a/tests/test_subtitles.py b/tests/test_subtitles.py
index 0756e6c924..a5fe15b350 100644
--- a/tests/test_subtitles.py
+++ b/tests/test_subtitles.py
@@ -370,6 +370,28 @@ def test_merge_subtitles__with_multi_disabled_and_single_new_language(monkeypatc
assert ['eng', 'pob', 'und'] == actual
+def test_get_min_score__with_perfect_match_enabled(monkeypatch):
+ # Given
+ monkeypatch.setattr(app, 'SUBTITLES_PERFECT_MATCH', True)
+
+ # When
+ actual = sut.get_min_score()
+
+ # Then
+ assert 345 == actual
+
+
+def test_get_min_score__with_perfect_match_disabled(monkeypatch):
+ # Given
+ monkeypatch.setattr(app, 'SUBTITLES_PERFECT_MATCH', False)
+
+ # When
+ actual = sut.get_min_score()
+
+ # Then
+ assert 330 == actual
+
+
def test_get_subtitles_dir__no_subtitles_dir(monkeypatch):
# Given
monkeypatch.setattr(app, 'SUBTITLES_DIR', '')
diff --git a/themes-default/slim/package.json b/themes-default/slim/package.json
index 7c49901457..cbfa0d4e8c 100644
--- a/themes-default/slim/package.json
+++ b/themes-default/slim/package.json
@@ -84,7 +84,7 @@
"vue-template-compiler": "2.5.17",
"vue-truncate-collapsed": "2.1.0",
"vuex": "3.0.1",
- "webpack": "4.25.1",
+ "webpack": "4.26.0",
"webpack-cli": "3.1.2",
"xo": "0.23.0"
},
diff --git a/themes-default/slim/src/components/add-show-options.vue b/themes-default/slim/src/components/add-show-options.vue
index fda4474936..88ab782305 100644
--- a/themes-default/slim/src/components/add-show-options.vue
+++ b/themes-default/slim/src/components/add-show-options.vue
@@ -13,7 +13,7 @@
-
@@ -44,12 +44,12 @@
-
+ :explanations="['Is this show an Anime?']" :value="selectedAnimeEnabled" @input="selectedAnimeEnabled = $event">
@@ -65,7 +65,7 @@
-
@@ -138,7 +138,8 @@ export default {
vm.selectedStatusAfter,
vm.selectedSubtitleEnabled,
vm.selectedSeasonFoldersEnabled,
- vm.selectedSceneEnabled
+ vm.selectedSceneEnabled,
+ vm.selectedAnimeEnabled
].join(), () => {
this.update();
});
@@ -264,7 +265,6 @@ export default {
enableAnimeOptions,
defaultConfig,
namingForceFolders,
-
selectedStatus,
selectedStatusAfter,
combinedQualities,
@@ -305,6 +305,7 @@ export default {
},
release: {
handler() {
+ this.$emit('refresh');
this.update();
},
deep: true,
@@ -327,8 +328,13 @@ export default {
this.update();
},
defaultConfig(newValue) {
+ const { namingForceFolders } = this;
this.selectedStatus = newValue.status;
this.selectedStatusAfter = newValue.statusAfter;
+ this.selectedSubtitleEnabled = newValue.subtitles;
+ this.selectedAnimeEnabled = newValue.anime;
+ this.selectedSeasonFoldersEnabled = newValue.seasonFolders || namingForceFolders;
+ this.selectedSceneEnabled = newValue.scene;
}
}
};
diff --git a/themes-default/slim/src/store/modules/clients.js b/themes-default/slim/src/store/modules/clients.js
index dd4696aeec..b92804fc61 100644
--- a/themes-default/slim/src/store/modules/clients.js
+++ b/themes-default/slim/src/store/modules/clients.js
@@ -16,6 +16,7 @@ const state = {
seedLocation: null,
seedTime: null,
username: null,
+ password: null,
verifySSL: null,
testStatus: 'Click below to test'
},
@@ -31,7 +32,7 @@ const state = {
priority: null,
useHttps: null,
username: null,
- testStatus: 'Click below to test'
+ password: null
},
sabnzbd: {
category: null,
@@ -42,8 +43,7 @@ const state = {
host: null,
username: null,
password: null,
- apiKey: null,
- testStatus: 'Click below to test'
+ apiKey: null
}
}
};
diff --git a/themes-default/slim/views/config_notifications.mako b/themes-default/slim/views/config_notifications.mako
index 3760df993d..f6ba873be2 100644
--- a/themes-default/slim/views/config_notifications.mako
+++ b/themes-default/slim/views/config_notifications.mako
@@ -1042,7 +1042,7 @@ window.app = new Vue({