mirror of
https://github.com/morpheus65535/bazarr.git
synced 2025-02-23 22:35:33 +08:00
Add tooltips for scenename, filename and adaptive searching in movies and wanted movies
This commit is contained in:
parent
1f25a9f484
commit
c20236141f
3 changed files with 56 additions and 11 deletions
|
@ -830,7 +830,7 @@ def movie(no):
|
|||
c = conn.cursor()
|
||||
|
||||
movies_details = []
|
||||
movies_details = c.execute("SELECT title, overview, poster, fanart, hearing_impaired, tmdbid, audio_language, languages, path_substitution(path), subtitles, radarrId, missing_subtitles, sceneName, monitored FROM table_movies WHERE radarrId LIKE ?", (str(no),)).fetchone()
|
||||
movies_details = c.execute("SELECT title, overview, poster, fanart, hearing_impaired, tmdbid, audio_language, languages, path_substitution(path), subtitles, radarrId, missing_subtitles, sceneName, monitored, failedAttempts FROM table_movies WHERE radarrId LIKE ?", (str(no),)).fetchone()
|
||||
tmdbid = movies_details[5]
|
||||
|
||||
languages = c.execute("SELECT code2, name FROM table_settings_languages WHERE enabled = 1").fetchall()
|
||||
|
@ -1017,7 +1017,7 @@ def wantedmovies():
|
|||
offset = (int(page) - 1) * page_size
|
||||
max_page = int(math.ceil(missing_count / (page_size + 0.0)))
|
||||
|
||||
c.execute("SELECT title, missing_subtitles, radarrId, path_substitution(path), hearing_impaired, sceneName FROM table_movies WHERE missing_subtitles != '[]'" + monitored_only_query_string + " ORDER BY _rowid_ DESC LIMIT ? OFFSET ?", (page_size, offset,))
|
||||
c.execute("SELECT title, missing_subtitles, radarrId, path_substitution(path), hearing_impaired, sceneName, failedAttempts FROM table_movies WHERE missing_subtitles != '[]'" + monitored_only_query_string + " ORDER BY _rowid_ DESC LIMIT ? OFFSET ?", (page_size, offset,))
|
||||
data = c.fetchall()
|
||||
c.close()
|
||||
return template('wantedmovies', __file__=__file__, bazarr_version=bazarr_version, rows=data, missing_count=missing_count, page=page, max_page=max_page, base_url=base_url, page_size=page_size, current_port=port)
|
||||
|
|
|
@ -170,7 +170,8 @@
|
|||
</tbody>
|
||||
</table>
|
||||
<%
|
||||
missing_subs_languages = ast.literal_eval(str(details[11]))
|
||||
missing_subs_languages = ast.literal_eval(details[11])
|
||||
from get_subtitle import search_active
|
||||
if missing_subs_languages is not None:
|
||||
%>
|
||||
<table class="ui very basic single line selectable table">
|
||||
|
@ -182,12 +183,32 @@
|
|||
</table>
|
||||
<%
|
||||
for missing_subs_language in missing_subs_languages:
|
||||
if details[14] is not None and get_general_settings()[25]:
|
||||
for lang in ast.literal_eval(details[14]):
|
||||
if missing_subs_language in lang:
|
||||
if search_active(lang[1]):
|
||||
%>
|
||||
<a class="get_subtitle ui small blue label" data-moviePath="{{details[8]}}" data-scenename="{{details[12]}}" data-language="{{alpha3_from_alpha2(str(missing_subs_language))}}" data-hi="{{details[4]}}" data-radarrId={{details[10]}}>
|
||||
{{language_from_alpha2(str(missing_subs_language))}}
|
||||
<i style="margin-left:3px; margin-right:0px" class="search icon"></i>
|
||||
</a>
|
||||
%else:
|
||||
<a data-tooltip="Automatic searching delayed (adaptive search)" data-position="top left" data-inverted="" class="get_subtitle ui small red label" data-moviePath="{{details[8]}}" data-scenename="{{details[12]}}" data-language="{{alpha3_from_alpha2(str(missing_subs_language))}}" data-hi="{{details[4]}}" data-radarrId={{details[10]}}>
|
||||
{{language_from_alpha2(str(missing_subs_language))}}
|
||||
<i style="margin-left:3px; margin-right:0px" class="search icon"></i>
|
||||
</a>
|
||||
<%
|
||||
end
|
||||
end
|
||||
end
|
||||
else:
|
||||
%>
|
||||
<a class="get_subtitle ui small blue label" data-moviePath="{{details[8]}}" data-scenename="{{details[12]}}" data-language="{{alpha3_from_alpha2(str(missing_subs_language))}}" data-hi="{{details[4]}}" data-radarrId={{details[10]}}>
|
||||
{{language_from_alpha2(str(missing_subs_language))}}
|
||||
<i style="margin-left:3px; margin-right:0px" class="search icon"></i>
|
||||
</a>
|
||||
<%
|
||||
end
|
||||
end
|
||||
end
|
||||
%>
|
||||
|
|
|
@ -65,17 +65,41 @@
|
|||
<td colspan="2">No missing movie subtitles.</td>
|
||||
</tr>
|
||||
%end
|
||||
%for row in rows:
|
||||
%for row in rows:
|
||||
<tr class="selectable">
|
||||
<td><a href="{{base_url}}movie/{{row[2]}}">{{row[0]}}</a></td>
|
||||
<td>
|
||||
%missing_languages = ast.literal_eval(row[1])
|
||||
%if missing_languages is not None:
|
||||
%for language in missing_languages:
|
||||
<a data-moviePath="{{row[3]}}" data-sceneName="{{row[5]}}" data-language="{{alpha3_from_alpha2(str(language))}}" data-hi="{{row[4]}}" data-radarrId={{row[2]}} class="get_subtitle ui tiny label">
|
||||
{{language}}
|
||||
<i style="margin-left:3px; margin-right:0px" class="search icon"></i>
|
||||
</a>
|
||||
<%
|
||||
missing_languages = ast.literal_eval(row[1])
|
||||
if missing_languages is not None:
|
||||
from get_subtitle import search_active
|
||||
from get_settings import get_general_settings
|
||||
for language in missing_languages:
|
||||
if row[6] is not None and get_general_settings()[25]:
|
||||
for lang in ast.literal_eval(row[6]):
|
||||
if language in lang:
|
||||
active = search_active(lang[1])
|
||||
if active:
|
||||
%>
|
||||
<a data-moviePath="{{row[3]}}" data-sceneName="{{row[5]}}" data-language="{{alpha3_from_alpha2(str(language))}}" data-hi="{{row[4]}}" data-radarrId={{row[2]}} class="get_subtitle ui tiny label">
|
||||
{{language}}
|
||||
<i style="margin-left:3px; margin-right:0px" class="search icon"></i>
|
||||
</a>
|
||||
%else:
|
||||
<a data-tooltip="Automatic searching delayed (adaptive search)" data-position="top right" data-inverted="" data-moviePath="{{row[3]}}" data-sceneName="{{row[5]}}" data-language="{{alpha3_from_alpha2(str(language))}}" data-hi="{{row[4]}}" data-radarrId={{row[2]}} class="get_subtitle ui tiny label">
|
||||
{{language}}
|
||||
<i style="margin-left:3px; margin-right:0px" class="search red icon"></i>
|
||||
</a>
|
||||
%end
|
||||
%end
|
||||
%end
|
||||
%else:
|
||||
<a data-moviePath="{{row[3]}}" data-sceneName="{{row[5]}}" data-language="{{alpha3_from_alpha2(str(language))}}" data-hi="{{row[4]}}" data-radarrId={{row[2]}} class="get_subtitle ui tiny label">
|
||||
{{language}}
|
||||
<i style="margin-left:3px; margin-right:0px" class="search icon"></i>
|
||||
</a>
|
||||
%end
|
||||
|
||||
%end
|
||||
%end
|
||||
</td>
|
||||
|
|
Loading…
Reference in a new issue