Some tweak.

pull/249/head
morpheus65535 6 years ago
parent 675bacc78d
commit 3c271ec64e

@ -721,7 +721,7 @@ def movies():
offset = (int(page) - 1) * page_size offset = (int(page) - 1) * page_size
max_page = int(math.ceil(missing_count / (page_size + 0.0))) max_page = int(math.ceil(missing_count / (page_size + 0.0)))
c.execute("SELECT tmdbId, title, path_substitution(path), languages, hearing_impaired, radarrId, poster, audio_language, monitored FROM table_movies ORDER BY title ASC LIMIT ? OFFSET ?", (page_size, offset,)) c.execute("SELECT tmdbId, title, path_substitution(path), languages, hearing_impaired, radarrId, poster, audio_language, monitored, sceneName FROM table_movies ORDER BY title ASC LIMIT ? OFFSET ?", (page_size, offset,))
data = c.fetchall() data = c.fetchall()
c.execute("SELECT code2, name FROM table_settings_languages WHERE enabled = 1") c.execute("SELECT code2, name FROM table_settings_languages WHERE enabled = 1")
languages = c.fetchall() languages = c.fetchall()

@ -102,8 +102,8 @@
<div id="divdetails" class="ui container"> <div id="divdetails" class="ui container">
<img class="left floated ui image" style="max-height:250px;" src="{{base_url}}image_proxy{{details[2]}}"> <img class="left floated ui image" style="max-height:250px;" src="{{base_url}}image_proxy{{details[2]}}">
<div class="ui right floated basic icon buttons"> <div class="ui right floated basic icon buttons">
<button id="scan_disk" class="ui button" data-tooltip="Scan disk for subtitles" data-inverted=""><i class="ui inverted large compact refresh icon"></i></button> <button id="scan_disk" class="ui button" data-tooltip="Scan disk for subtitles"><i class="ui inverted large compact refresh icon"></i></button>
<button id="search_missing_subtitles" class="ui button" data-tooltip="Download missing subtitles" data-inverted=""><i class="ui inverted huge compact search icon"></i></button> <button id="search_missing_subtitles" class="ui button" data-tooltip="Download missing subtitles"><i class="ui inverted huge compact search icon"></i></button>
<% <%
subs_languages = ast.literal_eval(str(details[7])) subs_languages = ast.literal_eval(str(details[7]))
subs_languages_list = [] subs_languages_list = []
@ -113,7 +113,7 @@
end end
end end
%> %>
<button id="config" class="ui button" data-tooltip="Edit series" data-inverted="" data-tvdbid="{{details[5]}}" data-title="{{details[0]}}" data-poster="{{details[2]}}" data-audio="{{details[6]}}" data-languages="{{!subs_languages_list}}" data-hearing-impaired="{{details[4]}}"><i class="ui inverted large compact configure icon"></i></button> <button id="config" class="ui button" data-tooltip="Edit series" data-tvdbid="{{details[5]}}" data-title="{{details[0]}}" data-poster="{{details[2]}}" data-audio="{{details[6]}}" data-languages="{{!subs_languages_list}}" data-hearing-impaired="{{details[4]}}"><i class="ui inverted large compact configure icon"></i></button>
</div> </div>
<h2>{{details[0]}}</h2> <h2>{{details[0]}}</h2>
<p>{{details[1]}}</p> <p>{{details[1]}}</p>
@ -165,7 +165,6 @@
<tr> <tr>
<th class="collapsing"></th> <th class="collapsing"></th>
<th class="collapsing">Episode</th> <th class="collapsing">Episode</th>
<th class="collapsing"></th>
<th>Title</th> <th>Title</th>
<th class="collapsing">Existing<br>subtitles</th> <th class="collapsing">Existing<br>subtitles</th>
<th class="collapsing">Missing<br>subtitles</th> <th class="collapsing">Missing<br>subtitles</th>
@ -177,18 +176,18 @@
<tr> <tr>
<td class="collapsing"> <td class="collapsing">
%if episode[9] == 'True': %if episode[9] == 'True':
<span data-tooltip="Episode monitored in Sonarr"><i class="bookmark icon"></i></span> <span data-tooltip="Episode monitored in Sonarr" data-inverted='' data-position="top left"><i class="bookmark icon"></i></span>
%else: %else:
<span data-tooltip="Episode unmonitored in Sonarr"><i class="bookmark outline icon"></i></span> <span data-tooltip="Episode unmonitored in Sonarr" data-inverted='' data-position="top left"><i class="bookmark outline icon"></i></span>
%end %end
</td> </td>
<td>{{episode[3]}}</td> <td>{{episode[3]}}</td>
<td> <td>
% if episode[8] is not None: % if episode[8] is not None:
<span data-tooltip="{{episode[8]}}"><i class="info circle icon"></i></span> <span data-tooltip="Scenename is: {{episode[8]}}" data-inverted='' data-position="top left"><i class="info circle icon"></i></span>
% end % end
<span data-tooltip="Path is: {{episode[1]}}" data-inverted='' data-position="top left">{{episode[0]}}</span>
</td> </td>
<td><span data-tooltip="{{episode[1]}}">{{episode[0]}}</span></td>
<td> <td>
%if episode[4] is not None: %if episode[4] is not None:
% actual_languages = ast.literal_eval(episode[4]) % actual_languages = ast.literal_eval(episode[4])
@ -234,7 +233,7 @@
{{language}} {{language}}
<i style="margin-left:3px; margin-right:0px" class="search icon"></i> <i style="margin-left:3px; margin-right:0px" class="search icon"></i>
%else: %else:
<a data-tooltip="Exclude from automatic search" data-episodePath="{{episode[1]}}" data-scenename="{{episode[8]}}" data-language="{{alpha3_from_alpha2(str(language))}}" data-hi="{{details[4]}}" data-sonarrSeriesId="{{episode[5]}}" data-sonarrEpisodeId="{{episode[7]}}" class="get_subtitle ui tiny label"> <a data-tooltip="Excluded from automatic search" data-position="top right" data-inverted="" data-episodePath="{{episode[1]}}" data-scenename="{{episode[8]}}" data-language="{{alpha3_from_alpha2(str(language))}}" data-hi="{{details[4]}}" data-sonarrSeriesId="{{episode[5]}}" data-sonarrEpisodeId="{{episode[7]}}" class="get_subtitle ui tiny label">
{{language}} {{language}}
<i style="margin-left:3px; margin-right:0px" class="search red icon"></i> <i style="margin-left:3px; margin-right:0px" class="search red icon"></i>
%end %end

