diff --git a/CHANGELOG.md b/CHANGELOG.md index 263f7ad62d..115d5984e7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ - Added delete method to EpisodeHandler (apiv2), for deleting a single episode ([#5685](https://github.com/pymedusa/Medusa/pull/5685)) - Allowed Nyaa and Anidex to search for non-anime shows ([#5680](https://github.com/pymedusa/Medusa/pull/5680) & [#5681](https://github.com/pymedusa/Medusa/pull/5681)) - Do not allow to enable the anime options, when using tmdb or tvmaze ([#5701](https://github.com/pymedusa/Medusa/pull/5701)) +- Vueified "config - search" page. Improved responsiveness of the notification page on smaller screens. ([#5553](https://github.com/pymedusa/Medusa/pull/5553)) #### Fixes - Fixed test not working for Download Station ([#5561](https://github.com/pymedusa/Medusa/pull/5561)) diff --git a/dredd/api-description.yml b/dredd/api-description.yml index 7c529aebf7..e411a939e0 100644 --- a/dredd/api-description.yml +++ b/dredd/api-description.yml @@ -1983,6 +1983,84 @@ definitions: type: boolean notifyOnSubtitleDownload: type: boolean + clients: + type: object + properties: + nzb: + type: object + properties: + enabled: + type: boolean + dir: + type: string + method: + type: string + nzbget: + type: object + properties: + category: + type: string + categoryAnime: + type: string + categoryAnimeBacklog: + type: string + categoryBacklog: + type: string + host: + type: string + priority: + type: integer + useHttps: + type: boolean + username: + type: string + sabnzbd: + type: object + properties: + category: + type: string + categoryAnime: + type: string + categoryAnimeBacklog: + type: string + categoryBacklog: + type: string + forced: + type: boolean + host: + type: string + username: + type: string + torrents: + type: object + properties: + username: + type: string + seedTime: + type: integer + rpcurl: + type: string + authType: + type: string + paused: + type: boolean + host: + type: string + path: + type: string + verifySSL: + type: boolean + highBandwidth: + type: boolean + enabled: + type: boolean + label: + type: string + labelAnime: + type: string + method: + type: string + enum: ["blackhole", "utorrent", "transmission", "deluge", "deluged", "downloadstation", "rtorrent", "qbittorrent", "mlnet"] Log: type: object properties: diff --git a/medusa/server/api/v2/config.py b/medusa/server/api/v2/config.py index c681753846..959f726bfa 100644 --- a/medusa/server/api/v2/config.py +++ b/medusa/server/api/v2/config.py @@ -72,43 +72,43 @@ class ConfigHandler(BaseRequestHandler): patches = { 'anonRedirect': StringField(app, 'ANON_REDIRECT'), 'emby.enabled': BooleanField(app, 'USE_EMBY'), - 'torrents.authType': StringField(app, 'TORRENT_AUTH_TYPE'), - 'torrents.dir': StringField(app, 'TORRENT_DIR'), - 'torrents.enabled': BooleanField(app, 'USE_TORRENTS'), - 'torrents.highBandwidth': StringField(app, 'TORRENT_HIGH_BANDWIDTH'), - 'torrents.host': StringField(app, 'TORRENT_HOST'), - 'torrents.label': StringField(app, 'TORRENT_LABEL'), - 'torrents.labelAnime': StringField(app, 'TORRENT_LABEL_ANIME'), - 'torrents.method': StringField(app, 'TORRENT_METHOD'), - 'torrents.password': StringField(app, 'TORRENT_PASSWORD'), - 'torrents.path': BooleanField(app, 'TORRENT_PATH'), - 'torrents.paused': BooleanField(app, 'TORRENT_PAUSED'), - 'torrents.rpcurl': StringField(app, 'TORRENT_RPCURL'), - 'torrents.seedLocation': StringField(app, 'TORRENT_SEED_LOCATION'), - 'torrents.seedTime': StringField(app, 'TORRENT_SEED_TIME'), - 'torrents.username': StringField(app, 'TORRENT_USERNAME'), - 'torrents.verifySSL': BooleanField(app, 'TORRENT_VERIFY_CERT'), - 'nzb.enabled': BooleanField(app, 'USE_NZBS'), - 'nzb.dir': StringField(app, 'NZB_DIR'), - 'nzb.method': StringField(app, 'NZB_METHOD'), - 'nzb.nzbget.category': StringField(app, 'NZBGET_CATEGORY'), - 'nzb.nzbget.categoryAnime': StringField(app, 'NZBGET_CATEGORY_ANIME'), - 'nzb.nzbget.categoryAnimeBacklog': StringField(app, 'NZBGET_CATEGORY_ANIME_BACKLOG'), - 'nzb.nzbget.categoryBacklog': StringField(app, 'NZBGET_CATEGORY_BACKLOG'), - 'nzb.nzbget.host': StringField(app, 'NZBGET_HOST'), - 'nzb.nzbget.password': StringField(app, 'NZBGET_PASSWORD'), - 'nzb.nzbget.priority': StringField(app, 'NZBGET_PRIORITY'), - 'nzb.nzbget.useHttps': BooleanField(app, 'NZBGET_USE_HTTPS'), - 'nzb.nzbget.username': StringField(app, 'NZBGET_USERNAME'), - 'nzb.sabnzbd.apiKey': StringField(app, 'SAB_APIKEY'), - 'nzb.sabnzbd.category': StringField(app, 'SAB_CATEGORY'), - 'nzb.sabnzbd.categoryAnime': StringField(app, 'SAB_CATEGORY_ANIME'), - 'nzb.sabnzbd.categoryAnimeBacklog': StringField(app, 'SAB_CATEGORY_ANIME_BACKLOG'), - 'nzb.sabnzbd.categoryBacklog': StringField(app, 'SAB_CATEGORY_BACKLOG'), - 'nzb.sabnzbd.forced': BooleanField(app, 'SAB_FORCED'), - 'nzb.sabnzbd.host': StringField(app, 'SAB_HOST'), - 'nzb.sabnzbd.password': StringField(app, 'SAB_PASSWORD'), - 'nzb.sabnzbd.username': StringField(app, 'SAB_USERNAME'), + 'clients.torrents.authType': StringField(app, 'TORRENT_AUTH_TYPE'), + 'clients.torrents.dir': StringField(app, 'TORRENT_DIR'), + 'clients.torrents.enabled': BooleanField(app, 'USE_TORRENTS'), + 'clients.torrents.highBandwidth': BooleanField(app, 'TORRENT_HIGH_BANDWIDTH'), + 'clients.torrents.host': StringField(app, 'TORRENT_HOST'), + 'clients.torrents.label': StringField(app, 'TORRENT_LABEL'), + '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.paused': BooleanField(app, 'TORRENT_PAUSED'), + 'clients.torrents.rpcurl': StringField(app, 'TORRENT_RPCURL'), + 'clients.torrents.seedLocation': StringField(app, 'TORRENT_SEED_LOCATION'), + 'clients.torrents.seedTime': IntegerField(app, 'TORRENT_SEED_TIME'), + 'clients.torrents.username': StringField(app, 'TORRENT_USERNAME'), + 'clients.torrents.verifySSL': BooleanField(app, 'TORRENT_VERIFY_CERT'), + 'clients.nzb.enabled': BooleanField(app, 'USE_NZBS'), + 'clients.nzb.dir': StringField(app, 'NZB_DIR'), + 'clients.nzb.method': StringField(app, 'NZB_METHOD'), + 'clients.nzb.nzbget.category': StringField(app, 'NZBGET_CATEGORY'), + 'clients.nzb.nzbget.categoryAnime': StringField(app, 'NZBGET_CATEGORY_ANIME'), + 'clients.nzb.nzbget.categoryAnimeBacklog': StringField(app, 'NZBGET_CATEGORY_ANIME_BACKLOG'), + 'clients.nzb.nzbget.categoryBacklog': StringField(app, 'NZBGET_CATEGORY_BACKLOG'), + 'clients.nzb.nzbget.host': StringField(app, 'NZBGET_HOST'), + 'clients.nzb.nzbget.password': StringField(app, 'NZBGET_PASSWORD'), + 'clients.nzb.nzbget.priority': IntegerField(app, 'NZBGET_PRIORITY'), + 'clients.nzb.nzbget.useHttps': BooleanField(app, 'NZBGET_USE_HTTPS'), + 'clients.nzb.nzbget.username': StringField(app, 'NZBGET_USERNAME'), + 'clients.nzb.sabnzbd.apiKey': StringField(app, 'SAB_APIKEY'), + 'clients.nzb.sabnzbd.category': StringField(app, 'SAB_CATEGORY'), + 'clients.nzb.sabnzbd.categoryAnime': StringField(app, 'SAB_CATEGORY_ANIME'), + 'clients.nzb.sabnzbd.categoryAnimeBacklog': StringField(app, 'SAB_CATEGORY_ANIME_BACKLOG'), + 'clients.nzb.sabnzbd.categoryBacklog': StringField(app, 'SAB_CATEGORY_BACKLOG'), + 'clients.nzb.sabnzbd.forced': BooleanField(app, 'SAB_FORCED'), + 'clients.nzb.sabnzbd.host': StringField(app, 'SAB_HOST'), + 'clients.nzb.sabnzbd.password': StringField(app, 'SAB_PASSWORD'), + 'clients.nzb.sabnzbd.username': StringField(app, 'SAB_USERNAME'), 'selectedRootIndex': IntegerField(app, 'SELECTED_ROOT'), 'layout.schedule': EnumField(app, 'COMING_EPS_LAYOUT', ('poster', 'banner', 'list', 'calendar'), default_value='banner', post_processor=layout_schedule_post_processor), @@ -534,46 +534,6 @@ def data_main(): section_data['failedDownloads']['enabled'] = bool(app.USE_FAILED_DOWNLOADS) section_data['failedDownloads']['deleteFailed'] = bool(app.DELETE_FAILED) - section_data['torrents'] = NonEmptyDict() - section_data['torrents']['authType'] = app.TORRENT_AUTH_TYPE - section_data['torrents']['dir'] = app.TORRENT_DIR - section_data['torrents']['enabled'] = bool(app.USE_TORRENTS) - section_data['torrents']['highBandwidth'] = app.TORRENT_HIGH_BANDWIDTH - section_data['torrents']['host'] = app.TORRENT_HOST - section_data['torrents']['label'] = app.TORRENT_LABEL - section_data['torrents']['labelAnime'] = app.TORRENT_LABEL_ANIME - section_data['torrents']['method'] = app.TORRENT_METHOD - section_data['torrents']['path'] = app.TORRENT_PATH - section_data['torrents']['paused'] = bool(app.TORRENT_PAUSED) - section_data['torrents']['rpcurl'] = app.TORRENT_RPCURL - 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']['verifySSL'] = bool(app.TORRENT_VERIFY_CERT) - - section_data['nzb'] = NonEmptyDict() - section_data['nzb']['enabled'] = bool(app.USE_NZBS) - section_data['nzb']['dir'] = app.NZB_DIR - section_data['nzb']['method'] = app.NZB_METHOD - section_data['nzb']['nzbget'] = NonEmptyDict() - section_data['nzb']['nzbget']['category'] = app.NZBGET_CATEGORY - section_data['nzb']['nzbget']['categoryAnime'] = app.NZBGET_CATEGORY_ANIME - section_data['nzb']['nzbget']['categoryAnimeBacklog'] = app.NZBGET_CATEGORY_ANIME_BACKLOG - section_data['nzb']['nzbget']['categoryBacklog'] = app.NZBGET_CATEGORY_BACKLOG - section_data['nzb']['nzbget']['host'] = app.NZBGET_HOST - section_data['nzb']['nzbget']['priority'] = app.NZBGET_PRIORITY - section_data['nzb']['nzbget']['useHttps'] = bool(app.NZBGET_USE_HTTPS) - section_data['nzb']['nzbget']['username'] = app.NZBGET_USERNAME - - section_data['nzb']['sabnzbd'] = NonEmptyDict() - section_data['nzb']['sabnzbd']['category'] = app.SAB_CATEGORY - section_data['nzb']['sabnzbd']['categoryAnime'] = app.SAB_CATEGORY_ANIME - section_data['nzb']['sabnzbd']['categoryAnimeBacklog'] = app.SAB_CATEGORY_ANIME_BACKLOG - section_data['nzb']['sabnzbd']['categoryBacklog'] = app.SAB_CATEGORY_BACKLOG - 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['layout'] = NonEmptyDict() section_data['layout']['schedule'] = app.COMING_EPS_LAYOUT section_data['layout']['history'] = app.HISTORY_LAYOUT @@ -951,3 +911,50 @@ def data_notifiers(): section_data['slack']['webhook'] = app.SLACK_WEBHOOK return section_data + + @staticmethod + def data_clients(): + """Notifications.""" + section_data = NonEmptyDict() + + section_data['torrents'] = NonEmptyDict() + section_data['torrents']['authType'] = app.TORRENT_AUTH_TYPE + section_data['torrents']['dir'] = app.TORRENT_DIR + section_data['torrents']['enabled'] = bool(app.USE_TORRENTS) + section_data['torrents']['highBandwidth'] = bool(app.TORRENT_HIGH_BANDWIDTH) + section_data['torrents']['host'] = app.TORRENT_HOST + section_data['torrents']['label'] = app.TORRENT_LABEL + section_data['torrents']['labelAnime'] = app.TORRENT_LABEL_ANIME + section_data['torrents']['method'] = app.TORRENT_METHOD + section_data['torrents']['path'] = app.TORRENT_PATH + section_data['torrents']['paused'] = bool(app.TORRENT_PAUSED) + section_data['torrents']['rpcurl'] = app.TORRENT_RPCURL + 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']['verifySSL'] = bool(app.TORRENT_VERIFY_CERT) + + section_data['nzb'] = NonEmptyDict() + section_data['nzb']['enabled'] = bool(app.USE_NZBS) + section_data['nzb']['dir'] = app.NZB_DIR + section_data['nzb']['method'] = app.NZB_METHOD + section_data['nzb']['nzbget'] = NonEmptyDict() + section_data['nzb']['nzbget']['category'] = app.NZBGET_CATEGORY + section_data['nzb']['nzbget']['categoryAnime'] = app.NZBGET_CATEGORY_ANIME + section_data['nzb']['nzbget']['categoryAnimeBacklog'] = app.NZBGET_CATEGORY_ANIME_BACKLOG + section_data['nzb']['nzbget']['categoryBacklog'] = app.NZBGET_CATEGORY_BACKLOG + section_data['nzb']['nzbget']['host'] = app.NZBGET_HOST + 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']['sabnzbd'] = NonEmptyDict() + section_data['nzb']['sabnzbd']['category'] = app.SAB_CATEGORY + section_data['nzb']['sabnzbd']['categoryAnime'] = app.SAB_CATEGORY_ANIME + section_data['nzb']['sabnzbd']['categoryAnimeBacklog'] = app.SAB_CATEGORY_ANIME_BACKLOG + section_data['nzb']['sabnzbd']['categoryBacklog'] = app.SAB_CATEGORY_BACKLOG + 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 + + return section_data diff --git a/tests/apiv2/test_config.py b/tests/apiv2/test_config.py index ad1de31b67..58c661809b 100644 --- a/tests/apiv2/test_config.py +++ b/tests/apiv2/test_config.py @@ -103,46 +103,6 @@ def config_main(monkeypatch, app_config): config_data['failedDownloads']['enabled'] = bool(app.USE_FAILED_DOWNLOADS) config_data['failedDownloads']['deleteFailed'] = bool(app.DELETE_FAILED) - config_data['torrents'] = NonEmptyDict() - config_data['torrents']['authType'] = app.TORRENT_AUTH_TYPE - config_data['torrents']['dir'] = app.TORRENT_DIR - config_data['torrents']['enabled'] = bool(app.USE_TORRENTS) - config_data['torrents']['highBandwidth'] = app.TORRENT_HIGH_BANDWIDTH - config_data['torrents']['host'] = app.TORRENT_HOST - config_data['torrents']['label'] = app.TORRENT_LABEL - config_data['torrents']['labelAnime'] = app.TORRENT_LABEL_ANIME - config_data['torrents']['method'] = app.TORRENT_METHOD - config_data['torrents']['path'] = app.TORRENT_PATH - config_data['torrents']['paused'] = bool(app.TORRENT_PAUSED) - config_data['torrents']['rpcurl'] = app.TORRENT_RPCURL - config_data['torrents']['seedLocation'] = app.TORRENT_SEED_LOCATION - config_data['torrents']['seedTime'] = app.TORRENT_SEED_TIME - config_data['torrents']['username'] = app.TORRENT_USERNAME - config_data['torrents']['verifySSL'] = bool(app.TORRENT_VERIFY_CERT) - - config_data['nzb'] = NonEmptyDict() - config_data['nzb']['enabled'] = bool(app.USE_NZBS) - config_data['nzb']['dir'] = app.NZB_DIR - config_data['nzb']['method'] = app.NZB_METHOD - config_data['nzb']['nzbget'] = NonEmptyDict() - config_data['nzb']['nzbget']['category'] = app.NZBGET_CATEGORY - config_data['nzb']['nzbget']['categoryAnime'] = app.NZBGET_CATEGORY_ANIME - config_data['nzb']['nzbget']['categoryAnimeBacklog'] = app.NZBGET_CATEGORY_ANIME_BACKLOG - config_data['nzb']['nzbget']['categoryBacklog'] = app.NZBGET_CATEGORY_BACKLOG - config_data['nzb']['nzbget']['host'] = app.NZBGET_HOST - config_data['nzb']['nzbget']['priority'] = app.NZBGET_PRIORITY - config_data['nzb']['nzbget']['useHttps'] = bool(app.NZBGET_USE_HTTPS) - config_data['nzb']['nzbget']['username'] = app.NZBGET_USERNAME - - config_data['nzb']['sabnzbd'] = NonEmptyDict() - config_data['nzb']['sabnzbd']['category'] = app.SAB_CATEGORY - config_data['nzb']['sabnzbd']['categoryAnime'] = app.SAB_CATEGORY_ANIME - config_data['nzb']['sabnzbd']['categoryAnimeBacklog'] = app.SAB_CATEGORY_ANIME_BACKLOG - config_data['nzb']['sabnzbd']['categoryBacklog'] = app.SAB_CATEGORY_BACKLOG - config_data['nzb']['sabnzbd']['forced'] = bool(app.SAB_FORCED) - config_data['nzb']['sabnzbd']['host'] = app.SAB_HOST - config_data['nzb']['sabnzbd']['username'] = app.SAB_USERNAME - config_data['layout'] = NonEmptyDict() config_data['layout']['schedule'] = app.COMING_EPS_LAYOUT config_data['layout']['history'] = app.HISTORY_LAYOUT diff --git a/themes-default/slim/src/components/helpers/config-textbox-number.vue b/themes-default/slim/src/components/helpers/config-textbox-number.vue index abe922c974..8948661a7b 100644 --- a/themes-default/slim/src/components/helpers/config-textbox-number.vue +++ b/themes-default/slim/src/components/helpers/config-textbox-number.vue @@ -6,7 +6,7 @@ {{ label }}
- +

{{ explanation }}

@@ -46,6 +46,10 @@ export default { type: Number, default: 10 }, + max: { + type: Number, + default: null + }, step: { type: Number, default: 1 @@ -53,6 +57,10 @@ export default { placeholder: { type: String, default: '' + }, + disabled: { + type: Boolean, + default: false } }, data() { diff --git a/themes-default/slim/src/components/helpers/config-textbox.vue b/themes-default/slim/src/components/helpers/config-textbox.vue index 220896c6b6..3724f8afa2 100644 --- a/themes-default/slim/src/components/helpers/config-textbox.vue +++ b/themes-default/slim/src/components/helpers/config-textbox.vue @@ -6,7 +6,7 @@ {{ label }}
- +

{{ explanation }}

@@ -39,6 +39,10 @@ export default { type: String, default: 'text' }, + disabled: { + type: Boolean, + default: false + }, /** * Overwrite the default configured class on the element. */ diff --git a/themes-default/slim/src/components/helpers/select-list.vue b/themes-default/slim/src/components/helpers/select-list.vue index 9a9870da54..63b133e27d 100644 --- a/themes-default/slim/src/components/helpers/select-list.vue +++ b/themes-default/slim/src/components/helpers/select-list.vue @@ -1,5 +1,5 @@