finish lclass emmissionGUi
This commit is contained in:
parent
9343859e42
commit
96b2e3cf20
28
chaineTV.py
28
chaineTV.py
@ -64,9 +64,21 @@ class ScrollableCanvas(Frame):
|
||||
# update the inner frame's width to fill the canvas
|
||||
canvas.itemconfigure(interior_id, width=canvas.winfo_width())
|
||||
canvas.bind('<Configure>', _configure_canvas)
|
||||
class emmisionGUI(frame):
|
||||
def __init__(parent,**kwarg):
|
||||
Frame.__init__(parent)
|
||||
|
||||
class emmisionGUI(Frame):
|
||||
def __init__(self,parent,**kwarg):
|
||||
Frame.__init__(self,parent)
|
||||
self.image=LabelImage(self,kwarg['img'])
|
||||
self.image.pack()
|
||||
self.LabelTitle=Labbelink(self,("emmision ce soir: "+kwarg["title"]),kwarg['href'])
|
||||
self.LabelTitle.pack()
|
||||
if len(kwarg['casting']) > 0:
|
||||
self.LabelReal=Label(self,text="réalisateur: "+kwarg['casting'][0])
|
||||
self.LabelReal.pack()
|
||||
self.labelCasting=Label(self,text="acteur: "+str(kwarg['casting'][1:]))
|
||||
self.labelCasting.pack()
|
||||
self.LabelSynopsys=Label(self,text="synopsys: " +kwarg['synopsis'],wraplength=350)
|
||||
self.LabelSynopsys.pack()
|
||||
|
||||
|
||||
class Interface:
|
||||
@ -114,20 +126,12 @@ class Interface:
|
||||
link.pack()
|
||||
self.resultframe.update()
|
||||
print(self.data[self.value.get()])
|
||||
|
||||
emision=parse_emmission(strlink)
|
||||
|
||||
if emision:
|
||||
if emision == "can't find show":
|
||||
Label(self.resultframe.interior,text="impssible de parser cette chaine").pack()
|
||||
else:
|
||||
image=LabelImage(self.resultframe.interior,emision['img'])
|
||||
image.pack()
|
||||
Labbelink(self.resultframe.interior,("emmision ce soir: "+emision["title"]),emision['href']).pack()
|
||||
if len(emision['casting']) > 0:
|
||||
Label(self.resultframe.interior,text="réalisateur: "+emision['casting'][0]).pack()
|
||||
Label(self.resultframe.interior,text="acteur: "+str(emision['casting'][1:])).pack()
|
||||
Label(self.resultframe.interior,text="synopsys: " +emision['synopsis'],wraplength=350).pack()
|
||||
emmisionGUI(self.resultframe.interior,**emision).pack()
|
||||
else:
|
||||
Label(self.resultframe.interior,text="pas de connection internet impossible de determiner l'émission du soir").pack()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user