@ -67,11 +67,11 @@
<tr class="selectable"> <tr class="selectable">
<td class="collapsing"> <td class="collapsing">
%if row[0] == 0: %if row[0] == 0:
<div class="ui inverted basic compact icon" data-tooltip="Subtitles file have been erased." data-inverted=""> <div class="ui inverted basic compact icon" data-tooltip="Subtitles file have been erased." data-inverted="" data-position="top left">
<i class="ui trash icon"></i> <i class="ui trash icon"></i>
</div> </div>
%elif row[0] == 1: %elif row[0] == 1:
<div class="ui inverted basic compact icon" data-tooltip="Subtitles file have been downloaded." data-inverted=""> <div class="ui inverted basic compact icon" data-tooltip="Subtitles file have been downloaded." data-inverted="" data-position="top left">
<i class="ui download icon"></i> <i class="ui download icon"></i>
</div> </div>
%end %end
@ -80,7 +80,7 @@
<a href="{{base_url}}movie/{{row[4]}}">{{row[1]}}</a> <a href="{{base_url}}movie/{{row[4]}}">{{row[1]}}</a>
</td> </td>
<td class="collapsing"> <td class="collapsing">
<div class="ui inverted" data-tooltip="{{time.strftime('%Y/%m/%d %H:%M', time.localtime(row[2]))}}" data-inverted=""> <div class="ui inverted" data-tooltip="{{time.strftime('%Y/%m/%d %H:%M', time.localtime(row[2]))}}" data-inverted="" data-position="top left">
{{pretty.date(int(row[2]))}} {{pretty.date(int(row[2]))}}
</div> </div>
</td> </td>

@ -69,11 +69,11 @@
<tr class="selectable"> <tr class="selectable">
<td class="collapsing"> <td class="collapsing">
%if row[0] == 0: %if row[0] == 0:
<div class="ui inverted basic compact icon" data-tooltip="Subtitles file have been erased." data-inverted=""> <div class="ui inverted basic compact icon" data-tooltip="Subtitles file have been erased." data-inverted="" data-position="top left">
<i class="ui trash icon"></i> <i class="ui trash icon"></i>
</div> </div>
%elif row[0] == 1: %elif row[0] == 1:
<div class="ui inverted basic compact icon" data-tooltip="Subtitles file have been downloaded." data-inverted=""> <div class="ui inverted basic compact icon" data-tooltip="Subtitles file have been downloaded." data-inverted="" data-position="top left">
<i class="ui download icon"></i> <i class="ui download icon"></i>
</div> </div>
%end %end
@ -95,7 +95,7 @@
%end %end
</td> </td>
<td class="collapsing"> <td class="collapsing">
<div class="ui inverted" data-tooltip="{{time.strftime('%Y/%m/%d %H:%M', time.localtime(row[4]))}}" data-inverted=""> <div class="ui inverted" data-tooltip="{{time.strftime('%Y/%m/%d %H:%M', time.localtime(row[4]))}}" data-inverted="" data-position="top left">
{{pretty.date(int(row[4]))}} {{pretty.date(int(row[4]))}}
</div> </div>
</td> </td>

