working on move, edit mode and add remove service to context menu
[enigma2.git] / lib / python / Screens / ServiceInfo.py
1 from Screen import Screen
2 from Components.ActionMap import ActionMap
3 from Components.Label import Label
4 from Components.MenuList import MenuList
5 from ServiceReference import ServiceReference
6
7 class ServiceInfo(Screen):
8         def __init__(self, session):
9                 Screen.__init__(self, session)
10
11                 self["actions"] = ActionMap(["OkCancelActions"],
12                 {
13                         "ok": self.close,
14                         "cancel": self.close
15                 }, -1)
16         
17                 Labels = ( ("Name",  "ServiceReference(self.session.nav.getCurrentlyPlayingServiceReference()).getServiceName()"),
18                                    ("Provider", ),
19                                    ("VideoPID",""),
20                                    ("AudioPID",""),
21                                    ("PCRPID",""),
22                                    ("PMTPID",""),
23                                    ("TXTPID",""),
24                                    ("Videoformat",""),
25                                    ("TSID",""),
26                                    ("ONID",""),
27                                    ("SID",""),
28                                    ("Namespace",""))
29         
30                 tlist = [ ]
31
32                 for item in Labels:
33                         try:
34                                 value = str(eval(item[1]))
35                         except:
36                                 value = "N/A"
37                         tlist.append((item[0] + ": " + value,0))
38                 
39                 self["infolist"] = MenuList(tlist)