diff options
author | Jesús <heckyel@hyperbola.info> | 2020-06-13 19:43:09 -0500 |
---|---|---|
committer | Jesús <heckyel@hyperbola.info> | 2020-06-13 19:43:09 -0500 |
commit | 669b9c43fa06434f25d82de8e70c4fcfd4bc7805 (patch) | |
tree | ea14d106b8b4d65af6cc68822427beb4113cb421 /plugins | |
parent | df45d91a9c31245955f6eeca30f84263d3705ad8 (diff) | |
download | libretube-669b9c43fa06434f25d82de8e70c4fcfd4bc7805.tar.lz libretube-669b9c43fa06434f25d82de8e70c4fcfd4bc7805.tar.xz libretube-669b9c43fa06434f25d82de8e70c4fcfd4bc7805.zip |
Fix category and tags for search
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/tipue-search/tipue_search.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/plugins/tipue-search/tipue_search.py b/plugins/tipue-search/tipue_search.py index a55c91c..5928576 100644 --- a/plugins/tipue-search/tipue_search.py +++ b/plugins/tipue-search/tipue_search.py @@ -109,9 +109,14 @@ class Tipue_Search_JSON_Generator(object): video_src = article.og_video if getattr( article, 'og_video', 'None') != 'None' else '' + # category video_category = article.category.name if getattr( article, 'category', 'None') != 'None' else '' + # tags + data_tags = ['%s' % (tag) for tag in article.tags] + video_tags = dict((num, tag) for num, tag in enumerate(data_tags)) + node = {'title': video_title, 'description': video_text, 'videoThumbnail': url_image, @@ -123,7 +128,8 @@ class Tipue_Search_JSON_Generator(object): 'published': video_publish, 'publishedText': video_publish_text, 'time': video_time, - 'tags': video_category, + 'category': video_category, + 'keywords': video_tags, 'url': video_url} self.json_nodes.append(node) |