Merge branches 'development' and 'halali' of https://github.com/morpheus65535/bazarr into halali

pull/249/head
Halali 6 years ago
commit 7118350826

@ -28,10 +28,10 @@ CREATE TABLE "table_settings_notifier" (
);
CREATE TABLE "table_settings_languages" (
`code3` TEXT NOT NULL UNIQUE,
`code3b` TEXT,
`code2` TEXT,
`name` TEXT NOT NULL,
`enabled` INTEGER,
`code3b` TEXT,
PRIMARY KEY(`code3`)
);
CREATE TABLE "table_history" (

@ -50,7 +50,7 @@ def update_movies():
for movie in r.json():
if movie['hasFile'] is True:
if 'movieFile' in movie:
if movie['movieFile']['relativePath'] is not None:
if movie["path"] != None and movie['movieFile']['relativePath'] != None:
try:
overview = unicode(movie['overview'])
except:

@ -74,8 +74,11 @@ if get_proxy_settings()[0] != 'None':
from bottle import route, run, template, static_file, request, redirect, response, HTTPError, app, hook
import bottle
bottle.TEMPLATE_PATH.insert(0, os.path.join(os.path.dirname(__file__), '../views/'))
bottle.debug(True)
bottle.TEMPLATES.clear()
if "PYCHARM_HOSTED" in os.environ:
bottle.debug(True)
bottle.TEMPLATES.clear()
else:
bottle.ERROR_PAGE_TEMPLATE = bottle.ERROR_PAGE_TEMPLATE.replace('if DEBUG and', 'if')
from cherrypy.wsgiserver import CherryPyWSGIServer
@ -721,7 +724,7 @@ def movies():
offset = (int(page) - 1) * page_size
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()
c.execute("SELECT code2, name FROM table_settings_languages WHERE enabled = 1")
languages = c.fetchall()

@ -102,8 +102,8 @@
<div id="divdetails" class="ui container">
<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">
<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="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="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"><i class="ui inverted huge compact search icon"></i></button>
<%
subs_languages = ast.literal_eval(str(details[7]))
subs_languages_list = []
@ -113,7 +113,7 @@
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>
<h2>{{details[0]}}</h2>
<p>{{details[1]}}</p>
@ -165,8 +165,7 @@
<tr>
<th class="collapsing"></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">Missing<br>subtitles</th>
<th class="collapsing">Manual<br>search</th>
@ -177,18 +176,18 @@
<tr>
<td class="collapsing">
%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:
<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
</td>
<td>{{episode[3]}}</td>
<td>
% if episode[8] is not None:
<span data-tooltip="{{episode[8]}}"><i class="info circle icon"></i></span>
% end
</td>
<td><span data-tooltip="{{episode[1]}}">{{episode[0]}}</span></td>
<td>
% if episode[8] is not None:
<span data-tooltip="Scenename is: {{episode[8]}}" data-inverted='' data-position="top left"><i class="info circle icon"></i></span>
% end
<span data-tooltip="Path is: {{episode[1]}}" data-inverted='' data-position="top left">{{episode[0]}}</span>
</td>
<td>
%if episode[4] is not None:
% actual_languages = ast.literal_eval(episode[4])
@ -234,7 +233,7 @@
{{language}}
<i style="margin-left:3px; margin-right:0px" class="search icon"></i>
%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}}
<i style="margin-left:3px; margin-right:0px" class="search red icon"></i>
%end

@ -67,11 +67,11 @@
<tr class="selectable">
<td class="collapsing">
%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>
</div>
%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>
</div>
%end
@ -80,7 +80,7 @@
<a href="{{base_url}}movie/{{row[4]}}">{{row[1]}}</a>
</td>
<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]))}}
</div>
</td>

@ -69,11 +69,11 @@
<tr class="selectable">
<td class="collapsing">
%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>
</div>
%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>
</div>
%end
@ -95,7 +95,7 @@
%end
</td>
<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]))}}
</div>
</td>

@ -120,6 +120,9 @@
<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: #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 style='margin-top: 2em;'>
%for language in subs_languages_list:

@ -72,17 +72,22 @@
<tr class="selectable">
<td>
%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:
<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
</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>
%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:
<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
{{row[2]}}
</td>
@ -105,7 +110,7 @@
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>
</div>
</td>

@ -79,9 +79,9 @@
<td><a href="{{base_url}}episodes/{{row[5]}}">{{row[1]}}</a></td>
<td>
%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:
<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
{{row[2]}}
</td>
@ -127,7 +127,7 @@
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>
</div>
</td>

Loading…
Cancel
Save