From 922ca30697ac717c639ac8f7f071ee8722797cfa Mon Sep 17 00:00:00 2001 From: Daniel Gunzinger Date: Thu, 23 Apr 2020 22:16:49 +0200 Subject: [PATCH] clone title into keywords in class URLItem so added clips become searchable via the webinterface --- media/url.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/media/url.py b/media/url.py index 07cc797..3402143 100644 --- a/media/url.py +++ b/media/url.py @@ -42,11 +42,12 @@ class URLItem(BaseItem): if from_dict is None: super().__init__() self.url = url if url[-1] != "/" else url[:-1] - self.title = '' + self.title = "" self.duration = 0 self.id = hashlib.md5(url.encode()).hexdigest() self.path = var.tmp_folder + self.id + ".mp3" - self.thumbnail = '' + self.thumbnail = "" + self.keywords = "" else: super().__init__(from_dict) self.url = from_dict['url'] @@ -126,6 +127,7 @@ class URLItem(BaseItem): info = ydl.extract_info(self.url, download=False) self.duration = info['duration'] / 60 self.title = info['title'] + self.keywords = info['title'] succeed = True return True except youtube_dl.utils.DownloadError: