@@ -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 @@