forked from mediathekview/plugin.video.mediathekview
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcontextMenu.py
More file actions
25 lines (21 loc) · 771 Bytes
/
contextMenu.py
File metadata and controls
25 lines (21 loc) · 771 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# -*- coding: utf-8 -*-
"""
Context Menu hook
Copyright (c) 2017-2018, codingPF
SPDX-License-Identifier: MIT
"""
import sys
import xbmc
import resources.lib.mvutils as mvutils
try:
# Python 3.x
from urllib.parse import urlencode
except ImportError:
# Python 2.x
from urllib import urlencode
if __name__ == '__main__':
params = {"mode":"research", "doNotSave":"true", "search" : sys.listitem.getLabel()}
utfEnsuredParams = mvutils.dict_to_utf(params)
cmd = 'ActivateWindow(Videos,plugin://plugin.video.mediathekview?' + urlencode(utfEnsuredParams) + ")"
#xbmc.executebuiltin('ActivateWindow(Videos,plugin://plugin.video.mediathekview?mode=research&doNotSave=true&search={})'.format(sys.listitem.getLabel()))
xbmc.executebuiltin(cmd)