From 7f0a45d7d129382df9b29a944583691fd08fa250 Mon Sep 17 00:00:00 2001 From: KOL Date: Fri, 30 Oct 2015 00:53:53 +0300 Subject: [PATCH] - Add search video on channel function --- Contents/Code/__init__.py | 11 +++++++++++ Contents/Info.plist | 2 +- Contents/Strings/en.json | 3 ++- Contents/Strings/ru.json | 3 ++- 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/Contents/Code/__init__.py b/Contents/Code/__init__.py index ad18d7e..38088a6 100644 --- a/Contents/Code/__init__.py +++ b/Contents/Code/__init__.py @@ -375,6 +375,16 @@ def Channel(oid, title): title=u'%s' % L('Subscriptions'), thumb=ICONS['subscriptions'], )) + oc.add(InputDirectoryObject( + key=Callback( + Search, + s_type='video', + channelId=oid, + title=u'%s' % L('Search Channel') + ), + title=u'%s' % L('Search'), prompt=u'%s' % L('Search Channel'), + thumb=ICONS['search'] + )) AddPlaylists(oc, uid=oid) return oc @@ -839,6 +849,7 @@ def Search(query=None, title=L('Search'), s_type='video', offset=0, **kwargs): title=oc.title2, s_type=s_type, offset=res['nextPageToken'], + **kwargs ), title=u'%s' % L('Next page'), thumb=ICONS['next'] diff --git a/Contents/Info.plist b/Contents/Info.plist index 3f85a4c..aadf656 100644 --- a/Contents/Info.plist +++ b/Contents/Info.plist @@ -14,7 +14,7 @@ CFBundleSignature hook CFBundleVersion - 3.6 + 3.7 PlexPluginVersionUrl http://bit.ly/1FuE3dz diff --git a/Contents/Strings/en.json b/Contents/Strings/en.json index 23b810b..2415ca3 100644 --- a/Contents/Strings/en.json +++ b/Contents/Strings/en.json @@ -49,5 +49,6 @@ "An error has occurred": "An error has occurred", "Sign out": "Sign out", "Subscriptions list sorting order": "Subscriptions list sorting order", - "Always play highest quality": "Always play highest quality" + "Always play highest quality": "Always play highest quality", + "Search Channel": "Search Channel" } \ No newline at end of file diff --git a/Contents/Strings/ru.json b/Contents/Strings/ru.json index 871bb0d..0a10f88 100644 --- a/Contents/Strings/ru.json +++ b/Contents/Strings/ru.json @@ -49,5 +49,6 @@ "An error has occurred": "Произошла ошибка", "Sign out": "Выйти", "Subscriptions list sorting order": "Порядок сортировки Подписок", - "Always play highest quality": "Всегда проигрывать максимальное качество" + "Always play highest quality": "Всегда проигрывать максимальное качество", + "Search Channel": "Поиск на канале" } \ No newline at end of file