@ -120,6 +120,9 @@
<p style='margin-top: 3em;'> <p style='margin-top: 3em;'>
<div class="ui tiny inverted label" style='background-color: #777777;'>{{details[6]}}</div> <div class="ui tiny inverted label" style='background-color: #777777;'>{{details[6]}}</div>
<div class="ui tiny inverted label" style='background-color: #35c5f4;'>{{details[8]}}</div> <div class="ui tiny inverted label" style='background-color: #35c5f4;'>{{details[8]}}</div>
% if details[12] is not None:
<div class="ui tiny inverted label" style='background-color: orange;'>{{details[12]}}</div>
% end
</p> </p>
<p style='margin-top: 2em;'> <p style='margin-top: 2em;'>
%for language in subs_languages_list: %for language in subs_languages_list:

@ -72,17 +72,22 @@
<tr class="selectable"> <tr class="selectable">
<td> <td>
%if row[8] == "True": %if row[8] == "True":
<span data-tooltip="Movie monitored in Radarr"><i class="bookmark icon"></i></span> <span data-tooltip="Movie monitored in Radarr" data-inverted="" data-position="top left"><i class="bookmark icon"></i></span>
%else: %else:
<span data-tooltip="Movie unmonitored in Radarr"><i class="bookmark outline icon"></i></span> <span data-tooltip="Movie unmonitored in Radarr" data-inverted="" data-position="top left"><i class="bookmark outline icon"></i></span>
%end %end
</td> </td>
<td><a href="{{base_url}}movie/{{row[5]}}">{{row[1]}}</a></td> <td>
% if row[9] is not None:
<span data-tooltip="Scenename is: {{row[9]}}" data-inverted='' data-position="top left"><i class="info circle icon"></i></span>
% end
<a href="{{base_url}}movie/{{row[5]}}">{{row[1]}}</a>
</td>
<td> <td>
%if os.path.isfile(row[2]): %if os.path.isfile(row[2]):
<span data-tooltip="This path seems to be valid." data-inverted=""><i class="checkmark icon"></i></span> <span data-tooltip="This path seems to be valid." data-inverted="" data-position="top left"><i class="checkmark icon"></i></span>
%else: %else:
<span data-tooltip="This path doesn't seems to be valid." data-inverted=""><i class="warning sign icon"></i></span> <span data-tooltip="This path doesn't seems to be valid." data-inverted="" data-position="top left"><i class="warning sign icon"></i></span>
%end %end
{{row[2]}} {{row[2]}}
</td> </td>
@ -105,7 +110,7 @@
end end
end end
%> %>
<div class="config ui inverted basic compact icon" data-tooltip="Edit movies" data-inverted="" data-no="{{row[5]}}" data-title="{{row[1]}}" data-poster="{{row[6]}}" data-languages="{{!subs_languages_list}}" data-hearing-impaired="{{row[4]}}" data-audio="{{row[7]}}"> <div class="config ui inverted basic compact icon" data-tooltip="Edit movies" data-inverted="" data-position="top right" data-no="{{row[5]}}" data-title="{{row[1]}}" data-poster="{{row[6]}}" data-languages="{{!subs_languages_list}}" data-hearing-impaired="{{row[4]}}" data-audio="{{row[7]}}">
<i class="ui black configure icon"></i> <i class="ui black configure icon"></i>
</div> </div>
</td> </td>

@ -79,9 +79,9 @@
<td><a href="{{base_url}}episodes/{{row[5]}}">{{row[1]}}</a></td> <td><a href="{{base_url}}episodes/{{row[5]}}">{{row[1]}}</a></td>
<td> <td>
%if os.path.isdir(row[2]): %if os.path.isdir(row[2]):
<span data-tooltip="This path seems to be valid." data-inverted=""><i class="checkmark icon"></i></span> <span data-tooltip="This path seems to be valid." data-inverted="" data-position="top left"><i class="checkmark icon"></i></span>
%else: %else:
<span data-tooltip="This path doesn't seems to be valid." data-inverted=""><i class="warning sign icon"></i></span> <span data-tooltip="This path doesn't seems to be valid." data-inverted="" data-position="top left"><i class="warning sign icon"></i></span>
%end %end
{{row[2]}} {{row[2]}}
</td> </td>
@ -127,7 +127,7 @@
end end
end end
%> %>
<div class="config ui inverted basic compact icon" data-tooltip="Edit series" data-inverted="" data-no="{{row[5]}}" data-title="{{row[1]}}" data-poster="{{row[6]}}" data-languages="{{!subs_languages_list}}" data-hearing-impaired="{{row[4]}}" data-audio="{{row[7]}}"> <div class="config ui inverted basic compact icon" data-tooltip="Edit series" data-inverted="" data-position="top right" data-no="{{row[5]}}" data-title="{{row[1]}}" data-poster="{{row[6]}}" data-languages="{{!subs_languages_list}}" data-hearing-impaired="{{row[4]}}" data-audio="{{row[7]}}">
<i class="ui black configure icon"></i> <i class="ui black configure icon"></i>
</div> </div>
</td> </td>

Loading…
Cancel
Save