diff --git a/CHANGELOG.md b/CHANGELOG.md index a17db14935..deeb474d3e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,11 +1,22 @@ ## Unreleased #### New Features +- Add option to mass-update the info language ([10516](https://github.com/pymedusa/Medusa/pull/10516)) #### Improvements +- Multiple UI fixes / enhancements ([10566](https://github.com/pymedusa/Medusa/pull/10566)) +- Add config setting to allow overriding xem url ([10541](https://github.com/pymedusa/Medusa/pull/10541)) +- Increase addic7ed http request timeout ([10565](https://github.com/pymedusa/Medusa/pull/10565)) +- Improve anime title parsing for `Title Season 2 - 01` ([10534](https://github.com/pymedusa/Medusa/pull/10534)) +- Improve detection of commit / branch when run in docker ([10531](https://github.com/pymedusa/Medusa/pull/10531)) +- Improve guessit parsing for shows with numbers in them like `9-1-1` ([10493](https://github.com/pymedusa/Medusa/pull/10493)) - Bump Knowit + pymediainfo to version 0.4.0 and 5.1.0 ([10564](https://github.com/pymedusa/Medusa/pull/10564)) #### Fixes +- Fix malformed imdb id's when imdb id not available ([10669](https://github.com/pymedusa/Medusa/pull/10669)) +- Fix shows being searched 2 days early for tvmaze shows ([10668](https://github.com/pymedusa/Medusa/pull/10668)) +- Disable guessit cache for postprocessing ([10532](https://github.com/pymedusa/Medusa/pull/10532)) +- Fix .plexmatch file misread as xml causing warnings ([10510](https://github.com/pymedusa/Medusa/pull/10510)) ## 0.5.29 (11-04-2022) diff --git a/medusa/providers/generic_provider.py b/medusa/providers/generic_provider.py index 2f07dc5639..87ebda169d 100644 --- a/medusa/providers/generic_provider.py +++ b/medusa/providers/generic_provider.py @@ -957,7 +957,8 @@ def to_json(self): 'cookies': { 'enabled': self.enable_cookies, 'values': self.cookies - } + }, + 'url': self.custom_url or self.url if hasattr(self, 'custom_url') else self.url }, 'animeOnly': self.anime_only, 'type': self.provider_type, diff --git a/medusa/server/api/v2/providers.py b/medusa/server/api/v2/providers.py index 3a1b373094..b4ac32839b 100644 --- a/medusa/server/api/v2/providers.py +++ b/medusa/server/api/v2/providers.py @@ -352,7 +352,7 @@ def _add_torrentrss_provider(self, data): if not data.get('url'): return self._bad_request('No provider url provided') - new_provider = TorrentRssProvider(data.get('name'), data.get('url'), data.get('cookies', ''), data.get('titleTag', 'title')) + new_provider = TorrentRssProvider(data.get('name'), data.get('url'), data.get('cookies', {}).get('values'), data.get('titleTag', 'title')) new_provider = self.provider_name_auto_numbered(new_provider) app.torrentRssProviderList.append(new_provider) @@ -424,6 +424,12 @@ def ordered_providers(names, providers): @staticmethod def _set_common_settings(provider, config): + if hasattr(provider, 'url'): + try: + provider.url = config['url'] + except (AttributeError, KeyError): + pass + if hasattr(provider, 'username'): try: provider.username = config['username'] diff --git a/themes-default/slim/src/components/change-indexer.vue b/themes-default/slim/src/components/change-indexer.vue index acccc1e5af..6d135f4256 100644 --- a/themes-default/slim/src/components/change-indexer.vue +++ b/themes-default/slim/src/components/change-indexer.vue @@ -34,6 +34,7 @@ import Vue from 'vue'; import { mapState } from 'vuex'; import { ChangeIndexerRow } from './manage'; +import { sortShows } from '../utils/core'; export default { name: 'change-indexer', @@ -64,6 +65,7 @@ export default { }, computed: { ...mapState({ + layout: state => state.config.layout, shows: state => state.shows.shows, queueitems: state => state.shows.queueitems, client: state => state.auth.client @@ -73,14 +75,18 @@ export default { return filteredShows.filter(show => show.checked); }, filteredShows() { - const { allShows, filter } = this; - return allShows.filter( + const { allShows, filter, layout } = this; + const { sortArticle } = layout; + + const filteredShows = allShows.filter( show => (show.indexer === 'tvdb' && filter.tvdb) || (show.indexer === 'tvmaze' && filter.tvmaze) || (show.indexer === 'tmdb' && filter.tmdb) || (show.indexer === 'imdb' && filter.imdb) ); + + return sortShows(filteredShows, sortArticle); } }, methods: { diff --git a/themes-default/slim/src/components/config-general.vue b/themes-default/slim/src/components/config-general.vue index c6b5a1f444..f5adc3a8d3 100644 --- a/themes-default/slim/src/components/config-general.vue +++ b/themes-default/slim/src/components/config-general.vue @@ -241,6 +241,10 @@ + diff --git a/themes-default/slim/src/components/display-show.vue b/themes-default/slim/src/components/display-show.vue index 0251a42035..2094c8a1ef 100644 --- a/themes-default/slim/src/components/display-show.vue +++ b/themes-default/slim/src/components/display-show.vue @@ -6,12 +6,14 @@ -
@@ -128,19 +130,13 @@
- - - search - + + + search subtitles
@@ -277,19 +273,14 @@
- - - search - + + + + search subtitles
@@ -379,7 +370,7 @@ import debounce from 'lodash/debounce'; import Vue from 'vue'; import { mapState, mapGetters, mapActions } from 'vuex'; -import { AppLink, PlotInfo, SceneNumberInput, SceneNumberAnimeInput } from './helpers'; +import { AppLink, PlotInfo, Search, SceneNumberInput, SceneNumberAnimeInput } from './helpers'; import { humanFileSize } from '../utils/core'; import { manageCookieMixin } from '../mixins/manage-cookie'; import { addQTip } from '../utils/jquery'; @@ -396,6 +387,7 @@ export default { Backstretch, PlotInfo, QualityPill, + Search, SceneNumberInput, SceneNumberAnimeInput, ShowHeader, @@ -794,7 +786,7 @@ export default { }; episodes.forEach(episode => { data.episodes.push(episode.slug); - this.$refs[`search-${episode.slug}`].src = 'images/loading16-dark.gif'; + this.$refs[`search-${episode.slug}`].src = 'images/loading16.gif'; }); } @@ -1019,7 +1011,6 @@ export default { this.initializeEpisodes(true); } } - } }; @@ -1099,6 +1090,7 @@ tablesorter.css color: rgb(0, 0, 0); text-align: left; border-spacing: 0; + border-collapse: initial; } .displayShow >>> .vgt-table th, diff --git a/themes-default/slim/src/components/edit-show.vue b/themes-default/slim/src/components/edit-show.vue index 35bcb1ab5e..9c237c16b8 100644 --- a/themes-default/slim/src/components/edit-show.vue +++ b/themes-default/slim/src/components/edit-show.vue @@ -181,8 +181,8 @@
- + diff --git a/themes-default/slim/src/components/helpers/config-custom-torrentrss.vue b/themes-default/slim/src/components/helpers/config-custom-torrentrss.vue index de731e3c47..7c84e07a86 100644 --- a/themes-default/slim/src/components/helpers/config-custom-torrentrss.vue +++ b/themes-default/slim/src/components/helpers/config-custom-torrentrss.vue @@ -12,8 +12,8 @@
- - + + @@ -87,7 +87,13 @@ export default { async addProvider() { const { name, url, cookies, searchElement } = this; try { - const response = await this.client.api.post('providers/torrentrss', { name, url, cookies, titleTag: searchElement }); + const cookieValues = { + values: cookies + }; + + const response = await this.client.api.post('providers/torrentrss', { + name, url, cookies: cookieValues, titleTag: searchElement + }); this.$store.commit(ADD_PROVIDER, response.data.result); this.$snotify.success( `Saved provider ${name}`, diff --git a/themes-default/slim/src/components/helpers/config-custom-torznab.vue b/themes-default/slim/src/components/helpers/config-custom-torznab.vue index dd27d79a43..dd97d14edc 100644 --- a/themes-default/slim/src/components/helpers/config-custom-torznab.vue +++ b/themes-default/slim/src/components/helpers/config-custom-torznab.vue @@ -12,7 +12,7 @@
- + @@ -109,7 +109,7 @@ export default { }, async getCategories() { const { currentProvider } = this; - if (!currentProvider.name || !currentProvider.url || !currentProvider.config.apikey) { + if (!currentProvider.name || !currentProvider.config.url || !currentProvider.config.apikey) { return; } @@ -118,7 +118,7 @@ export default { type: 'GETCATEGORIES', apikey: currentProvider.config.apikey, name: currentProvider.name, - url: currentProvider.url + url: currentProvider.config.url }); if (response.data.result.success) { this.availableCategories = response.data.result.categories; diff --git a/themes-default/slim/src/components/helpers/config-provider-nzb.vue b/themes-default/slim/src/components/helpers/config-provider-nzb.vue index 4e2685028f..73fddcc74e 100644 --- a/themes-default/slim/src/components/helpers/config-provider-nzb.vue +++ b/themes-default/slim/src/components/helpers/config-provider-nzb.vue @@ -4,10 +4,9 @@
- diff --git a/themes-default/slim/src/components/helpers/search.vue b/themes-default/slim/src/components/helpers/search.vue index cacb91171f..7312e3aa50 100644 --- a/themes-default/slim/src/components/helpers/search.vue +++ b/themes-default/slim/src/components/helpers/search.vue @@ -2,10 +2,11 @@
state.config.search + stateSearch: state => state.config.search, + client: state => state.auth.client, + queueitems: state => state.queue.queueitems }) }, methods: { @@ -116,13 +121,13 @@ export default { episodes: [episode.slug], options: {} }; - this.$refs[`search-${episode.slug}`].src = 'images/loading16-dark.gif'; + this.src = 'images/loading16-dark.gif'; this.client.api.put(`search/${searchType}`, data) // eslint-disable-line no-undef .then(_ => { - console.info(`started search for show: ${showSlug} episode: ${episode.slug}`); - this.$refs[`search-${episode.slug}`].src = 'images/queued.png'; - this.$refs[`search-${episode.slug}`].disabled = true; + console.info(`Queued search for show: ${showSlug} episode: ${episode.slug}`); + this.src = 'images/queued.png'; + this.disabled = true; }).catch(error => { console.error(String(error)); this.$refs[`search-${episode.slug}`].src = 'images/no16.png'; @@ -138,9 +143,8 @@ export default { */ queueSearch(episode) { const { $modal, search, retryDownload } = this; - const episodeIdentifier = episode.slug; if (episode) { - if (this.$refs[`search-${episodeIdentifier}`].disabled === true) { + if (this.disabled === true) { return; } @@ -167,7 +171,33 @@ export default { beforeFailedSearchModalClose(event) { this.failedSearchEpisodes = event.params.episodes; } + }, + watch: { + queueitems(queueitems) { + const episode = queueitems.filter( + q => q.name === 'BACKLOG' && + q.show && + q.show.id.slug === this.showSlug && + q.segment.find(s => s.slug === this.episode.slug) + ); + + if (episode.length === 0) { + return; + } + const lastEp = episode.slice(-1)[0]; + if (lastEp.inProgress && lastEp.success === null) { + // Search is in progress. + console.info(`Search runnning for show: ${this.showSlug} and episode: ${this.episode.slug}`); + this.src = 'images/loading16.gif'; + this.disabled = true; + } else { + // Search finished. + console.log(`Search finished for ${this.episode.slug}`); + this.src = 'images/yes16.png'; + this.disabled = false; + } + } } }; diff --git a/themes-default/slim/src/components/helpers/show-selector.vue b/themes-default/slim/src/components/helpers/show-selector.vue index 4841c82732..90826956dc 100644 --- a/themes-default/slim/src/components/helpers/show-selector.vue +++ b/themes-default/slim/src/components/helpers/show-selector.vue @@ -23,6 +23,7 @@