Skip to content

Commit

Permalink
Update plugin.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Belfagor2005 committed Aug 22, 2024
1 parent e2439ec commit 64a2622
Showing 1 changed file with 22 additions and 9 deletions.
31 changes: 22 additions & 9 deletions usr/lib/enigma2/python/Plugins/Extensions/vavoo/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,11 +202,14 @@ def trace_error():
global lngx
lngx = 'en'
try:
# global HALIGN
from Components.config import config
lng = config.osd.language.value
lng = lng[:-3]
if any(s in lngx for s in locl):
HALIGN = RT_HALIGN_RIGHT
# else:
# HALIGN = RT_HALIGN_LEFT
except:
lng = 'en'
pass
Expand Down Expand Up @@ -545,8 +548,6 @@ def __init__(self, session):
skin = os_path.join(skin_path, 'Plgnstrt.xml')
with codecs.open(skin, "r", encoding="utf-8") as f:
self.skin = f.read()
# with open(skin_strt, "r") as f:
# self.skin = f.read()
self["poster"] = Pixmap()
self["version"] = Label()
self['actions'] = ActionMap(['OkCancelActions'], {'ok': self.clsgo, 'cancel': self.clsgo}, -1)
Expand Down Expand Up @@ -603,7 +604,7 @@ def passe(self, rest=None):
class MainVavoo(Screen):
def __init__(self, session):
self.session = session
global _session
global _session, HALIGN
_session = session
Screen.__init__(self, session)

Expand All @@ -629,7 +630,7 @@ def __init__(self, session):
self.count = 0
self.loading = 0
self.url = vUtils.b64decoder(stripurl)
self['actions'] = ActionMap(['ButtonSetupActions', 'MenuActions', 'OkCancelActions', 'ColorActions', 'DirectionActions', 'HotkeyActions', 'InfobarEPGActions', 'ChannelSelectBaseActions'], {
self['actions'] = ActionMap(['ButtonSetupActions', 'MenuActions', 'OkCancelActions', 'ColorActions', 'DirectionActions', 'InfobarEPGActions', 'ChannelSelectBaseActions'], {
'prevBouquet': self.chDown,
'nextBouquet': self.chUp,
'ok': self.ok,
Expand Down Expand Up @@ -663,7 +664,8 @@ def arabic(self):
elif HALIGN == RT_HALIGN_RIGHT:
HALIGN = RT_HALIGN_LEFT
self['blue'].setText(_('Halign Right'))
self.cat()
# self.cat()
self.timer.start(200, True)

def update_me(self):
remote_version = '0.0'
Expand Down Expand Up @@ -732,6 +734,12 @@ def chDown(self):
self['name'].setText(str(auswahl))

def cat(self):
# if HALIGN == RT_HALIGN_RIGHT:
# self['blue'].setText(_('Halign Left'))
# else:
# self['blue'].setText(_('Halign Right'))
print('halign=', HALIGN)

self.cat_list = []
items = []
self.items_tmp = []
Expand Down Expand Up @@ -807,7 +815,7 @@ def deleteBouquets(self, result):
class vavoo(Screen):
def __init__(self, session, name, url):
self.session = session
global _session
global _session, HALIGN
_session = session
Screen.__init__(self, session)
skin = os_path.join(skin_path, 'defaultListScreen.xml')
Expand All @@ -834,7 +842,7 @@ def __init__(self, session, name, url):
self.loading = 0
self.name = name
self.url = url
self['actions'] = ActionMap(['ButtonSetupActions', 'MenuActions', 'OkCancelActions', 'ColorActions', 'DirectionActions', 'HotkeyActions', 'InfobarEPGActions', 'ChannelSelectBaseActions'], {
self['actions'] = ActionMap(['ButtonSetupActions', 'MenuActions', 'OkCancelActions', 'HotkeyActions', 'DirectionActions', 'InfobarEPGActions', 'ChannelSelectBaseActions'], {
'prevBouquet': self.chDown,
'nextBouquet': self.chUp,
'ok': self.ok,
Expand Down Expand Up @@ -862,7 +870,8 @@ def arabic(self):
elif HALIGN == RT_HALIGN_RIGHT:
HALIGN = RT_HALIGN_LEFT
self['blue'].setText(_('Halign Right'))
self.cat()
# self.cat()
self.timer.start(200, True)

def backhome(self):
if search_ok is True:
Expand Down Expand Up @@ -890,6 +899,11 @@ def chDown(self):
self['name'].setText(str(auswahl))

def cat(self):
# if HALIGN == RT_HALIGN_RIGHT:
# self['blue'].setText(_('Halign Left'))
# else:
# self['blue'].setText(_('Halign Right'))
print('halign=', HALIGN)
self.cat_list = []
items = []
xxxname = '/tmp/' + self.name + '.m3u'
Expand Down Expand Up @@ -930,7 +944,6 @@ def cat(self):
outfile.write(nname)
outfile.write('#EXTVLCOPT:http-user-agent=VAVOO/2.6' + '\n')
outfile.write(str(url) + '\n')
outfile.close()
# make m3u end
if len(self.cat_list) < 1:
return
Expand Down

0 comments on commit 64a2622

Please sign in to comment.