Skip to content

Commit

Permalink
Fix forced search and subtitle search (#4751)
Browse files Browse the repository at this point in the history
* Remove unused Python imports

* displayShow: Moved JS to mako

Fixes forced search and subtitle search

* Fix schedule forced search

* subtitleMissedPP subtitle search
  • Loading branch information
sharkykh authored and p0psicles committed Jul 25, 2018
1 parent b5e5d86 commit 28915d5
Show file tree
Hide file tree
Showing 25 changed files with 1,428 additions and 1,459 deletions.
441 changes: 0 additions & 441 deletions themes-default/slim/static/js/home/display-show.js

This file was deleted.

This file was deleted.

446 changes: 441 additions & 5 deletions themes-default/slim/views/displayShow.mako

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions themes-default/slim/views/layouts/main.mako
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@

<script type="text/javascript" src="js/common/init.js?${sbPID}"></script>

<script type="text/javascript" src="js/home/display-show.js?${sbPID}"></script>
<script type="text/javascript" src="js/home/index.js?${sbPID}"></script>
<script type="text/javascript" src="js/home/post-process.js?${sbPID}"></script>
<script type="text/javascript" src="js/home/restart.js?${sbPID}"></script>
Expand All @@ -111,7 +110,6 @@
<script type="text/javascript" src="js/manage/index.js?${sbPID}"></script>
<script type="text/javascript" src="js/manage/init.js?${sbPID}"></script>
<script type="text/javascript" src="js/manage/subtitle-missed.js?${sbPID}"></script>
<script type="text/javascript" src="js/manage/subtitle-missed-post-process.js?${sbPID}"></script>

<script type="text/javascript" src="js/browser.js?${sbPID}"></script>

Expand Down
34 changes: 32 additions & 2 deletions themes-default/slim/views/manage_subtitleMissedPP.mako
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<%inherit file="/layouts/main.mako"/>
<%!
from medusa import app
import os
from medusa import app
from medusa.helper.common import episode_num
%>
<%block name="scripts">
<script type="text/javascript" src="js/lib/jquery.bookmarkscroll.js?${sbPID}"></script>
<script type="text/javascript" src="js/ajax-episode-subtitles.js?${sbPID}"></script>
<script>
window.app = {};
Expand All @@ -20,6 +20,36 @@ const startVue = () => {
return {
header: 'Missing Subtitles in Post-Process folder'
};
},
mounted() {
this.$once('loaded', () => {
startAjaxEpisodeSubtitles(); // eslint-disable-line no-undef
$.ajaxEpSubtitlesSearch();
});
$('#releasesPP:has(tbody tr)').tablesorter({
sortList: [[3, 1], [0, 0]],
textExtraction: {
0(node) { return $(node).find('a').text().toLowerCase(); }, // eslint-disable-line brace-style
1(node) { return $(node).text().toLowerCase(); }, // eslint-disable-line brace-style
2(node) { return $(node).find('span').text().toLowerCase(); }, // eslint-disable-line brace-style
3(node) { return $(node).find('span').attr('datetime'); } // eslint-disable-line brace-style
},
widgets: ['saveSort', 'filter'],
headers: {
0: { sorter: 'show' },
1: { sorter: 'episode' },
2: { sorter: 'release' },
3: { sorter: 'realISODate' },
4: { sorter: false, filter: false }
},
widgetOptions: {
filter_columnFilters: true, // eslint-disable-line camelcase
filter_hideFilters: true, // eslint-disable-line camelcase
filter_saveFilters: true, // eslint-disable-line camelcase
columnSelector_mediaquery: false // eslint-disable-line camelcase
}
});
}
});
};
Expand Down
7 changes: 2 additions & 5 deletions themes-default/slim/views/partials/showheader.mako
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
<%!
import datetime
import urllib
import ntpath
import operator
from medusa import app, helpers, subtitles, sbdatetime, network_timezones
from medusa.common import SKIPPED, WANTED, UNAIRED, ARCHIVED, IGNORED, FAILED, DOWNLOADED
from medusa import app, helpers, subtitles, network_timezones
from medusa.common import SKIPPED, WANTED, ARCHIVED, IGNORED, FAILED, DOWNLOADED
from medusa.common import Quality, qualityPresets, statusStrings, Overview
from medusa.helper.common import pretty_file_size
from medusa.indexers.indexer_api import indexerApi
Expand Down
3 changes: 1 addition & 2 deletions themes-default/slim/views/schedule.mako
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ const startVue = () => {
const { $store, $route } = this;
// $store.dispatch('getShows');
const unwatch = this.$watch('layout', () => {
unwatch();
this.$once('loaded', () => {
const { config, layout } = this;
if (layout === 'list') {
const sortCodes = {
Expand Down
Loading

0 comments on commit 28915d5

Please sign in to comment.