mirror of https://github.com/morpheus65535/bazarr
Merge remote-tracking branch 'origin/development' into morpheus
# Conflicts: # bazarr/list_subtitles.py
This commit is contained in:
commit
1e0980f8fc
|
@ -31,6 +31,7 @@ def store_subtitles(file):
|
||||||
actual_subtitles = []
|
actual_subtitles = []
|
||||||
if os.path.exists(file):
|
if os.path.exists(file):
|
||||||
notifications.write(msg='Analyzing this file for subtitles: ' + file, queue='list_subtitles')
|
notifications.write(msg='Analyzing this file for subtitles: ' + file, queue='list_subtitles')
|
||||||
|
if settings.general.getboolean('use_embedded_subs'):
|
||||||
if os.path.splitext(file)[1] == '.mkv':
|
if os.path.splitext(file)[1] == '.mkv':
|
||||||
logging.debug("BAZARR is trying to index embedded subtitles.")
|
logging.debug("BAZARR is trying to index embedded subtitles.")
|
||||||
try:
|
try:
|
||||||
|
@ -42,7 +43,7 @@ def store_subtitles(file):
|
||||||
if alpha2_from_alpha3(subtitle_track.language) is not None:
|
if alpha2_from_alpha3(subtitle_track.language) is not None:
|
||||||
lang = str(alpha2_from_alpha3(subtitle_track.language))
|
lang = str(alpha2_from_alpha3(subtitle_track.language))
|
||||||
logging.debug("BAZARR embedded subtitles detected: " + lang)
|
logging.debug("BAZARR embedded subtitles detected: " + lang)
|
||||||
actual_subtitles.append([lang, None, subtitle_track.forced])
|
actual_subtitles.append([lang, None])
|
||||||
except:
|
except:
|
||||||
logging.debug("BAZARR unable to index this unrecognized language: " + subtitle_track.language)
|
logging.debug("BAZARR unable to index this unrecognized language: " + subtitle_track.language)
|
||||||
pass
|
pass
|
||||||
|
@ -122,6 +123,7 @@ def store_subtitles_movie(file):
|
||||||
actual_subtitles = []
|
actual_subtitles = []
|
||||||
if os.path.exists(file):
|
if os.path.exists(file):
|
||||||
notifications.write(msg='Analyzing this file for subtitles: ' + file, queue='list_subtitles')
|
notifications.write(msg='Analyzing this file for subtitles: ' + file, queue='list_subtitles')
|
||||||
|
if settings.general.getboolean('use_embedded_subs'):
|
||||||
if os.path.splitext(file)[1] == '.mkv':
|
if os.path.splitext(file)[1] == '.mkv':
|
||||||
logging.debug("BAZARR is trying to index embedded subtitles.")
|
logging.debug("BAZARR is trying to index embedded subtitles.")
|
||||||
try:
|
try:
|
||||||
|
@ -133,7 +135,7 @@ def store_subtitles_movie(file):
|
||||||
if alpha2_from_alpha3(subtitle_track.language) is not None:
|
if alpha2_from_alpha3(subtitle_track.language) is not None:
|
||||||
lang = str(alpha2_from_alpha3(subtitle_track.language))
|
lang = str(alpha2_from_alpha3(subtitle_track.language))
|
||||||
logging.debug("BAZARR embedded subtitles detected: " + lang)
|
logging.debug("BAZARR embedded subtitles detected: " + lang)
|
||||||
actual_subtitles.append([lang, None, subtitle_track.forced])
|
actual_subtitles.append([lang, None])
|
||||||
except:
|
except:
|
||||||
logging.debug("BAZARR unable to index this unrecognized language: " + subtitle_track.language)
|
logging.debug("BAZARR unable to index this unrecognized language: " + subtitle_track.language)
|
||||||
pass
|
pass
|
||||||
|
|
|
@ -87,7 +87,7 @@
|
||||||
<td>
|
<td>
|
||||||
% upgradable_criteria = (row[5], row[2], row[8])
|
% upgradable_criteria = (row[5], row[2], row[8])
|
||||||
% if upgradable_criteria in upgradable_movies:
|
% if upgradable_criteria in upgradable_movies:
|
||||||
% if row[7] and row[7] in ast.literal_eval(str(row[6])):
|
% if row[6] and row[7] and row[7] in ast.literal_eval(str(row[6])):
|
||||||
<div class="ui inverted basic compact icon" data-tooltip="This subtitles is eligible to an upgrade." data-inverted="" data-position="top left">
|
<div class="ui inverted basic compact icon" data-tooltip="This subtitles is eligible to an upgrade." data-inverted="" data-position="top left">
|
||||||
<i class="ui green recycle icon upgrade"></i>{{row[3]}}
|
<i class="ui green recycle icon upgrade"></i>{{row[3]}}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -347,11 +347,9 @@
|
||||||
<div class="five wide column">
|
<div class="five wide column">
|
||||||
<select name="settings_subfolder" id="settings_subfolder"
|
<select name="settings_subfolder" id="settings_subfolder"
|
||||||
class="ui fluid selection dropdown">
|
class="ui fluid selection dropdown">
|
||||||
<option value="current">Current</option>
|
<option value="current">Alongside media file</option>
|
||||||
<option value="sub">sub</option>
|
<option value="relative">Relative path to media file</option>
|
||||||
<option value="subs">subs</option>
|
<option value="absolute">Absolute path</option>
|
||||||
<option value="subtitle">subtitle</option>
|
|
||||||
<option value="subtitles">subtitles</option>
|
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -364,7 +362,8 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="middle aligned row">
|
<div class="middle aligned row subfolder">
|
||||||
|
<div class="two wide column"></div>
|
||||||
<div class="right aligned four wide column">
|
<div class="right aligned four wide column">
|
||||||
<label>Custom Subtitle folder</label>
|
<label>Custom Subtitle folder</label>
|
||||||
</div>
|
</div>
|
||||||
|
@ -379,8 +378,7 @@
|
||||||
|
|
||||||
<div class="collapsed center aligned column">
|
<div class="collapsed center aligned column">
|
||||||
<div class="ui basic icon"
|
<div class="ui basic icon"
|
||||||
data-tooltip='Choose your own folder for the subtitles'
|
data-tooltip='Choose your own folder for the subtitles' data-inverted="">
|
||||||
data-inverted="">
|
|
||||||
<i class="help circle large icon"></i>
|
<i class="help circle large icon"></i>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1936,6 +1934,19 @@ $(function() {
|
||||||
$('#loader').removeClass('active');
|
$('#loader').removeClass('active');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (($('#settings_subfolder').val() !== "relative") && ($('#settings_subfolder').val() !== "absolute")) {
|
||||||
|
$('.subfolder').hide();
|
||||||
|
}
|
||||||
|
|
||||||
|
$('#settings_subfolder').dropdown('setting', 'onChange', function(){
|
||||||
|
if (($('#settings_subfolder').val() !== "relative") && ($('#settings_subfolder').val() !== "absolute")) {
|
||||||
|
$('.subfolder').hide();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$('.subfolder').show();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
$('#sonarr_validate').on('click', function() {
|
$('#sonarr_validate').on('click', function() {
|
||||||
if ($('#sonarr_ssl_div').checkbox('is checked')) {
|
if ($('#sonarr_ssl_div').checkbox('is checked')) {
|
||||||
|
|
Loading…
Reference in New Issue