From e1aa105f72bfa99877075868c1b1f82c5d606f81 Mon Sep 17 00:00:00 2001 From: Aevann Date: Tue, 13 Feb 2024 12:10:05 +0200 Subject: [PATCH] shorter youtube code + make 1h38m work --- files/helpers/sanitize.py | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/files/helpers/sanitize.py b/files/helpers/sanitize.py index 110cefe99..3c0039f76 100644 --- a/files/helpers/sanitize.py +++ b/files/helpers/sanitize.py @@ -296,17 +296,9 @@ def handle_youtube_links(url): if yt_id_regex.fullmatch(id): if not t: t = params.get('t', params.get('start', [0]))[0] - if isinstance(t, str): - t = t.replace('s','').replace('S','') - split = t.split('m') - if len(split) == 2: - minutes = int(split[0]) - if split[1]: seconds = int(split[1]) - else: seconds = 0 - t = minutes*60 + seconds html = f'' return html