diff --git a/pandora/archive/external.py b/pandora/archive/external.py index 54c55246..5f4ac3fd 100644 --- a/pandora/archive/external.py +++ b/pandora/archive/external.py @@ -40,12 +40,8 @@ info_key_map = { 'display_id': 'id', } -YT_DLP = ['yt-dlp'] -if settings.YT_DLP_EXTRA: - YT_DLP += settings.YT_DLP_EXTRA - def get_info(url, referer=None): - cmd = YT_DLP + ['-j', '--all-subs', url] + cmd = ['yt-dlp', '-j', '--all-subs', url] if referer: cmd += ['--referer', referer] p = subprocess.Popen(cmd, @@ -97,7 +93,7 @@ def add_subtitles(item, media, tmp): sub.save() def load_formats(url): - cmd = YT_DLP + ['-q', url, '-j', '-F'] + cmd = ['yt-dlp', '-q', url, '-j', '-F'] p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, close_fds=True) @@ -116,7 +112,7 @@ def download(item_id, url, referer=None): if isinstance(tmp, bytes): tmp = tmp.decode('utf-8') os.chdir(tmp) - cmd = YT_DLP + ['-q', media['url']] + cmd = ['yt-dlp', '-q', media['url']] if referer: cmd += ['--referer', referer] elif 'referer' in media: diff --git a/pandora/settings.py b/pandora/settings.py index 084ce8b3..7268c31c 100644 --- a/pandora/settings.py +++ b/pandora/settings.py @@ -291,8 +291,6 @@ DATA_UPLOAD_MAX_MEMORY_SIZE = 32 * 1024 * 1024 EMPTY_CLIPS = True -YT_DLP_EXTRA = [] - #you can ignore things below this line #========================================================================= LOCAL_APPS = [] diff --git a/static/mobile/js/item.js b/static/mobile/js/item.js index 7f81fa23..a9942536 100644 --- a/static/mobile/js/item.js +++ b/static/mobile/js/item.js @@ -129,7 +129,6 @@ async function loadData(id, args) { ${icon.down} ${layerData.title} `) - data.layers[layer] = sortBy(data.layers[layer], ["+in", "+created"]) data.layers[layer].forEach(annotation => { if (pandora.url) { annotation.value = annotation.value.replace( diff --git a/static/mobile/js/utils.js b/static/mobile/js/utils.js index 860db698..cbaec6a6 100644 --- a/static/mobile/js/utils.js +++ b/static/mobile/js/utils.js @@ -161,33 +161,3 @@ const getVideoURL = function(id, resolution, part, track, streamId) { return prefix + '/' + getVideoURLName(id, resolution, part, track, streamId); }; -function getSortValue(value) { - var getSortValue = Ox.cache(function getSortValue(value) { - var sortValue = value; - return sortValue; -} - -function sortBy(array, by, map) { - return array.sort(function(a, b) { - var aValue, bValue, index = 0, key, ret = 0; - while (ret == 0 && index < by.length) { - key = by[index].key; - aValue = getSortValue( - map[key] ? map[key](a[key], a) : a[key] - ); - bValue = getSortValue( - map[key] ? map[key](b[key], b) : b[key] - ); - if ((aValue === null) != (bValue === null)) { - ret = aValue === null ? 1 : -1; - } else if (aValue < bValue) { - ret = by[index].operator == '+' ? -1 : 1; - } else if (aValue > bValue) { - ret = by[index].operator == '+' ? 1 : -1; - } else { - index++; - } - } - return ret; - }); -}