Skip to content

Commit

Permalink
Use futurize to have python 3 compatible commas
Browse files Browse the repository at this point in the history
  • Loading branch information
persianpros committed Oct 30, 2020
1 parent 5390843 commit d1a85b0
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 19 deletions.
Expand Up @@ -18,7 +18,7 @@ class xtraEmcBackdrop(Renderer):

def __init__(self):
Renderer.__init__(self)
self.piconsize = (0,0)
self.piconsize = (0, 0)
self.delayPicTime = 100

def applySkin(self, desktop, parent):
Expand Down
Expand Up @@ -18,7 +18,7 @@ class xtraEmcPoster(Renderer):

def __init__(self):
Renderer.__init__(self)
self.piconsize = (0,0)
self.piconsize = (0, 0)
self.delayPicTime = 100

def applySkin(self, desktop, parent):
Expand Down
Expand Up @@ -86,7 +86,7 @@ def selBouquets():
for i in range(int(n)):
title = events[i][4]
evntNm = re.sub("([\(\[]).*?([\)\]])|(: odc.\d+)|(\d+: odc.\d+)|(\d+ odc.\d+)|(:)|( -(.*?).*)|(,)|!", "", title).rstrip().lower()
open(pathLoc+"events","a+").write("%s\n"% str(evntNm))
open(pathLoc+"events", "a+").write("%s\n"% str(evntNm))
except:
pass
intCheck()
Expand Down Expand Up @@ -666,7 +666,7 @@ def infos():
url_omdb = 'https://www.omdbapi.com/?apikey={}&i={}'.format(str(omdb_api), str(imdb_id))
info_json = requests.get(url_omdb).json()

w = open(info_files,"wb").write(json.dumps(info_json))
w = open(info_files, "wb").write(json.dumps(info_json))
downloaded += 1
w.close()

Expand Down
30 changes: 15 additions & 15 deletions usr/lib/enigma2/python/Plugins/Extensions/xtraEvent/xtra.py
Expand Up @@ -196,7 +196,7 @@ def __init__(self, session):
"menu": self.brokenImageRemove,

# "info": self.about,
},-1)
}, -1)

self.setTitle(_("xtraEvent v1"))
self['status'] = Label()
Expand Down Expand Up @@ -386,7 +386,7 @@ def currentChEpgs(self):
title = events[i][4]
evntNm = re.sub("([\(\[]).*?([\)\]])|(: odc.\d+)|(\d+: odc.\d+)|(\d+ odc.\d+)|(:)|( -(.*?).*)|(,)|!", "", title).rstrip().lower()

open(pathLoc+"events","a+").write("%s\n" % str(evntNm))
open(pathLoc+"events", "a+").write("%s\n" % str(evntNm))

if os.path.exists(pathLoc+"events"):
with open(pathLoc+"events", "r") as f:
Expand Down Expand Up @@ -709,21 +709,21 @@ def pc(self):
if desktop_size <= 1280:
if self.pb == "posters":
self["Picture"].instance.setScale(1)
self["Picture"].instance.resize(eSize(185,278))
self["Picture"].instance.move(ePoint(930,325))
self["Picture"].instance.resize(eSize(185, 278))
self["Picture"].instance.move(ePoint(930, 325))
else:
self["Picture"].instance.setScale(1)
self["Picture"].instance.resize(eSize(300,170))
self["Picture"].instance.move(ePoint(890,375))
self["Picture"].instance.resize(eSize(300, 170))
self["Picture"].instance.move(ePoint(890, 375))
else:
if self.pb == "posters":
self["Picture"].instance.setScale(1)
self["Picture"].instance.resize(eSize(185,278))
self["Picture"].instance.move(ePoint(1450,550))
self["Picture"].instance.resize(eSize(185, 278))
self["Picture"].instance.move(ePoint(1450, 550))
else:
self["Picture"].instance.setScale(1)
self["Picture"].instance.resize(eSize(300,170))
self["Picture"].instance.move(ePoint(1400,600))
self["Picture"].instance.resize(eSize(300, 170))
self["Picture"].instance.move(ePoint(1400, 600))

self['Picture'].show()
self.inf()
Expand Down Expand Up @@ -751,7 +751,7 @@ def inf(self):
im = Image.open(pb_path)
pb_res = im.size

self['info'].setText(_("{}/{} {} {} ".format(cur,tot,pb_sz,pb_res)))
self['info'].setText(_("{}/{} {} {} ".format(cur, tot, pb_sz, pb_res)))
except:
return

Expand Down Expand Up @@ -782,7 +782,7 @@ def append(self):
if config.plugins.xtraEvent.PB.value == "backdrops":
if not config.plugins.xtraEvent.searchModManuel.value == "TV List":
im1 = Image.open(target)
im1 = im1.resize((1280,720))
im1 = im1.resize((1280, 720))
im1 = im1.save(target)
if os.path.exists(target):
im1 = Image.open(target)
Expand Down Expand Up @@ -921,7 +921,7 @@ def imdb(self):
url_find = 'https://m.imdb.com/find?q={}'.format(quote(self.title))
ff = requests.get(url_find).text
p = 'src=\"https://(.*?)._V1_UX75_CR0,0,75,109_AL_.jpg'
pstr = re.findall(p,ff)[0]
pstr = re.findall(p, ff)[0]
if config.plugins.xtraEvent.PB.value == "posters":
url = "https://{}._V1_UX{}_AL_.jpg".format(pstr, config.plugins.xtraEvent.imdb_Poster_size.value)
if url:
Expand Down Expand Up @@ -1067,7 +1067,7 @@ def bouquetEpgs(self):
os.remove(pathLoc+"events")
try:
self.sources = []
for idx,item in enumerate(self["list"].list):
for idx, item in enumerate(self["list"].list):
item = self["list"].list[idx][0]
if item[3]:
self.sources.append(item[0])
Expand All @@ -1084,7 +1084,7 @@ def bouquetEpgs(self):
title = events[i][4]
evntNm = re.sub("([\(\[]).*?([\)\]])|(: odc.\d+)|(\d+: odc.\d+)|(\d+ odc.\d+)|(:)|( -(.*?).*)|(,)|!", "", title).rstrip().lower()

open(pathLoc+"events","a+").write("%s\n"% str(evntNm))
open(pathLoc+"events", "a+").write("%s\n"% str(evntNm))
except:
pass
self.close()
Expand Down

0 comments on commit d1a85b0

Please sign in to comment.