remove yt-dlp, fix captions PO Token issue, fix 429 retry logic
- Remove yt-dlp entirely (modules, routes, settings, dependency) Was blocking page loads by running synchronously in gevent - Fix captions: use Android client caption URLs (no PO Token needed) instead of web timedtext URLs that YouTube now blocks - Fix 429 retry: fail immediately without Tor (same IP = pointless retry) Was causing ~27s delays with exponential backoff - Accept ytdlp_enabled as legacy setting to avoid warning on startup
This commit is contained in:
@@ -86,15 +86,6 @@
|
||||
{% endfor %}
|
||||
</select>
|
||||
|
||||
{% if audio_tracks and audio_tracks|length > 1 %}
|
||||
<select id="audio-language-select" autocomplete="off" title="Audio language">
|
||||
{% for track in audio_tracks %}
|
||||
<option value="{{ track.get('track_id', track['language']) }}" {{ 'selected' if loop.index0 == 0 else '' }}>
|
||||
🔊 {{ track['language_name'] }}{% if track.get('is_default') %} (Default){% endif %}
|
||||
</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
<input class="v-checkbox" name="video_info_list" value="{{ video_info }}" form="playlist-edit" type="checkbox">
|
||||
@@ -257,37 +248,6 @@
|
||||
// @license-end
|
||||
</script>
|
||||
|
||||
<!-- Audio language selector handler -->
|
||||
<script>
|
||||
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
|
||||
(function() {
|
||||
'use strict';
|
||||
const audioSelect = document.getElementById('audio-language-select');
|
||||
const qualitySelect = document.getElementById('quality-select');
|
||||
|
||||
if (audioSelect && qualitySelect) {
|
||||
audioSelect.addEventListener('change', function() {
|
||||
const selectedAudio = this.value;
|
||||
const selectedQuality = qualitySelect.value;
|
||||
|
||||
// Parse current quality selection
|
||||
let qualityData;
|
||||
try {
|
||||
qualityData = JSON.parse(selectedQuality);
|
||||
} catch(e) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Reload video with new audio language
|
||||
const currentUrl = new URL(window.location.href);
|
||||
currentUrl.searchParams.set('audio_lang', selectedAudio);
|
||||
window.location.href = currentUrl.toString();
|
||||
});
|
||||
}
|
||||
}());
|
||||
// @license-end
|
||||
</script>
|
||||
|
||||
<script src="/youtube.com/static/js/common.js"></script>
|
||||
<script src="/youtube.com/static/js/transcript-table.js"></script>
|
||||
{% if settings.use_video_player == 2 %}
|
||||
|
||||
Reference in New Issue
Block a user