Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge commit 'dream/master'

Conflicts:

	data/encoding.conf
	lib/python/Components/Harddisk.py
	lib/python/Components/TimerList.py
	lib/python/Screens/ScanSetup.py
	po/lt.po (kept ours)
	po/nl.po (kept ours)
  • Loading branch information...
commit 8db609a574001b8b36c204e7ac14cb8616f2a92b 2 parents f91b276 + 5807686
Mike Looijmans authored
Showing with 9,089 additions and 5,688 deletions.
  1. +5 −1 Navigation.py
  2. +2 −0  configure.ac
  3. +3 −2 data/defaults/Dream/Makefile.am
  4. +1 −1  data/defaults/Dream/dm500hd.info
  5. +1 −1  data/defaults/Dream/dm7025.info
  6. +1 −1  data/defaults/Dream/dm800.info
  7. +1 −1  data/defaults/Dream/dm8000.info
  8. +4 −0 data/defaults/Dream/hdbouquets/Makefile.am
  9. +129 −0 data/defaults/Dream/hdbouquets/userbouquet.favourites.tv
  10. +4 −0 data/defaults/Dream/sdbouquets/Makefile.am
  11. 0  data/defaults/Dream/{ → sdbouquets}/userbouquet.favourites.tv
  12. +4 −0 data/encoding.conf
  13. +3 −3 data/skin_default.xml
  14. +7 −0 lib/dvb/frontend.cpp
  15. +1 −0  lib/dvb/frontend.h
  16. +2 −0  lib/dvb/idvb.h
  17. +4 −0 lib/python/Components/Converter/ServiceInfo.py
  18. +11 −9 lib/python/Components/Converter/TemplatedMultiContent.py
  19. +36 −7 lib/python/Components/FanControl.py
  20. +6 −6 lib/python/Components/Harddisk.py
  21. +3 −3 lib/python/Components/Network.py
  22. +81 −8 lib/python/Components/NimManager.py
  23. +4 −0 lib/python/Components/Renderer/Listbox.py
  24. +3 −2 lib/python/Components/Sources/List.py
  25. +13 −4 lib/python/Components/Task.py
  26. +0 −1  lib/python/Components/TimerList.py
  27. +70 −32 lib/python/Plugins/Extensions/DVDBurn/DVDProject.py
  28. +21 −7 lib/python/Plugins/Extensions/DVDBurn/DVDTitle.py
  29. +18 −18 lib/python/Plugins/Extensions/DVDBurn/Process.py
  30. +16 −7 lib/python/Plugins/Extensions/DVDBurn/ProjectSettings.py
  31. +22 −0 lib/python/Plugins/Extensions/DVDBurn/TitleCutter.py
  32. +73 −42 lib/python/Plugins/Extensions/DVDBurn/TitleList.py
  33. +8 −5 lib/python/Plugins/Extensions/DVDBurn/TitleProperties.py
  34. +1 −1  lib/python/Plugins/Extensions/DVDBurn/plugin.py
  35. +0 −1  lib/python/Plugins/Extensions/DVDPlayer/Makefile.am
  36. +5 −0 lib/python/Plugins/Extensions/DVDPlayer/src/Makefile.am
  37. +41 −6 lib/python/Plugins/Extensions/DVDPlayer/src/servicedvd.cpp
  38. +2 −0  lib/python/Plugins/Extensions/DVDPlayer/src/servicedvd.h
  39. +0 −1  lib/python/Plugins/Extensions/SocketMMI/Makefile.am
  40. +5 −0 lib/python/Plugins/Extensions/SocketMMI/src/Makefile.am
  41. +71 −13 lib/python/Plugins/SystemPlugins/NFIFlash/flasher.py
  42. +3 −6 lib/python/Plugins/SystemPlugins/SoftwareManager/plugin.py
  43. +14 −8 lib/python/Plugins/SystemPlugins/TempFanControl/plugin.py
  44. +12 −14 lib/python/Plugins/SystemPlugins/WirelessLan/plugin.py
  45. +9 −3 lib/python/Screens/InfoBarGenerics.py
  46. +4 −4 lib/python/Screens/RecordPaths.py
  47. +31 −8 lib/python/Screens/Satconfig.py
  48. +2 −1  lib/python/Screens/ScanSetup.py
  49. +18 −1 lib/python/Screens/ServiceScan.py
  50. +5 −4 lib/python/Screens/TaskView.py
  51. +13 −10 lib/python/Screens/TimerEntry.py
  52. +3 −0  lib/service/iservice.h
  53. +106 −31 lib/service/servicedvb.cpp
  54. +5 −3 lib/service/servicedvb.h
  55. +4 −5 lib/service/servicemp3.cpp
  56. +6 −4 po/Makefile.am
  57. +162 −40 po/ar.po
  58. +162 −40 po/ca.po
  59. +162 −40 po/cs.po
  60. +659 −718 po/da.po
  61. +340 −158 po/de.po
  62. +162 −40 po/el.po
  63. +162 −40 po/en.po
  64. +199 −77 po/enigma2.pot
  65. +518 −602 po/es.po
  66. +507 −487 po/et.po
  67. +371 −186 po/fi.po
  68. +194 −47 po/fr.po
  69. +162 −40 po/fy.po
  70. +162 −40 po/hr.po
  71. +162 −40 po/hu.po
  72. +501 −551 po/is.po
  73. +496 −530 po/it.po
  74. +180 −48 po/lv.po
  75. +162 −40 po/no.po
  76. +582 −185 po/pl.po
  77. +162 −40 po/pt.po
  78. +183 −48 po/ru.po
  79. +219 −53 po/sk.po
  80. +162 −40 po/sl.po
  81. +279 −86 po/sr.po
  82. +458 −527 po/sv.po
  83. +499 −610 po/tr.po
  84. +205 −50 po/uk.po
View
6 Navigation.py
@@ -53,7 +53,7 @@ def dispatchRecordEvent(self, rec_service, event):
def playService(self, ref, checkParentalControl = True, forceRestart = False):
oldref = self.currentlyPlayingServiceReference
if ref and oldref and ref == oldref and not forceRestart:
- print "ignore request to play already running service"
+ print "ignore request to play already running service(1)"
return 0
print "playing", ref and ref.toString()
if ref is None:
@@ -64,6 +64,10 @@ def playService(self, ref, checkParentalControl = True, forceRestart = False):
if not oldref:
oldref = eServiceReference()
playref = getBestPlayableServiceReference(ref, oldref)
+ print "playref", playref
+ if playref and oldref and playref == oldref and not forceRestart:
+ print "ignore request to play already running service(2)"
+ return 0
if not playref or (checkParentalControl and not parentalControl.isServicePlayable(playref, boundFunction(self.playService, checkParentalControl = False))):
self.stopService()
return 0
View
2  configure.ac
@@ -131,6 +131,8 @@ data/fonts/Makefile
data/countries/Makefile
data/defaults/Makefile
data/defaults/Dream/Makefile
+data/defaults/Dream/hdbouquets/Makefile
+data/defaults/Dream/sdbouquets/Makefile
data/extensions/Makefile
data/skin_default/Makefile
data/skin_default/menu/Makefile
View
5 data/defaults/Dream/Makefile.am
@@ -1,3 +1,5 @@
+SUBDIRS = hdbouquets sdbouquets
+
installdir = $(pkgdatadir)/defaults/Dream
dist_install_DATA = \
@@ -9,5 +11,4 @@ dist_install_DATA = \
settings.500hd \
settings.7025 \
settings.800 \
- settings.8000 \
- userbouquet.favourites.tv
+ settings.8000
View
2  data/defaults/Dream/dm500hd.info
@@ -20,7 +20,7 @@
</prerequisites>
</file-->
<file type="favourites" directory="" name="bouquets.tv" />
- <file type="favourites" directory="" name="userbouquet.favourites.tv" />
+ <file type="favourites" directory="hdbouquets/" name="userbouquet.favourites.tv" />
<!--file type="package" directory="packages/" name="small-test_1.0_mipsel.ipk" /-->
</files>
</default>
View
2  data/defaults/Dream/dm7025.info
@@ -20,7 +20,7 @@
</prerequisites>
</file-->
<file type="favourites" directory="" name="bouquets.tv" />
- <file type="favourites" directory="" name="userbouquet.favourites.tv" />
+ <file type="favourites" directory="sdbouquets/" name="userbouquet.favourites.tv" />
<!--file type="package" directory="packages/" name="small-test_1.0_mipsel.ipk" /-->
</files>
</default>
View
2  data/defaults/Dream/dm800.info
@@ -20,7 +20,7 @@
</prerequisites>
</file-->
<file type="favourites" directory="" name="bouquets.tv" />
- <file type="favourites" directory="" name="userbouquet.favourites.tv" />
+ <file type="favourites" directory="hdbouquets/" name="userbouquet.favourites.tv" />
<!--file type="package" directory="packages/" name="small-test_1.0_mipsel.ipk" /-->
</files>
</default>
View
2  data/defaults/Dream/dm8000.info
@@ -20,7 +20,7 @@
</prerequisites>
</file-->
<file type="favourites" directory="" name="bouquets.tv" />
- <file type="favourites" directory="" name="userbouquet.favourites.tv" />
+ <file type="favourites" directory="hdbouquets/" name="userbouquet.favourites.tv" />
<!--file type="package" directory="packages/" name="small-test_1.0_mipsel.ipk" /-->
</files>
</default>
View
4 data/defaults/Dream/hdbouquets/Makefile.am
@@ -0,0 +1,4 @@
+installdir = $(pkgdatadir)/defaults/Dream/hdbouquets
+
+dist_install_DATA = \
+ userbouquet.favourites.tv
View
129 data/defaults/Dream/hdbouquets/userbouquet.favourites.tv
@@ -0,0 +1,129 @@
+#NAME Favourites (TV)
+#SERVICE 1:0:19:2B5C:3F3:1:C00000:0:0:0:
+#SERVICE 1:0:19:2B66:3F3:1:C00000:0:0:0:
+#SERVICE 1:0:1:6DCC:44D:1:C00000:0:0:0:
+#SERVICE 1:0:1:2EE3:441:1:C00000:0:0:0:
+#SERVICE 1:0:1:445C:453:1:C00000:0:0:0:
+#SERVICE 1:0:1:2EF4:441:1:C00000:0:0:0:
+#SERVICE 1:0:1:445D:453:1:C00000:0:0:0:
+#SERVICE 1:0:1:445E:453:1:C00000:0:0:0:
+#SERVICE 1:0:1:33:21:85:C00000:0:0:0:
+#SERVICE 1:0:1:701:5:85:C00000:0:0:0:
+#SERVICE 1:0:1:2F1C:441:1:C00000:0:0:0:
+#SERVICE 1:0:1:6D6E:437:1:C00000:0:0:0:
+#SERVICE 1:0:1:2FC:5:85:C00000:0:0:0:
+#SERVICE 1:0:1:F98:454:1:C00000:0:0:0:
+#SERVICE 1:0:19:2B70:3F3:1:C00000:0:0:0:
+#SERVICE 1:0:1:6D67:437:1:C00000:0:0:0:
+#SERVICE 1:0:1:7031:41B:1:C00000:0:0:0:
+#SERVICE 1:0:1:7032:41B:1:C00000:0:0:0:
+#SERVICE 1:0:1:7033:41B:1:C00000:0:0:0:
+#SERVICE 1:0:1:6E46:431:1:C00000:0:0:0:
+#SERVICE 1:0:1:6DCE:44D:1:C00000:0:0:0:
+#SERVICE 1:0:1:6DD1:44D:1:C00000:0:0:0:
+#SERVICE 1:0:1:6DCF:44D:1:C00000:0:0:0:
+#SERVICE 1:0:1:6E42:431:1:C00000:0:0:0:
+#SERVICE 1:64:B:0:0:0:0:0:0:0::Doku/Wissen/Themen
+#DESCRIPTION Doku/Wissen/Themen
+#SERVICE 1:0:1:6DD0:44D:1:C00000:0:0:0:
+#SERVICE 1:0:1:6D6B:437:1:C00000:0:0:0:
+#SERVICE 1:0:1:2775:444:1:C00000:0:0:0:
+#SERVICE 1:0:1:293:5:85:C00000:0:0:0:
+#SERVICE 1:0:1:6D70:437:1:C00000:0:0:0:
+#SERVICE 1:0:1:277B:444:1:C00000:0:0:0:
+#SERVICE 1:0:1:332D:45B:1:C00000:0:0:0:
+#SERVICE 1:0:1:3139:459:1:C00000:0:0:0:
+#SERVICE 1:0:1:2F5A:454:1:C00000:0:0:0:
+#SERVICE 1:64:A:0:0:0:0:0:0:0::Sport
+#DESCRIPTION Sport
+#SERVICE 1:0:1:384:21:85:C00000:0:0:0:
+#SERVICE 1:0:1:79E0:443:1:C00000:0:0:0:
+#SERVICE 1:64:1:0:0:0:0:0:0:0::Kinder
+#DESCRIPTION Kinder
+#SERVICE 1:0:1:2F08:441:1:C00000:0:0:0:
+#SERVICE 1:0:1:6D68:437:1:C00000:0:0:0:
+#SERVICE 1:0:1:7008:436:1:C00000:0:0:0:
+#SERVICE 1:0:1:6FE0:443:1:C00000:0:0:0:
+#SERVICE 1:64:2:0:0:0:0:0:0:0::Nachrichten
+#DESCRIPTION Nachrichten
+#SERVICE 1:0:1:2F3A:441:1:C00000:0:0:0:
+#SERVICE 1:0:1:445F:453:1:C00000:0:0:0:
+#SERVICE 1:0:1:79F4:443:1:C00000:0:0:0:
+#SERVICE 1:0:1:2753:402:1:C00000:0:0:0:
+#SERVICE 1:0:1:7035:41B:1:C00000:0:0:0:
+#SERVICE 1:64:3:0:0:0:0:0:0:0::Regional
+#DESCRIPTION Regional
+#SERVICE 1:0:1:3146:459:1:C00000:0:0:0:
+#SERVICE 1:0:1:300:7:85:C00000:0:0:0:
+#SERVICE 1:0:1:2778:444:1:C00000:0:0:0:
+#SERVICE 1:0:1:277A:444:1:C00000:0:0:0:
+#SERVICE 1:0:1:2779:444:1:C00000:0:0:0:
+#SERVICE 1:0:1:2777:444:1:C00000:0:0:0:
+#SERVICE 1:0:1:32D6:45D:1:C00000:0:0:0:
+#SERVICE 1:0:1:277D:444:1:C00000:0:0:0:
+#SERVICE 1:64:4:0:0:0:0:0:0:0::Musik
+#DESCRIPTION Musik
+#SERVICE 1:0:1:2774:444:1:C00000:0:0:0:
+#SERVICE 1:0:1:7004:436:1:C00000:0:0:0:
+#SERVICE 1:0:1:7001:436:1:C00000:0:0:0:
+#SERVICE 1:0:1:6FE1:443:1:C00000:0:0:0:
+#SERVICE 1:0:1:2FD:7:85:C00000:0:0:0:
+#SERVICE 1:0:1:32D5:45D:1:C00000:0:0:0:
+#SERVICE 1:0:1:332E:45B:1:C00000:0:0:0:
+#SERVICE 1:0:1:304:5:85:C00000:0:0:0:
+#SERVICE 1:0:1:702:5:85:C00000:0:0:0:
+#SERVICE 1:64:5:0:0:0:0:0:0:0::Reisen
+#DESCRIPTION Reisen
+#SERVICE 1:0:1:20:21:85:C00000:0:0:0:
+#SERVICE 1:64:9:0:0:0:0:0:0:0::Beratung
+#DESCRIPTION Beratung
+#SERVICE 1:0:1:295:21:85:C00000:0:0:0:
+#SERVICE 1:64:6:0:0:0:0:0:0:0::Einkaufen
+#DESCRIPTION Einkaufen
+#SERVICE 1:0:1:301:7:85:C00000:0:0:0:
+#SERVICE 1:0:1:28:21:85:C00000:0:0:0:
+#SERVICE 1:0:1:79EA:443:1:C00000:0:0:0:
+#SERVICE 1:0:1:2F44:454:1:C00000:0:0:0:
+#SERVICE 1:0:1:3148:459:1:C00000:0:0:0:
+#SERVICE 1:0:1:36:7:85:C00000:0:0:0:
+#SERVICE 1:0:1:307:7:85:C00000:0:0:0:
+#SERVICE 1:0:1:296:5:85:C00000:0:0:0:
+#SERVICE 1:0:1:383:21:85:C00000:0:0:0:
+#SERVICE 1:0:1:313C:459:1:C00000:0:0:0:
+#SERVICE 1:0:1:3159:459:1:C00000:0:0:0:
+#SERVICE 1:0:1:2E:21:85:C00000:0:0:0:
+#SERVICE 1:0:1:381:21:85:C00000:0:0:0:
+#SERVICE 1:64:7:0:0:0:0:0:0:0::High Definition
+#DESCRIPTION High Definition
+#SERVICE 1:0:19:6EEC:4B1:1:C00000:0:0:0:
+#SERVICE 1:0:19:EF12:421:1:C00000:0:0:0:
+#SERVICE 1:0:19:EF13:421:1:C00000:0:0:0:
+#SERVICE 1:64:0:0:0:0:0:0:0:0::Alternativen
+#DESCRIPTION Alternativen
+#SERVICE 1:0:1:6DCB:44D:1:C00000:0:0:0:
+#SERVICE 1:0:1:6E44:431:1:C00000:0:0:0:
+#SERVICE 1:0:1:6E45:431:1:C00000:0:0:0:
+#SERVICE 1:0:1:6E41:431:1:C00000:0:0:0:
+#SERVICE 1:0:1:6E40:431:1:C00000:0:0:0:
+#SERVICE 1:0:1:6E43:431:1:C00000:0:0:0:
+#SERVICE 1:0:1:6EE1:4B1:1:C00000:0:0:0:
+#SERVICE 1:0:1:6E2D:431:1:C00000:0:0:0:
+#SERVICE 1:0:1:6E2E:431:1:C00000:0:0:0:
+#SERVICE 1:0:1:6F46:445:1:C00000:0:0:0:
+#SERVICE 1:0:1:6E47:431:1:C00000:0:0:0:
+#SERVICE 1:0:1:6F76:457:1:C00000:0:0:0:
+#SERVICE 1:0:1:6E92:4B1:1:C00000:0:0:0:
+#SERVICE 1:0:1:6E93:4B1:1:C00000:0:0:0:
+#SERVICE 1:0:1:6F78:457:1:C00000:0:0:0:
+#SERVICE 1:0:1:6F79:457:1:C00000:0:0:0:
+#SERVICE 1:0:1:6E94:4B1:1:C00000:0:0:0:
+#SERVICE 1:0:1:6F77:457:1:C00000:0:0:0:
+#SERVICE 1:0:1:6EEB:4B1:1:C00000:0:0:0:
+#SERVICE 1:0:1:6E97:4B1:1:C00000:0:0:0:
+#SERVICE 1:0:1:6E96:4B1:1:C00000:0:0:0:
+#SERVICE 1:0:1:6E95:4B1:1:C00000:0:0:0:
+#SERVICE 1:64:8:0:0:0:0:0:0:0::Alternative SD services
+#DESCRIPTION Alternative SD services
+#SERVICE 1:0:1:6DCA:44D:1:C00000:0:0:0:
+#SERVICE 1:0:1:6D66:437:1:C00000:0:0:0:
+#SERVICE 1:0:1:7034:41B:1:C00000:0:0:0:
View
4 data/defaults/Dream/sdbouquets/Makefile.am
@@ -0,0 +1,4 @@
+installdir = $(pkgdatadir)/defaults/Dream/sdbouquets
+
+dist_install_DATA = \
+ userbouquet.favourites.tv
View
0  data/defaults/Dream/userbouquet.favourites.tv → ...faults/Dream/sdbouquets/userbouquet.favourites.tv
File renamed without changes
View
4 data/encoding.conf
@@ -7,6 +7,10 @@ pol ISO8859-2
rus ISO8859-5
bul ISO8859-5
tha ISO8859-11
+cze ISO6397
+ces ISO6397
+slo ISO6397
+slk ISO6397
#Sorry for that.. in DVB Spec this is the default behavior
#when no other encoding is given in dvb-texts..
#but this breaks too much providers yet..
View
6 data/skin_default.xml
@@ -643,14 +643,14 @@ self.instance.move(ePoint(orgpos.x() + (orgwidth - newwidth)/2, orgpos.y()))
</screen>
<!-- Nim selection -->
<screen name="NimSelection" position="center,center" size="400,330" title="Choose Tuner">
- <widget source="nimlist" render="Listbox" position="0,0" size="380,300" scrollbarMode="showOnDemand">
+ <widget source="nimlist" render="Listbox" position="0,0" size="380,360" scrollbarMode="showOnDemand">
<convert type="TemplatedMultiContent">
{"template": [
MultiContentEntryText(pos = (10, 5), size = (360, 30), flags = RT_HALIGN_LEFT, text = 1), # index 1 is the nim name,
- MultiContentEntryText(pos = (50, 30), size = (320, 30), font = 1, flags = RT_HALIGN_LEFT, text = 2), # index 2 is a description of the nim settings,
+ MultiContentEntryText(pos = (50, 30), size = (320, 50), font = 1, flags = RT_HALIGN_LEFT, text = 2), # index 2 is a description of the nim settings,
],
"fonts": [gFont("Regular", 20), gFont("Regular", 15)],
- "itemHeight": 70
+ "itemHeight": 80
}
</convert>
</widget>
View
7 lib/dvb/frontend.cpp
@@ -484,6 +484,13 @@ eDVBFrontend::eDVBFrontend(int adap, int fe, int &ok, bool simulate)
closeFrontend();
}
+void eDVBFrontend::reopenFrontend()
+{
+ sleep(1);
+ m_type = -1;
+ openFrontend();
+}
+
int eDVBFrontend::openFrontend()
{
if (m_state != stateClosed)
View
1  lib/dvb/frontend.h
@@ -149,6 +149,7 @@ class eDVBFrontend: public iDVBFrontend, public Object
static void setPreferredFrontend(int index) { PreferredFrontendIndex = index; }
static int getPreferredFrontend() { return PreferredFrontendIndex; }
+ void reopenFrontend();
int openFrontend();
int closeFrontend(bool force=false);
const char *getDescription() const { return m_description; }
View
2  lib/dvb/idvb.h
@@ -459,6 +459,8 @@ class iDVBFrontend: public iDVBFrontend_ENUMS, public iObject
public:
virtual RESULT getFrontendType(int &SWIG_OUTPUT)=0;
virtual RESULT tune(const iDVBFrontendParameters &where)=0;
+ virtual int closeFrontend(bool force = false)=0;
+ virtual void reopenFrontend()=0;
#ifndef SWIG
virtual RESULT connectStateChange(const Slot1<void,iDVBFrontend*> &stateChange, ePtr<eConnection> &connection)=0;
#endif
View
4 lib/python/Components/Converter/ServiceInfo.py
@@ -19,6 +19,7 @@ class ServiceInfo(Converter, object):
ONID = 13
SID = 14
FRAMERATE = 15
+ TRANSFERBPS = 16
def __init__(self, type):
@@ -40,6 +41,7 @@ def __init__(self, type):
"OnId": (self.ONID, (iPlayableService.evUpdatedInfo,)),
"Sid": (self.SID, (iPlayableService.evUpdatedInfo,)),
"Framerate": (self.FRAMERATE, (iPlayableService.evVideoSizeChanged,iPlayableService.evUpdatedInfo,)),
+ "TransferBPS": (self.TRANSFERBPS, (iPlayableService.evUpdatedInfo,)),
}[type]
def getServiceInfoString(self, info, what, convert = lambda x: "%d" % x):
@@ -112,6 +114,8 @@ def getText(self):
return self.getServiceInfoString(info, iServiceInformation.sSID)
elif self.type == self.FRAMERATE:
return self.getServiceInfoString(info, iServiceInformation.sFrameRate, lambda x: "%d fps" % ((x+500)/1000))
+ elif self.type == self.TRANSFERBPS:
+ return self.getServiceInfoString(info, iServiceInformation.sTransferBPS, lambda x: "%d kB/s" % (x/1024))
return ""
text = property(getText)
View
20 lib/python/Components/Converter/TemplatedMultiContent.py
@@ -10,8 +10,8 @@ def __init__(self, args):
del l["self"] # cleanup locals a bit
del l["args"]
- self.template = eval(args, {}, l)
self.active_style = None
+ self.template = eval(args, {}, l)
assert "fonts" in self.template
assert "itemHeight" in self.template
assert "template" in self.template or "templates" in self.template
@@ -25,7 +25,6 @@ def changed(self, what):
if not self.content:
from enigma import eListboxPythonMultiContent
self.content = eListboxPythonMultiContent()
- self.setTemplate()
# also setup fonts (also given by source)
index = 0
@@ -35,30 +34,33 @@ def changed(self, what):
# if only template changed, don't reload list
if what[0] == self.CHANGED_SPECIFIC and what[1] == "style":
- self.setTemplate()
- return
-
- if self.source:
+ pass
+ elif self.source:
self.content.setList(self.source.list)
- self.setTemplate()
+ self.setTemplate()
self.downstream_elements.changed(what)
def setTemplate(self):
if self.source:
style = self.source.style
+
if style == self.active_style:
- return # style did not change
+ return
# if skin defined "templates", that means that it defines multiple styles in a dict. template should still be a default
templates = self.template.get("templates")
template = self.template.get("template")
itemheight = self.template["itemHeight"]
+ selectionEnabled = self.template.get("selectionEnabled", True)
if templates and style and style in templates: # if we have a custom style defined in the source, and different templates in the skin, look it up
template = templates[style][1]
itemheight = templates[style][0]
+ if len(templates[style]) > 2:
+ selectionEnabled = templates[style][2]
self.content.setTemplate(template)
-
self.content.setItemHeight(itemheight)
+ self.selectionEnabled = selectionEnabled
+ self.active_style = style
View
43 lib/python/Components/FanControl.py
@@ -3,6 +3,9 @@
from Components.config import config, ConfigSubList, ConfigSubsection, ConfigSlider
from Tools.BoundFunction import boundFunction
+import NavigationInstance
+from enigma import iRecordableService
+
class FanControl:
# ATM there's only support for one fan
def __init__(self):
@@ -13,18 +16,42 @@ def __init__(self):
self.createConfig()
config.misc.standbyCounter.addNotifier(self.standbyCounterChanged, initial_call = False)
- def leaveStandby(self):
+ def setVoltage_PWM(self):
for fanid in range(self.getFanCount()):
cfg = self.getConfig(fanid)
self.setVoltage(fanid, cfg.vlt.value)
self.setPWM(fanid, cfg.pwm.value)
+ print "[FanControl]: setting fan values: fanid = %d, voltage = %d, pwm = %d" % (fanid, cfg.vlt.value, cfg.pwm.value)
+
+ def setVoltage_PWM_Standby(self):
+ for fanid in range(self.getFanCount()):
+ cfg = self.getConfig(fanid)
+ self.setVoltage(fanid, cfg.vlt_standby.value)
+ self.setPWM(fanid, cfg.pwm_standby.value)
+ print "[FanControl]: setting fan values (standby mode): fanid = %d, voltage = %d, pwm = %d" % (fanid, cfg.vlt_standby.value, cfg.pwm_standby.value)
+
+ def getRecordEvent(self, recservice, event):
+ recordings = len(NavigationInstance.instance.getRecordings())
+ if event == iRecordableService.evEnd:
+ if recordings == 0:
+ self.setVoltage_PWM_Standby()
+ elif event == iRecordableService.evStart:
+ if recordings == 1:
+ self.setVoltage_PWM()
+
+ def leaveStandby(self):
+ NavigationInstance.instance.record_event.remove(self.getRecordEvent)
+ recordings = NavigationInstance.instance.getRecordings()
+ if not recordings:
+ self.setVoltage_PWM()
def standbyCounterChanged(self, configElement):
from Screens.Standby import inStandby
inStandby.onClose.append(self.leaveStandby)
- for fanid in range(self.getFanCount()):
- self.setVoltage(fanid, 0)
- self.setPWM(fanid, 0)
+ recordings = NavigationInstance.instance.getRecordings()
+ NavigationInstance.instance.record_event.append(self.getRecordEvent)
+ if not recordings:
+ self.setVoltage_PWM_Standby()
def createConfig(self):
def setVlt(fancontrol, fanid, configElement):
@@ -35,12 +62,14 @@ def setPWM(fancontrol, fanid, configElement):
config.fans = ConfigSubList()
for fanid in range(self.getFanCount()):
fan = ConfigSubsection()
- fan.vlt = ConfigSlider(default = 16, increment = 5, limits = (0, 255))
+ fan.vlt = ConfigSlider(default = 15, increment = 5, limits = (0, 255))
fan.pwm = ConfigSlider(default = 0, increment = 5, limits = (0, 255))
+ fan.vlt_standby = ConfigSlider(default = 5, increment = 5, limits = (0, 255))
+ fan.pwm_standby = ConfigSlider(default = 0, increment = 5, limits = (0, 255))
fan.vlt.addNotifier(boundFunction(setVlt, self, fanid))
fan.pwm.addNotifier(boundFunction(setPWM, self, fanid))
config.fans.append(fan)
-
+
def getConfig(self, fanid):
return config.fans[fanid]
@@ -85,4 +114,4 @@ def setPWM(self, fanid, value):
f.write("%x" % value)
f.close()
-fancontrol = FanControl()
+fancontrol = FanControl()
View
12 lib/python/Components/Harddisk.py
@@ -166,7 +166,7 @@ def unmount(self):
lines = mounts.readlines()
mounts.close()
- cmd = "/bin/umount"
+ cmd = "umount"
for line in lines:
parts = line.strip().split(" ")
@@ -177,12 +177,12 @@ def unmount(self):
return (res >> 8)
def createPartition(self):
- cmd = 'printf "0,\n;\n;\n;\ny\n" | /sbin/sfdisk -f ' + self.disk_path
+ cmd = 'printf "0,\n;\n;\n;\ny\n" | sfdisk -f ' + self.disk_path
res = system(cmd)
return (res >> 8)
def mkfs(self):
- cmd = "/sbin/mkfs.ext3 "
+ cmd = "mkfs.ext3 "
size = self.diskSize()
if size > 2 * 1024:
cmd += "-T largefile -N %d " % (size * 32)
@@ -205,7 +205,7 @@ def mount(self):
for line in lines:
parts = line.strip().split(" ")
if path.realpath(parts[0]) == self.partitionPath("1"):
- cmd = "/bin/mount -t ext3 " + parts[0]
+ cmd = "mount -t ext3 " + parts[0]
res = system(cmd)
return (res >> 8)
@@ -230,7 +230,7 @@ def createMovieFolder(self):
def fsck(self):
# We autocorrect any failures
# TODO: we could check if the fs is actually ext3
- cmd = "/sbin/fsck.ext3 -f -p " + self.partitionPath("1")
+ cmd = "fsck.ext3 -f -p " + self.partitionPath("1")
res = system(cmd)
return (res >> 8)
@@ -238,7 +238,7 @@ def killPartition(self, n):
part = self.partitionPath(n)
if access(part, 0):
- cmd = '/bin/dd bs=512 count=3 if=/dev/zero of=' + part
+ cmd = 'dd bs=512 count=3 if=/dev/zero of=' + part
res = system(cmd)
else:
res = 0
View
6 lib/python/Components/Network.py
@@ -14,7 +14,7 @@ def __init__(self):
self.NetworkState = 0
self.DnsState = 0
self.nameservers = []
- self.ethtool_bin = "/usr/sbin/ethtool"
+ self.ethtool_bin = "ethtool"
self.container = eConsoleAppContainer()
self.Console = Console()
self.LinkConsole = Console()
@@ -580,11 +580,11 @@ def detectWlanModule(self):
self.wlanmodule = 'madwifi'
if os_path.exists(rt73_dir):
rtfiles = listdir(rt73_dir)
- if len(rtfiles) == 2:
+ if len(rtfiles) == 2 or len(rtfiles) == 5:
self.wlanmodule = 'ralink'
if os_path.exists(zd1211b_dir):
zdfiles = listdir(zd1211b_dir)
- if len(zdfiles) == 1:
+ if len(zdfiles) == 1 or len(zdfiles) == 5:
self.wlanmodule = 'zydas'
return self.wlanmodule
View
89 lib/python/Components/NimManager.py
@@ -1,4 +1,5 @@
from Tools.HardwareInfo import HardwareInfo
+from Tools.BoundFunction import boundFunction
from config import config, ConfigSubsection, ConfigSelection, ConfigFloat, \
ConfigSatlist, ConfigYesNo, ConfigInteger, ConfigSubList, ConfigNothing, \
@@ -13,6 +14,7 @@
from time import localtime, mktime
from datetime import datetime
+from Tools.BoundFunction import boundFunction
def getConfigSatlist(orbpos, satlist):
default_orbpos = None
@@ -444,7 +446,7 @@ def __init__(self, nimmgr):
self.update()
class NIM(object):
- def __init__(self, slot, type, description, has_outputs = True, internally_connectable = None):
+ def __init__(self, slot, type, description, has_outputs = True, internally_connectable = None, multi_type = {}):
self.slot = slot
if type not in ("DVB-S", "DVB-C", "DVB-T", "DVB-S2", None):
@@ -455,6 +457,7 @@ def __init__(self, slot, type, description, has_outputs = True, internally_conne
self.description = description
self.has_outputs = has_outputs
self.internally_connectable = internally_connectable
+ self.multi_type = multi_type
def isCompatible(self, what):
compatible = {
@@ -466,6 +469,9 @@ def isCompatible(self, what):
}
return what in compatible[self.type]
+ def getType(self):
+ return self.type
+
def connectableTo(self):
connectable = {
"DVB-S": ("DVB-S", "DVB-S2"),
@@ -491,6 +497,13 @@ def hasOutputs(self):
def internallyConnectableTo(self):
return self.internally_connectable
+
+ def isMultiType(self):
+ return (len(self.multi_type) > 0)
+
+ # returns dict {<slotid>: <type>}
+ def getMultiTypeList(self):
+ return self.multi_type
slot_id = property(getSlotID)
@@ -636,7 +649,15 @@ def enumerateNIMs(self):
entries[current_slot]["has_outputs"] = (input == "yes")
elif line.strip().startswith("Internally_Connectable:"):
input = int(line.strip()[len("Internally_Connectable:") + 1:])
- entries[current_slot]["internally_connectable"] = input
+ entries[current_slot]["internally_connectable"] = input
+ elif line.strip().startswith("Mode"):
+ # "Mode 0: DVB-T" -> ["Mode 0", " DVB-T"]
+ split = line.strip().split(":")
+ # "Mode 0" -> ["Mode, "0"]
+ split2 = split[0].split(" ")
+ modes = entries[current_slot].get("multi_type", {})
+ modes[split2[1]] = split[1].strip()
+ entries[current_slot]["multi_type"] = modes
elif line.strip().startswith("empty"):
entries[current_slot]["type"] = None
entries[current_slot]["name"] = _("N/A")
@@ -650,12 +671,17 @@ def enumerateNIMs(self):
entry["has_outputs"] = True
if not (entry.has_key("internally_connectable")):
entry["internally_connectable"] = None
- self.nim_slots.append(NIM(slot = id, description = entry["name"], type = entry["type"], has_outputs = entry["has_outputs"], internally_connectable = entry["internally_connectable"]))
+ if not (entry.has_key("multi_type")):
+ entry["multi_type"] = {}
+ self.nim_slots.append(NIM(slot = id, description = entry["name"], type = entry["type"], has_outputs = entry["has_outputs"], internally_connectable = entry["internally_connectable"], multi_type = entry["multi_type"]))
def hasNimType(self, chktype):
for slot in self.nim_slots:
if slot.isCompatible(chktype):
return True
+ for type in slot.getMultiTypeList().values():
+ if chktype == type:
+ return True
return False
def getNimType(self, slotid):
@@ -663,6 +689,9 @@ def getNimType(self, slotid):
def getNimDescription(self, slotid):
return self.nim_slots[slotid].friendly_full_description
+
+ def getNimName(self, slotid):
+ return self.nim_slots[slotid].description
def getNimListOfType(self, type, exception = -1):
# returns a list of indexes for NIMs compatible to the given type, except for 'exception'
@@ -938,12 +967,18 @@ def InitSecParams():
# the configElement should be only visible when diseqc 1.2 is disabled
def InitNimManager(nimmgr):
- InitSecParams()
hw = HardwareInfo()
+ addNimConfig = False
+ try:
+ config.Nims
+ except:
+ addNimConfig = True
- config.Nims = ConfigSubList()
- for x in range(len(nimmgr.nim_slots)):
- config.Nims.append(ConfigSubsection())
+ if addNimConfig:
+ InitSecParams()
+ config.Nims = ConfigSubList()
+ for x in range(len(nimmgr.nim_slots)):
+ config.Nims.append(ConfigSubsection())
lnb_choices = {
"universal_lnb": _("Universal LNB"),
@@ -1218,11 +1253,49 @@ def toneAmplitudeChanged(configElement):
slot_id = configElement.slot_id
if nimmgr.nim_slots[slot_id].description == 'Alps BSBE2':
open("/proc/stb/frontend/%d/tone_amplitude" %(fe_id), "w").write(configElement.value)
-
+
+ def tunerTypeChanged(nimmgr, configElement):
+ fe_id = configElement.fe_id
+ print "tunerTypeChanged feid %d to mode %s" % (fe_id, configElement.value)
+ try:
+ oldvalue = open("/sys/module/dvb_core/parameters/dvb_shutdown_timeout", "r").readline()
+ open("/sys/module/dvb_core/parameters/dvb_shutdown_timeout", "w").write("0")
+ except:
+ print "[info] no /sys/module/dvb_core/parameters/dvb_shutdown_timeout available"
+ frontend = eDVBResourceManager.getInstance().allocateRawChannel(fe_id).getFrontend()
+ frontend.closeFrontend()
+ open("/proc/stb/frontend/%d/mode" % (fe_id), "w").write(configElement.value)
+ frontend.reopenFrontend()
+ try:
+ open("/sys/module/dvb_core/parameters/dvb_shutdown_timeout", "w").write(oldvalue)
+ except:
+ print "[info] no /sys/module/dvb_core/parameters/dvb_shutdown_timeout available"
+ nimmgr.enumerateNIMs()
+
+ empty_slots = 0
+ for slot in nimmgr.nim_slots:
+ x = slot.slot
+ nim = config.Nims[x]
+ addMultiType = False
+ try:
+ nim.multiType
+ except:
+ addMultiType = True
+ if slot.isMultiType() and addMultiType:
+ typeList = []
+ for id in slot.getMultiTypeList().keys():
+ type = slot.getMultiTypeList()[id]
+ typeList.append((id, type))
+ nim.multiType = ConfigSelection(typeList, "0")
+
+ nim.multiType.fe_id = x - empty_slots
+ nim.multiType.addNotifier(boundFunction(tunerTypeChanged, nimmgr))
+
empty_slots = 0
for slot in nimmgr.nim_slots:
x = slot.slot
nim = config.Nims[x]
+
if slot.isCompatible("DVB-S"):
nim.toneAmplitude = ConfigSelection([("9", "600mV"), ("8", "700mV"), ("7", "800mV"), ("6", "900mV"), ("5", "1100mV")], "7")
nim.toneAmplitude.fe_id = x - empty_slots
View
4 lib/python/Components/Renderer/Listbox.py
@@ -77,6 +77,10 @@ def setSelectionEnabled(self, enabled):
selection_enabled = property(lambda self: self.__selection_enabled, setSelectionEnabled)
def changed(self, what):
+ if hasattr(self.source, "selectionEnabled"):
+ self.selection_enabled = self.source.selectionEnabled
+ if len(what) > 1 and isinstance(what[1], str) and what[1] == "style":
+ return
self.content = self.source.content
def entry_changed(self, index):
View
5 lib/python/Components/Sources/List.py
@@ -91,8 +91,9 @@ def getStyle(self):
return self.__style
def setStyle(self, style):
- self.__style = style
- self.changed((self.CHANGED_SPECIFIC, "style"))
+ if self.__style != style:
+ self.__style = style
+ self.changed((self.CHANGED_SPECIFIC, "style"))
style = property(getStyle, setStyle)
View
17 lib/python/Components/Task.py
@@ -16,6 +16,7 @@ def __init__(self, name):
self.end = 100
self.__progress = 0
self.weightScale = 1
+ self.afterEvent = None
self.state_changed = CList()
@@ -370,12 +371,20 @@ def getErrorMessage(self, task):
class ToolExistsPrecondition(Condition):
def check(self, task):
import os
+
if task.cmd[0]=='/':
- realpath = task.cmd
+ self.realpath = task.cmd
+ print "[Task.py][ToolExistsPrecondition] WARNING: usage of absolute paths for tasks should be avoided!"
+ return os.access(self.realpath, os.X_OK)
else:
- realpath = task.cwd + '/' + task.cmd
- self.realpath = realpath
- return os.access(realpath, os.X_OK)
+ self.realpath = task.cmd
+ path = os.environ.get('PATH', '').split(os.pathsep)
+ path.append(task.cwd + '/')
+ absolutes = filter(lambda file: os.access(file, os.X_OK), map(lambda directory, file = task.cmd: os.path.join(directory, file), path))
+ if len(absolutes) > 0:
+ self.realpath = task.cmd[0]
+ return True
+ return False
def getErrorMessage(self, task):
return _("A required tool (%s) was not found.") % (self.realpath)
View
1  lib/python/Components/TimerList.py
@@ -40,7 +40,6 @@ def buildTimerEntry(self, timer, processed):
else:
text = repeatedtext + ((" %s ... %s (%d " + _("mins") + ")") % (begin[1], FuzzyTime(timer.end)[1], (timer.end - timer.begin) / 60))
res.append((eListboxPythonMultiContent.TYPE_TEXT, 150, 25, width-150, 20, 1, RT_HALIGN_RIGHT|RT_VALIGN_TOP, text))
-
icon = None
if not processed:
if timer.state == TimerEntry.StateWaiting:
View
102 lib/python/Plugins/Extensions/DVDBurn/DVDProject.py
@@ -1,5 +1,7 @@
from Tools.Directories import fileExists
from Components.config import config, ConfigSubsection, ConfigInteger, ConfigText, ConfigSelection, getConfigListEntry, ConfigSequence, ConfigSubList
+import DVDTitle
+import xml.dom.minidom
class ConfigColor(ConfigSequence):
def __init__(self, default = [128,128,128]):
@@ -10,7 +12,10 @@ def __init__(self):
ConfigText.__init__(self, default = "", fixed_size = True, visible_width = False)
def getMulti(self, selected):
- filename = (self.text.rstrip("/").rsplit("/",1))[1].encode("utf-8")[:40] + " "
+ if self.text == "":
+ return ("mtext"[1-selected:], "", 0)
+ cut_len = min(len(self.text),40)
+ filename = (self.text.rstrip("/").rsplit("/",1))[1].encode("utf-8")[:cut_len] + " "
if self.allmarked:
mark = range(0, len(filename))
else:
@@ -34,10 +39,11 @@ def __init__(self):
self.settings.vmgm = ConfigFilename()
self.filekeys = ["vmgm", "isopath", "menutemplate"]
self.menutemplate = MenuTemplate()
+ self.error = ""
+ self.session = None
def addService(self, service):
- import DVDTitle
- title = DVDTitle.DVDTitle()
+ title = DVDTitle.DVDTitle(self)
title.addService(service)
self.titles.append(title)
return title
@@ -100,47 +106,78 @@ def load(self, filename):
return ret
def loadProject(self, filename):
- import xml.dom.minidom
- try:
+ #try:
if not fileExists(filename):
self.error = "xml file not found!"
- raise AttributeError
- else:
- self.error = ""
+ #raise AttributeError
file = open(filename, "r")
data = file.read().decode("utf-8").replace('&',"&amp;").encode("ascii",'xmlcharrefreplace')
file.close()
projectfiledom = xml.dom.minidom.parseString(data)
- for project in projectfiledom.childNodes[0].childNodes:
- if project.nodeType == xml.dom.minidom.Element.nodeType:
- if project.tagName == 'settings':
- i = 0
- if project.attributes.length < len(self.settings.dict())-1:
- self.error = "project attributes missing"
- raise AttributeError
- while i < project.attributes.length:
- item = project.attributes.item(i)
- key = item.name.encode("utf-8")
- try:
- val = eval(item.nodeValue)
- except (NameError, SyntaxError):
- val = item.nodeValue.encode("utf-8")
- try:
- self.settings.dict()[key].setValue(val)
- except (KeyError):
- self.error = "unknown attribute '%s'" % (key)
- raise AttributeError
- i += 1
+ for node in projectfiledom.childNodes[0].childNodes:
+ print "node:", node
+ if node.nodeType == xml.dom.minidom.Element.nodeType:
+ if node.tagName == 'settings':
+ self.xmlAttributesToConfig(node, self.settings)
+ elif node.tagName == 'titles':
+ self.xmlGetTitleNodeRecursive(node)
+
for key in self.filekeys:
val = self.settings.dict()[key].getValue()
if not fileExists(val):
self.error += "\n%s '%s' not found" % (key, val)
- if len(self.error):
- raise AttributeError
+ #except AttributeError:
+ #print "loadProject AttributeError", self.error
+ #self.error += (" in project '%s'") % (filename)
+ #return False
+ return True
+
+ def xmlAttributesToConfig(self, node, config):
+ try:
+ i = 0
+ #if node.attributes.length < len(config.dict())-1:
+ #self.error = "project attributes missing"
+ #raise AttributeError
+ while i < node.attributes.length:
+ item = node.attributes.item(i)
+ key = item.name.encode("utf-8")
+ try:
+ val = eval(item.nodeValue)
+ except (NameError, SyntaxError):
+ val = item.nodeValue.encode("utf-8")
+ try:
+ print "config[%s].setValue(%s)" % (key, val)
+ config.dict()[key].setValue(val)
+ except (KeyError):
+ self.error = "unknown attribute '%s'" % (key)
+ print "KeyError", self.error
+ raise AttributeError
+ i += 1
except AttributeError:
- self.error += (" in project '%s'") % (filename)
+ self.error += (" XML attribute error '%s'") % node.toxml()
return False
- return True
+
+ def xmlGetTitleNodeRecursive(self, node, title_idx = -1):
+ print "[xmlGetTitleNodeRecursive]", title_idx, node
+ print node.childNodes
+ for subnode in node.childNodes:
+ print "xmlGetTitleNodeRecursive subnode:", subnode
+ if subnode.nodeType == xml.dom.minidom.Element.nodeType:
+ if subnode.tagName == 'title':
+ title_idx += 1
+ title = DVDTitle.DVDTitle(self)
+ self.titles.append(title)
+ self.xmlGetTitleNodeRecursive(subnode, title_idx)
+ if subnode.tagName == 'path':
+ print "path:", subnode.firstChild.data
+ filename = subnode.firstChild.data
+ self.titles[title_idx].addFile(filename.encode("utf-8"))
+ if subnode.tagName == 'properties':
+ self.xmlAttributesToConfig(node, self.titles[title_idx].properties)
+ if subnode.tagName == 'audiotracks':
+ self.xmlGetTitleNodeRecursive(subnode, title_idx)
+ if subnode.tagName == 'audiotrack':
+ print "audiotrack...", subnode.toxml()
def getSize(self):
totalsize = 0
@@ -187,6 +224,7 @@ def __init__(self):
self.filekeys = ["menubg", "menuaudio", "fontface_headline", "fontface_title", "fontface_subtitle"]
from TitleProperties import languageChoices
self.settings.menulang = ConfigSelection(choices = languageChoices.choices, default=languageChoices.choices[1][0])
+ self.error = ""
def loadTemplate(self, filename):
ret = DVDProject.loadProject(self, filename)
View
28 lib/python/Plugins/Extensions/DVDBurn/DVDTitle.py
@@ -1,4 +1,5 @@
from Components.config import config, ConfigSubsection, ConfigSubList, ConfigInteger, ConfigText, ConfigSelection, getConfigListEntry, ConfigSequence, ConfigYesNo
+import TitleCutter
class ConfigFixedText(ConfigText):
def __init__(self, text, visible_width=60):
@@ -7,17 +8,17 @@ def handleKey(self, key):
pass
class DVDTitle:
- def __init__(self):
+ def __init__(self, project):
self.properties = ConfigSubsection()
self.properties.menutitle = ConfigText(fixed_size = False, visible_width = 80)
self.properties.menusubtitle = ConfigText(fixed_size = False, visible_width = 80)
- self.DVBname = _("Title")
- self.DVBdescr = _("Description")
- self.DVBchannel = _("Channel")
self.properties.aspect = ConfigSelection(choices = [("4:3", _("4:3")), ("16:9", _("16:9"))])
self.properties.widescreen = ConfigSelection(choices = [("nopanscan", "nopanscan"), ("noletterbox", "noletterbox")])
self.properties.autochapter = ConfigInteger(default = 0, limits = (0, 60))
self.properties.audiotracks = ConfigSubList()
+ self.DVBname = _("Title")
+ self.DVBdescr = _("Description")
+ self.DVBchannel = _("Channel")
self.cuesheet = [ ]
self.source = None
self.filesize = 0
@@ -27,6 +28,8 @@ def __init__(self):
self.chaptermarks = [ ]
self.timeCreate = None
self.VideoType = -1
+ self.project = project
+ self.length = 0
def addService(self, service):
from os import path
@@ -36,7 +39,7 @@ def addService(self, service):
self.source = service
serviceHandler = eServiceCenter.getInstance()
info = serviceHandler.info(service)
- sDescr = info and " " + info.getInfoString(service, iServiceInformation.sDescription) or ""
+ sDescr = info and info.getInfoString(service, iServiceInformation.sDescription) or ""
self.DVBdescr = sDescr
sTimeCreate = info.getInfo(service, iServiceInformation.sTimeCreate)
if sTimeCreate > 1:
@@ -49,9 +52,20 @@ def addService(self, service):
self.filesize = path.getsize(self.inputfile)
self.estimatedDiskspace = self.filesize
self.length = info.getLength(service)
+
+ def addFile(self, filename):
+ from enigma import eServiceReference
+ ref = eServiceReference(1, 0, filename)
+ self.addService(ref)
+ self.project.session.openWithCallback(self.titleEditDone, TitleCutter.CutlistReader, self)
+
+ def titleEditDone(self, cutlist):
+ self.initDVDmenuText(len(self.project.titles))
+ self.cuesheet = cutlist
+ self.produceFinalCuesheet()
- def initDVDmenuText(self, project, track):
- s = project.menutemplate.settings
+ def initDVDmenuText(self, track):
+ s = self.project.menutemplate.settings
self.properties.menutitle.setValue(self.formatDVDmenuText(s.titleformat.getValue(), track))
self.properties.menusubtitle.setValue(self.formatDVDmenuText(s.subtitleformat.getValue(), track))
View
36 lib/python/Plugins/Extensions/DVDBurn/Process.py
@@ -5,7 +5,7 @@
class png2yuvTask(Task):
def __init__(self, job, inputfile, outputfile):
Task.__init__(self, job, "Creating menu video")
- self.setTool("/usr/bin/png2yuv")
+ self.setTool("png2yuv")
self.args += ["-n1", "-Ip", "-f25", "-j", inputfile]
self.dumpFile = outputfile
self.weighting = 15
@@ -21,7 +21,7 @@ def processStderr(self, data):
class mpeg2encTask(Task):
def __init__(self, job, inputfile, outputfile):
Task.__init__(self, job, "Encoding menu video")
- self.setTool("/usr/bin/mpeg2enc")
+ self.setTool("mpeg2enc")
self.args += ["-f8", "-np", "-a2", "-o", outputfile]
self.inputFile = inputfile
self.weighting = 25
@@ -36,7 +36,7 @@ def processOutputLine(self, line):
class spumuxTask(Task):
def __init__(self, job, xmlfile, inputfile, outputfile):
Task.__init__(self, job, "Muxing buttons into menu")
- self.setTool("/usr/bin/spumux")
+ self.setTool("spumux")
self.args += [xmlfile]
self.inputFile = inputfile
self.dumpFile = outputfile
@@ -54,7 +54,7 @@ def processStderr(self, data):
class MakeFifoNode(Task):
def __init__(self, job, number):
Task.__init__(self, job, "Make FIFO nodes")
- self.setTool("/bin/mknod")
+ self.setTool("mknod")
nodename = self.job.workspace + "/dvd_title_%d" % number + ".mpg"
self.args += [nodename, "p"]
self.weighting = 10
@@ -62,14 +62,14 @@ def __init__(self, job, number):
class LinkTS(Task):
def __init__(self, job, sourcefile, link_name):
Task.__init__(self, job, "Creating symlink for source titles")
- self.setTool("/bin/ln")
+ self.setTool("ln")
self.args += ["-s", sourcefile, link_name]
self.weighting = 10
class CopyMeta(Task):
def __init__(self, job, sourcefile):
Task.__init__(self, job, "Copy title meta files")
- self.setTool("/bin/cp")
+ self.setTool("cp")
from os import listdir
path, filename = sourcefile.rstrip("/").rsplit("/",1)
tsfiles = listdir(path)
@@ -84,7 +84,7 @@ def __init__(self, job, inputfile):
Task.__init__(self, job, "Demux video into ES")
title = job.project.titles[job.i]
self.global_preconditions.append(DiskspacePrecondition(title.estimatedDiskspace))
- self.setTool("/usr/bin/projectx")
+ self.setTool("projectx")
self.args += [inputfile, "-demux", "-out", self.job.workspace ]
self.end = 300
self.prog_state = 0
@@ -194,7 +194,7 @@ def __init__(self, job, outputfile, inputfiles=None, demux_task=None, weighting
self.weighting = weighting
self.demux_task = demux_task
self.postconditions.append(MplexTaskPostcondition())
- self.setTool("/usr/bin/mplex")
+ self.setTool("mplex")
self.args += ["-f8", "-o", outputfile, "-v1"]
if inputfiles:
self.args += inputfiles
@@ -222,7 +222,7 @@ class RemoveESFiles(Task):
def __init__(self, job, demux_task):
Task.__init__(self, job, "Remove temp. files")
self.demux_task = demux_task
- self.setTool("/bin/rm")
+ self.setTool("rm")
self.weighting = 10
def prepare(self):
@@ -234,7 +234,7 @@ class DVDAuthorTask(Task):
def __init__(self, job):
Task.__init__(self, job, "Authoring DVD")
self.weighting = 20
- self.setTool("/usr/bin/dvdauthor")
+ self.setTool("dvdauthor")
self.CWD = self.job.workspace
self.args += ["-x", self.job.workspace+"/dvdauthor.xml"]
self.menupreview = job.menupreview
@@ -255,7 +255,7 @@ def processOutputLine(self, line):
class DVDAuthorFinalTask(Task):
def __init__(self, job):
Task.__init__(self, job, "dvdauthor finalize")
- self.setTool("/usr/bin/dvdauthor")
+ self.setTool("dvdauthor")
self.args += ["-T", "-o", self.job.workspace + "/dvd"]
class WaitForResidentTasks(Task):
@@ -292,7 +292,7 @@ def getErrorMessage(self, task):
class BurnTask(Task):
ERROR_NOTWRITEABLE, ERROR_LOAD, ERROR_SIZE, ERROR_WRITE_FAILED, ERROR_DVDROM, ERROR_ISOFS, ERROR_FILETOOLARGE, ERROR_ISOTOOLARGE, ERROR_MINUSRWBUG, ERROR_UNKNOWN = range(10)
- def __init__(self, job, extra_args=[], tool="/bin/growisofs"):
+ def __init__(self, job, extra_args=[], tool="growisofs"):
Task.__init__(self, job, job.name)
self.weighting = 500
self.end = 120 # 100 for writing, 10 for buffer flush, 10 for closing disc
@@ -357,7 +357,7 @@ def setTool(self, tool):
class RemoveDVDFolder(Task):
def __init__(self, job):
Task.__init__(self, job, "Remove temp. files")
- self.setTool("/bin/rm")
+ self.setTool("rm")
self.args += ["-rf", self.job.workspace]
self.weighting = 10
@@ -882,13 +882,13 @@ def conduct(self):
volName = self.project.settings.name.getValue()
if output == "dvd":
self.name = _("Burn DVD")
- tool = "/bin/growisofs"
+ tool = "growisofs"
burnargs = [ "-Z", "/dev/" + harddiskmanager.getCD(), "-dvd-compat" ]
if self.project.size/(1024*1024) > self.project.MAX_SL:
burnargs += [ "-use-the-force-luke=4gms", "-speed=1", "-R" ]
elif output == "iso":
self.name = _("Create DVD-ISO")
- tool = "/usr/bin/mkisofs"
+ tool = "genisoimage"
isopathfile = getISOfilename(self.project.settings.isopath.getValue(), volName)
burnargs = [ "-o", isopathfile ]
burnargs += [ "-dvd-video", "-publisher", "Dreambox", "-V", volName, self.workspace + "/dvd" ]
@@ -920,14 +920,14 @@ def conduct(self):
output = self.project.settings.output.getValue()
volName = self.project.settings.name.getValue()
- tool = "/bin/growisofs"
+ tool = "growisofs"
if output == "dvd":
self.name = _("Burn DVD")
burnargs = [ "-Z", "/dev/" + harddiskmanager.getCD(), "-dvd-compat" ]
if self.project.size/(1024*1024) > self.project.MAX_SL:
burnargs += [ "-use-the-force-luke=4gms", "-speed=1", "-R" ]
elif output == "iso":
- tool = "/usr/bin/mkisofs"
+ tool = "genisoimage"
self.name = _("Create DVD-ISO")
isopathfile = getISOfilename(self.project.settings.isopath.getValue(), volName)
burnargs = [ "-o", isopathfile ]
@@ -959,5 +959,5 @@ def __init__(self, project, imagepath):
if getSize(imagepath)/(1024*1024) > self.project.MAX_SL:
burnargs += [ "-use-the-force-luke=4gms", "-speed=1", "-R" ]
burnargs += [ "-dvd-video", "-publisher", "Dreambox", "-V", volName, imagepath ]
- tool = "/bin/growisofs"
+ tool = "growisofs"
BurnTask(self, burnargs, tool)
View
23 lib/python/Plugins/Extensions/DVDBurn/ProjectSettings.py
@@ -92,10 +92,10 @@ class ProjectSettings(Screen,ConfigListScreen):
<ePixmap pixmap="skin_default/buttons/green.png" position="140,0" size="140,40" alphatest="on" />
<ePixmap pixmap="skin_default/buttons/yellow.png" position="280,0" size="140,40" alphatest="on" />
<ePixmap pixmap="skin_default/buttons/blue.png" position="420,0" size="140,40" alphatest="on" />
- <widget source="key_red" render="Label" position="0,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#9f1313" transparent="1" />
- <widget source="key_green" render="Label" position="140,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#1f771f" transparent="1" />
- <widget source="key_yellow" render="Label" position="280,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#a08500" transparent="1" />
- <widget source="key_blue" render="Label" position="420,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#18188b" transparent="1" />
+ <widget source="key_red" render="Label" position="0,0" zPosition="1" size="140,40" font="Regular;19" halign="center" valign="center" backgroundColor="#9f1313" transparent="1" />
+ <widget source="key_green" render="Label" position="140,0" zPosition="1" size="140,40" font="Regular;19" halign="center" valign="center" backgroundColor="#1f771f" transparent="1" />
+ <widget source="key_yellow" render="Label" position="280,0" zPosition="1" size="140,40" font="Regular;19" halign="center" valign="center" backgroundColor="#a08500" transparent="1" />
+ <widget source="key_blue" render="Label" position="420,0" zPosition="1" size="140,40" font="Regular;19" halign="center" valign="center" backgroundColor="#18188b" transparent="1" />
<widget name="config" position="5,50" size="550,276" scrollbarMode="showOnDemand" />
<ePixmap pixmap="skin_default/div-h.png" position="0,350" zPosition="1" size="560,2" />
<widget source="info" render="Label" position="10,360" size="550,80" font="Regular;18" halign="center" valign="center" />
@@ -233,10 +233,19 @@ def FileBrowserClosed(self, path, scope, configRef):
else:
self.session.open(MessageBox,self.project.error,MessageBox.TYPE_ERROR)
elif scope == "project":
- if self.project.loadProject(path):
- self.initConfigList()
+ self.path = path
+ print "len(self.titles)", len(self.project.titles)
+ if len(self.project.titles):
+ self.session.openWithCallback(self.askLoadCB, MessageBox,text = _("Your current collection will get lost!") + "\n" + _("Do you want to restore your settings?"), type = MessageBox.TYPE_YESNO)
else:
- self.session.open(MessageBox,self.project.error,MessageBox.TYPE_ERROR)
+ self.askLoadCB(True)
elif scope:
configRef.setValue(path)
self.initConfigList()
+
+ def askLoadCB(self, answer):
+ if answer is not None and answer:
+ if self.project.loadProject(self.path):
+ self.initConfigList()
+ else:
+ self.session.open(MessageBox,self.project.error,MessageBox.TYPE_ERROR)
View
22 lib/python/Plugins/Extensions/DVDBurn/TitleCutter.py
@@ -52,13 +52,35 @@ def checkAndGrabThumb(self):
CutListEditor.grabFrame(self)
def exit(self):
+ if self.t.VideoType == -1:
+ self.getPMTInfo()
self.checkAndGrabThumb()
self.session.nav.stopService()
self.close(self.cut_list[:])
class CutlistReader(TitleCutter):
+ skin = """
+ <screen position="0,0" size="720,576">
+ <eLabel position="0,0" size="720,576" zPosition="1" backgroundColor="#000000" />
+ <widget name="Video" position="0,0" size="100,75" />
+ <widget name="SeekState" position="0,0" />
+ <widget source="cutlist" position="0,0" render="Listbox" >
+ <convert type="TemplatedMultiContent">
+ {"template": [
+ MultiContentEntryText(text = 1),
+ MultiContentEntryText(text = 2)
+ ],
+ "fonts": [gFont("Regular", 18)],
+ "itemHeight": 20
+ }
+ </convert>
+ </widget>
+ <widget name="Timeline" position="0,0" />
+ </screen>"""
+
def __init__(self, session, t):
TitleCutter.__init__(self, session, t)
+ self.skin = CutlistReader.skin
def getPMTInfo(self):
TitleCutter.getPMTInfo(self)
View
115 lib/python/Plugins/Extensions/DVDBurn/TitleList.py
@@ -11,38 +11,46 @@
from Components.Sources.StaticText import StaticText
from Components.Sources.Progress import Progress
from Components.MultiContent import MultiContentEntryText
+from Components.Label import MultiColorLabel
from enigma import gFont, RT_HALIGN_LEFT, RT_HALIGN_RIGHT
from Tools.Directories import resolveFilename, SCOPE_PLUGINS
class TitleList(Screen, HelpableScreen):
skin = """
- <screen name="TitleList" position="center,center" size="560,445" title="DVD Tool" >
+ <screen name="TitleList" position="center,center" size="560,470" title="DVD Tool" >
<ePixmap pixmap="skin_default/buttons/red.png" position="0,0" size="140,40" alphatest="on" />
<ePixmap pixmap="skin_default/buttons/green.png" position="140,0" size="140,40" alphatest="on" />
<ePixmap pixmap="skin_default/buttons/yellow.png" position="280,0" size="140,40" alphatest="on" />
<ePixmap pixmap="skin_default/buttons/blue.png" position="420,0" size="140,40" alphatest="on" />
- <widget source="key_red" render="Label" position="0,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#9f1313" transparent="1" />
- <widget source="key_green" render="Label" position="140,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#1f771f" transparent="1" />
- <widget source="key_yellow" render="Label" position="280,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#a08500" transparent="1" />
- <widget source="key_blue" render="Label" position="420,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#18188b" transparent="1" />
+ <widget source="key_red" render="Label" position="0,0" zPosition="1" size="140,40" font="Regular;19" halign="center" valign="center" backgroundColor="#9f1313" transparent="1" />
+ <widget source="key_green" render="Label" position="140,0" zPosition="1" size="140,40" font="Regular;19" halign="center" valign="center" backgroundColor="#1f771f" transparent="1" />
+ <widget source="key_yellow" render="Label" position="280,0" zPosition="1" size="140,40" font="Regular;19" halign="center" valign="center" backgroundColor="#a08500" transparent="1" />
+ <widget source="key_blue" render="Label" position="420,0" zPosition="1" size="140,40" font="Regular;19" halign="center" valign="center" backgroundColor="#18188b" transparent="1" />
<widget source="title_label" render="Label" position="10,48" size="540,38" font="Regular;18" transparent="1" />
- <widget source="error_label" render="Label" position="10,48" size="540,395" zPosition="3" font="Regular;20" transparent="1" />
- <widget source="titles" render="Listbox" scrollbarMode="showOnDemand" position="10,86" size="540,312" zPosition="3" transparent="1" >
+ <widget source="error_label" render="Label" position="10,48" size="540,296" zPosition="3" font="Regular;20" transparent="1" />
+ <widget source="titles" render="Listbox" scrollbarMode="showOnDemand" position="10,86" size="546,296" zPosition="3" transparent="1" >
<convert type="TemplatedMultiContent">
{"template": [
- MultiContentEntryText(pos = (0, 0), size = (420, 20), font = 0, flags = RT_HALIGN_LEFT, text = 1), # index 1 Title,
- MultiContentEntryText(pos = (0, 20), size = (328, 17), font = 1, flags = RT_HALIGN_LEFT, text = 2), # index 2 description,
- MultiContentEntryText(pos = (420, 6), size = (120, 20), font = 1, flags = RT_HALIGN_RIGHT, text = 3), # index 3 begin time,
- MultiContentEntryText(pos = (328, 20), size = (154, 17), font = 1, flags = RT_HALIGN_RIGHT, text = 4), # index 4 channel,
- MultiContentEntryText(pos = (482, 20), size = (58, 20), font = 1, flags = RT_HALIGN_RIGHT, text = 5), # index 4 channel,
+ MultiContentEntryText(pos = (0, 0), size = (360, 20), font = 0, flags = RT_HALIGN_LEFT, text = 1), # index 1 Title,
+ MultiContentEntryText(pos = (0, 20), size = (360, 17), font = 1, flags = RT_HALIGN_LEFT, text = 2), # index 2 description,
+ MultiContentEntryText(pos = (366, 6), size = (152, 20), font = 1, flags = RT_HALIGN_RIGHT, text = 3), # index 3 channel,
+ MultiContentEntryText(pos = (366, 20), size = (102, 17), font = 1, flags = RT_HALIGN_RIGHT, text = 4), # index 4 begin time,
+ MultiContentEntryText(pos = (470, 20), size = (48, 20), font = 1, flags = RT_HALIGN_RIGHT, text = 5), # index 5 duration,
],
"fonts": [gFont("Regular", 20), gFont("Regular", 14)],
"itemHeight": 37
}
</convert>
</widget>
- <widget source="space_bar" render="Progress" position="10,410" size="540,26" borderWidth="1" backgroundColor="#254f7497" />
- <widget source="space_label" render="Label" position="40,414" size="480,22" zPosition="2" font="Regular;18" halign="center" transparent="1" foregroundColor="#000000" />
+ <ePixmap pixmap="skin_default/div-h.png" position="0,390" zPosition="10" size="560,2" />
+ <ePixmap pixmap="skin_default/buttons/key_menu.png" position="10,394" size="35,25" alphatest="on" />
+ <widget source="hint" render="Label" position="50,396" size="540,22" font="Regular;18" halign="left" />
+ <widget name="medium_label" position="10,420" size="540,22" font="Regular;18" halign="left" foregroundColors="#FFFFFF,#FFFF00,#FF0000" />
+ <widget source="space_bar_single" render="Progress" position="10,446" size="270,24" borderWidth="1" zPosition="2" backgroundColor="#254f7497" />
+ <widget source="space_label_single" render="Label" position="10,449" size="270,22" zPosition="3" font="Regular;18" halign="center" transparent="1" foregroundColor="#000000" />
+ <widget source="space_bar_dual" render="Progress" position="10,446" size="540,24" borderWidth="1" backgroundColor="#254f7497" />
+ <widget source="space_label_dual" render="Label" position="10,449" size="540,22" zPosition="2" font="Regular;18" halign="center" transparent="1" foregroundColor="#000000" />
+
</screen>"""
def __init__(self, session, project = None):
@@ -75,17 +83,19 @@ def __init__(self, session, project = None):
self["title_label"] = StaticText()
self["error_label"] = StaticText()
- self["space_label"] = StaticText()
- self["space_bar"] = Progress()
+ self["space_label_single"] = StaticText()
+ self["space_label_dual"] = StaticText()
+ self["hint"] = StaticText(_("Advanced Options"))
+ self["medium_label"] = MultiColorLabel()
+ self["space_bar_single"] = Progress()
+ self["space_bar_dual"] = Progress()
+ self["titles"] = List([])
+ self.previous_size = 0
if project is not None:
self.project = project
else:
self.newProject()
-
- self["titles"] = List([])
- self.updateTitleList()
- self.previous_size = 0
self.onLayoutFinish.append(self.layoutFinished)
def layoutFinished(self):
@@ -107,15 +117,16 @@ def showMenu(self):
j = self.backgroundJob
menu.append(("%s: %s (%d%%)" % (j.getStatustext(), j.name, int(100*j.progress/float(j.end))), self.showBackgroundJob))
menu.append((_("DVD media toolbox"), self.toolbox))
- menu.append((_("Preview menu"), self.previewMenu))
if self.project.settings.output.getValue() == "dvd":
if len(self["titles"].list):
menu.append((_("Burn DVD"), self.burnProject))
elif self.project.settings.output.getValue() == "iso":
menu.append((_("Create DVD-ISO"), self.burnProject))
menu.append((_("Burn existing image to DVD"), self.selectImage))
- menu.append((_("Edit chapters of current title"), self.editTitle))
- menu.append((_("Reset and renumerate title names"), self.resetTitles))
+ if len(self["titles"].list):
+ menu.append((_("Preview menu"), self.previewMenu))
+ menu.append((_("Edit chapters of current title"), self.editTitle))
+ menu.append((_("Reset and renumerate title names"), self.resetTitles))
menu.append((_("Exit"), self.leave))
self.session.openWithCallback(self.menuCallback, ChoiceBox, title="", list=menu)
@@ -149,9 +160,9 @@ class DVDMovieSelection(MovieSelection):
<ePixmap pixmap="skin_default/buttons/red.png" position="0,0" size="140,40" alphatest="on" />
<ePixmap pixmap="skin_default/buttons/green.png" position="140,0" size="140,40" alphatest="on" />
<ePixmap pixmap="skin_default/buttons/yellow.png" position="280,0" size="140,40" alphatest="on" />
- <widget source="key_red" render="Label" position="0,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#9f1313" transparent="1" />
- <widget source="key_green" render="Label" position="140,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#1f771f" transparent="1" />
- <widget source="key_yellow" render="Label" position="280,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#a08500" transparent="1" />
+ <widget source="key_red" render="Label" position="0,0" zPosition="1" size="140,40" font="Regular;19" halign="center" valign="center" backgroundColor="#9f1313" transparent="1" />
+ <widget source="key_green" render="Label" position="140,0" zPosition="1" size="140,40" font="Regular;19" halign="center" valign="center" backgroundColor="#1f771f" transparent="1" />
+ <widget source="key_yellow" render="Label" position="280,0" zPosition="1" size="140,40" font="Regular;19" halign="center" valign="center" backgroundColor="#a08500" transparent="1" />
<widget name="waitingtext" position="0,45" size="560,395" zPosition="4" font="Regular;22" halign="center" valign="center" />
<widget name="list" position="5,40" size="550,375" zPosition="2" scrollbarMode="showOnDemand" />
<widget name="DescriptionBorder" pixmap="skin_default/border_eventinfo.png" position="0,316" zPosition="1" size="560,103" transparent="1" alphatest="on" />
@@ -200,7 +211,7 @@ def movieSelected(self):
self.close(current)
self.session.openWithCallback(self.selectedSource, DVDMovieSelection)
- def selectedSource(self, source):
+ def selectedSource(self, source = None):
if source is None:
return None
if not source.getPath().endswith(".ts"):
@@ -231,7 +242,7 @@ def settings(self):
def settingsCB(self, update=True):
if not update:
return
- self["title_label"].text = _("Table of content for collection") + " \"" + self.project.settings.name.getValue() + "\":"
+ self.updateTitleList()
def loadTemplate(self):
filename = resolveFilename(SCOPE_PLUGINS)+"Extensions/DVDBurn/DreamboxDVD.ddvdp.xml"
@@ -284,9 +295,11 @@ def updateTitleList(self):
if len(list):
self["key_red"].text = _("Remove title")
self["key_yellow"].text = _("Title properties")
+ self["title_label"].text = _("Table of content for collection") + " \"" + self.project.settings.name.getValue() + "\":"
else:
self["key_red"].text = ""
self["key_yellow"].text = ""
+ self["title_label"].text = _("Please add titles to the compilation.")
def updateSize(self):
size = self.project.size/(1024*1024)
@@ -295,20 +308,32 @@ def updateSize(self):
print "updateSize:", size, "MAX_DL:", MAX_DL, "MAX_SL:", MAX_SL
if size > MAX_DL:
percent = 100 * size / float(MAX_DL)
- self["space_label"].text = "%d MB - " % size + _("exceeds dual layer medium!") + " (%.2f%% " % (100-percent) + _("free") + ")"
- self["space_bar"].value = int(percent)
+ self["space_label_dual"].text = "%d MB (%.2f%%)" % (size, percent)
+ self["space_bar_dual"].value = int(percent)
+ self["space_bar_single"].value = 100
+ self["space_label_single"].text = ""
+ self["medium_label"].setText(_("Exceeds dual layer medium!"))
+ self["medium_label"].setForegroundColorNum(2)
if self.previous_size < MAX_DL:
- self.session.open(MessageBox,text = _("exceeds dual layer medium!"), type = MessageBox.TYPE_ERROR)
+ self.session.open(MessageBox,text = _("Exceeds dual layer medium!"), type = MessageBox.TYPE_ERROR)
elif size > MAX_SL:
percent = 100 * size / float(MAX_DL)
- self["space_label"].text = "%d MB " % size + _("of a DUAL layer medium used.") + " (%.2f%% " % (100-percent) + _("free") + ")"
- self["space_bar"].value = int(percent)
+ self["space_label_dual"].text = "%d MB (%.2f%%)" % (size, percent)
+ self["space_bar_dual"].value = int(percent)
+ self["space_bar_single"].value = 100
+ self["space_label_single"].text = ""
+ self["medium_label"].setText(_("Required medium type:") + " " + _("DUAL LAYER DVD") + ", %d MB " % (MAX_DL - size) + _("free"))
+ self["medium_label"].setForegroundColorNum(1)
if self.previous_size < MAX_SL:
- self.session.open(MessageBox,text = _("Your collection exceeds the size of a single layer medium, you will need a blank dual layer DVD!"), type = MessageBox.TYPE_INFO)
+ self.session.open(MessageBox, text = _("Your collection exceeds the size of a single layer medium, you will need a blank dual layer DVD!"), timeout = 10, type = MessageBox.TYPE_INFO)
elif size < MAX_SL:
percent = 100 * size / float(MAX_SL)
- self["space_label"].text = "%d MB " % size + _("of a SINGLE layer medium used.") + " (%.2f%% " % (100-percent) + _("free") + ")"
- self["space_bar"].value = int(percent)
+ self["space_label_single"].text = "%d MB (%.2f%%)" % (size, percent)
+ self["space_bar_single"].value = int(percent)
+ self["space_bar_dual"].value = 0
+ self["space_label_dual"].text = ""
+ self["medium_label"].setText(_("Required medium type:") + " " + _("SINGLE LAYER DVD") + ", %d MB " % (MAX_SL - size) + _("free"))
+ self["medium_label"].setForegroundColorNum(0)
self.previous_size = size
def getCurrentTitle(self):
@@ -326,9 +351,7 @@ def editTitle(self, title = None, editor = True):
def titleEditDone(self, cutlist):
t = self.current_edit_title
- t.initDVDmenuText(self.project,len(self.project.titles))
- t.cuesheet = cutlist
- t.produceFinalCuesheet()
+ t.titleEditDone(cutlist)
if t.VideoType != 0:
self.session.openWithCallback(self.DVDformatCB,MessageBox,text = _("The DVD standard doesn't support H.264 (HDTV) video streams. Do you want to create a Dreambox format data DVD (which will not play in stand-alone DVD players) instead?"), type = MessageBox.TYPE_YESNO)
else:
@@ -338,7 +361,7 @@ def resetTitles(self):
count = 0
for title in self.project.titles:
count += 1
- title.initDVDmenuText(self.project,count)
+ title.initDVDmenuText(count)
self.updateTitleList()
def DVDformatCB(self, answer):
@@ -349,5 +372,13 @@ def DVDformatCB(self, answer):
else:
self.removeTitle(t)
- def leave(self):
- self.close()
+ def leave(self, close = False):
+ if not len(self["titles"].list) or close:
+ self.close()
+ else:
+ self.session.openWithCallback(self.exitCB, MessageBox,text = _("Your current collection will get lost!") + "\n" + _("Do you really want to exit?"), type = MessageBox.TYPE_YESNO)
+
+ def exitCB(self, answer):
+ print "exitCB", answer
+ if answer is not None and answer:
+ self.close()
View
13 lib/python/Plugins/Extensions/DVDBurn/TitleProperties.py
@@ -21,10 +21,12 @@ class TitleProperties(Screen,ConfigListScreen):
<screen name="TitleProperties" position="center,center" size="560,445" title="Properties of current title" >
<ePixmap pixmap="skin_default/buttons/red.png" position="0,0" size="140,40" alphatest="on" />
<ePixmap pixmap="skin_default/buttons/green.png" position="140,0" size="140,40" alphatest="on" />
+ <ePixmap pixmap="skin_default/buttons/yellow.png" position="280,0" size="140,40" alphatest="on" />
<ePixmap pixmap="skin_default/buttons/blue.png" position="420,0" size="140,40" alphatest="on" />
- <widget source="key_red" render="Label" position="0,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#9f1313" transparent="1" />
- <widget source="key_green" render="Label" position="140,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#1f771f" transparent="1" />
- <widget source="key_blue" render="Label" position="420,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#18188b" transparent="1" />
+ <widget source="key_red" render="Label" position="0,0" zPosition="1" size="140,40" font="Regular;19" halign="center" valign="center" backgroundColor="#9f1313" transparent="1" />
+ <widget source="key_green" render="Label" position="140,0" zPosition="1" size="140,40" font="Regular;19" halign="center" valign="center" backgroundColor="#1f771f" transparent="1" />
+ <widget source="key_yellow" render="Label" position="280,0" zPosition="1" size="140,40" font="Regular;19" halign="center" valign="center" backgroundColor="#a08500" transparent="1" />
+ <widget source="key_blue" render="Label" position="420,0" zPosition="1" size="140,40" font="Regular;19" halign="center" valign="center" backgroundColor="#18188b" transparent="1" />
<widget source="serviceinfo" render="Label" position="10,46" size="350,144" font="Regular;18" />
<widget name="thumbnail" position="370,46" size="180,144" alphatest="on" />
<widget name="config" position="10,206" size="540,228" scrollbarMode="showOnDemand" />
@@ -38,7 +40,8 @@ def __init__(self, session, parent, project, title_idx):
self["key_red"] = StaticText(_("Cancel"))
self["key_green"] = StaticText(_("OK"))
- self["key_blue"] = StaticText(_("Edit Title"))
+ self["key_yellow"] = StaticText(_("Edit Title"))
+ self["key_blue"] = StaticText()
self["serviceinfo"] = StaticText()
self["thumbnail"] = Pixmap()
@@ -57,7 +60,7 @@ def __init__(self, session, parent, project, title_idx):
{
"green": self.exit,
"red": self.cancel,
- "blue": self.editTitle,
+ "yellow": self.editTitle,
"cancel": self.cancel,
"ok": self.ok,
}, -2)
View
2  lib/python/Plugins/Extensions/DVDBurn/plugin.py
@@ -12,6 +12,6 @@ def main_add(session, service, **kwargs):
dvdburn.selectedSource(service)
def Plugins(**kwargs):
- descr = _("Burn to DVD...")
+ descr = _("Burn to DVD")
return [PluginDescriptor(name="DVD Burn", description=descr, where = PluginDescriptor.WHERE_MOVIELIST, fnc=main_add, icon="dvdburn.png"),
PluginDescriptor(name="DVD Burn", description=descr, where = PluginDescriptor.WHERE_PLUGINMENU, fnc=main, icon="dvdburn.png") ]
View
1  lib/python/Plugins/Extensions/DVDPlayer/Makefile.am
@@ -4,7 +4,6 @@ SUBDIRS = src meta
installdir = $(pkglibdir)/python/Plugins/Extensions/DVDPlayer
install_PYTHON = \
- src/servicedvd.so \
__init__.py \
plugin.py \
keymap.xml \
View
5 lib/python/Plugins/Extensions/DVDPlayer/src/Makefile.am
@@ -2,6 +2,11 @@ OBJS := servicedvd.cpp
-include $(OBJS:.cpp=.d)
+installdir = $(pkglibdir)/python/Plugins/Extensions/DVDPlayer
+
+install_PYTHON = \
+ servicedvd.so
+
servicedvd.so:
$(CXX) $(CPPFLAGS) -MD $(CXXFLAGS) $(DEFS) -I$(top_srcdir)/include \
-Wall -W $(OBJS) -shared -fPIC -Wl,-soname,servicedvd.so -o servicedvd.so \
View
47 lib/python/Plugins/Extensions/DVDPlayer/src/servicedvd.cpp
@@ -85,12 +85,9 @@ RESULT eServiceFactoryDVD::offlineOperations(const eServiceReference &, ePtr<iSe
DEFINE_REF(eServiceDVD);
eServiceDVD::eServiceDVD(eServiceReference ref):
- m_ref(ref),
- m_ddvdconfig(ddvd_create()),
- m_subtitle_widget(0),
- m_state(stIdle),
- m_current_trick(0),
- m_pump(eApp, 1)
+ m_ref(ref), m_ddvdconfig(ddvd_create()), m_subtitle_widget(0), m_state(stIdle),
+ m_current_trick(0), m_pump(eApp, 1), m_width(-1), m_height(-1),
+ m_aspect(-1), m_framerate(-1), m_progressive(-1)
{
int aspect = DDVD_16_9;
int policy = DDVD_PAN_SCAN;
@@ -309,6 +306,32 @@ void eServiceDVD::gotMessage(int /*what*/)
m_event(this, evSeekableStatusChanged);
m_event(this, evUser+12);
break;
+#ifdef DDVD_SUPPORTS_PICTURE_INFO
+ case DDVD_SIZE_CHANGED:
+ {
+ int changed = m_width != -1 && m_height != -1 && m_aspect != -1;
+ ddvd_get_last_size(m_ddvdconfig, &m_width, &m_height, &m_aspect);
+ if (changed)
+ m_event((iPlayableService*)this, evVideoSizeChanged);
+ break;
+ }
+ case DDVD_PROGRESSIVE_CHANGED:
+ {
+ int changed = m_progressive != -1;
+ ddvd_get_last_progressive(m_ddvdconfig, &m_progressive);
+ if (changed)
+ m_event((iPlayableService*)this, evVideoProgressiveChanged);
+ break;
+ }
+ case DDVD_FRAMERATE_CHANGED:
+ {
+ int changed = m_framerate != -1;
+ ddvd_get_last_framerate(m_ddvdconfig, &m_framerate);
+ if (changed)
+ m_event((iPlayableService*)this, evVideoFramerateChanged);
+ break;
+ }
+#endif
default:
break;
}
@@ -500,6 +523,18 @@ int eServiceDVD::getInfo(int w)
case sUser+7:
case sUser+8:
return resIsPyObject;
+#ifdef DDVD_SUPPORTS_PICTURE_INFO
+ case sVideoWidth:
+ return m_width;
+ case sVideoHeight:
+ return m_height;
+ case sAspect:
+ return m_aspect;
+ case sProgressive:
+ return m_progressive;
+ case sFrameRate:
+ return m_framerate;
+#endif
default:
return resNA;
}
View
2  lib/python/Plugins/Extensions/DVDPlayer/src/servicedvd.h
@@ -127,6 +127,8 @@ class eServiceDVD: public iPlayableService, public iPauseableService, public iSe
void loadCuesheet();
void saveCuesheet();
+
+ int m_width, m_height, m_aspect, m_framerate, m_progressive;
};
#endif
View
1  lib/python/Plugins/Extensions/SocketMMI/Makefile.am
@@ -3,7 +3,6 @@ SUBDIRS = src meta
installdir = $(pkglibdir)/python/Plugins/Extensions/SocketMMI
install_PYTHON = \
- src/socketmmi.so \
__init__.py \
plugin.py \
SocketMMI.py
View
5 lib/python/Plugins/Extensions/SocketMMI/src/Makefile.am
@@ -2,6 +2,11 @@ OBJS = socket_mmi.cpp
-include $(OBJS:.cpp=.d)
+installdir = $(pkglibdir)/python/Plugins/Extensions/SocketMMI
+
+install_PYTHON = \
+ socketmmi.so
+
socketmmi.so: socket_mmi.cpp socket_mmi.h
$(CXX) $(CPPFLAGS) -MD $(CXXFLAGS) $(DEFS) -I$(top_srcdir)/include \
-Wall -W $(OBJS) -shared -fPIC -Wl,-soname,socketmmi.so -o socketmmi.so \
View
84 lib/python/Plugins/SystemPlugins/NFIFlash/flasher.py
@@ -63,10 +63,10 @@ class NFIFlash(Screen):
<ePixmap pixmap="skin_default/buttons/green.png" position="140,0" zPosition="0" size="140,40" transparent="1" alphatest="on" />
<ePixmap pixmap="skin_default/buttons/yellow.png" position="280,0" zPosition="0" size="140,40" transparent="1" alphatest="on" />
<ePixmap pixmap="skin_default/buttons/blue.png" position="420,0" zPosition="0" size="140,40" transparent="1" alphatest="on" />
- <widget source="key_green" render="Label" position="140,0" zPosition="1" size="140,40" font="Regular;20" valign="center" halign="center" backgroundColor="#1f771f" transparent="1" />
- <widget source="key_yellow" render="Label" position="280,0" zPosition="1" size="140,40" font="Regular;20" valign="center" halign="center" backgroundColor="#a08500" transparent="1" />
- <widget source="key_blue" render="Label" position="420,0" zPosition="1" size="140,40" font="Regular;20" valign="center" halign="center" backgroundColor="#18188b" transparent="1" />
- <widget source="listlabel" render="Label" position="16,44" size="200,21" valign="center" font="Regular;18" />
+ <widget source="key_green" render="Label" position="140,0" zPosition="1" size="140,40" font="Regular;19" valign="center" halign="center" backgroundColor="#1f771f" transparent="1" />
+ <widget source="key_yellow" render="Label" position="280,0" zPosition="1" size="140,40" font="Regular;19" valign="center" halign="center" backgroundColor="#a08500" transparent="1" />
+ <widget source="key_blue" render="Label" position="420,0" zPosition="1" size="140,40" font="Regular;19" valign="center" halign="center" backgroundColor="#18188b" transparent="1" />
+ <widget source="listlabel" render="Label" position="10,44" size="250,20" font="Regular;16" />
<widget name="filelist" position="0,68" size="260,260" scrollbarMode="showOnDemand" />
<widget source="infolabel" render="Label" position="270,44" size="280,284" font="Regular;16" />
<widget source="job_progressbar" render="Progress" position="10,374" size="540,26" borderWidth="1" backgroundColor="#254f7497" />
@@ -95,6 +95,7 @@ def __init__(self, session, cancelable = True, close_on_finish = False):
{
"green": self.ok,
"yellow": self.reboot,
+ "blue": self.runWizard,
"ok": self.ok,
"left": self.left,
"right": self.right,
@@ -109,6 +110,43 @@ def __init__(self, session, cancelable = True, close_on_finish = False):
self.md5sum = ""
self.job = None
self.box = HardwareInfo().get_device_name()
+ self.configuration_restorable = None
+ self.wizard_mode = False
+ from enigma import eTimer
+ self.delayTimer = eTimer()
+ self.delayTimer.callback.append(self.runWizard)
+ self.delayTimer.start(50,1)
+
+ def check_for_wizard(self):
+ if self["filelist"].getCurrentDirectory() is not None and fileExists(self["filelist"].getCurrentDirectory()+"wizard.nfo"):
+ self["key_blue"].text = _("USB stick wizard")
+ return True
+ else:
+ self["key_blue"].text = ""
+ return False
+
+ def runWizard(self):
+ if not self.check_for_wizard():
+ self.wizard_mode = False
+ return
+ wizardcontent = open(self["filelist"].getCurrentDirectory()+"/wizard.nfo", "r").readlines()
+ nfifile = None
+ for line in wizardcontent:
+ line = line.strip()
+ if line.startswith("image: "):
+ nfifile = self["filelist"].getCurrentDirectory()+line[7:]
+ if line.startswith("configuration: "):
+ backupfile = self["filelist"].getCurrentDirectory()+line[15:]
+ if fileExists(backupfile):
+ print "wizard configuration:", backupfile
+ self.configuration_restorable = backupfile
+ else:
+ self.configuration_restorable = None
+ if nfifile and fileExists(nfifile):
+ self.wizard_mode = True
+ print "wizard image:", nfifile
+ self.check_for_NFO(nfifile)
+ self.queryFlash()
def closeCB(self):
if ( self.job is None or self.job.status is not self.job.IN_PROGRESS ) and not self.no_autostart:
@@ -133,12 +171,16 @@ def left(self):
self["filelist"].pageUp()
self.check_for_NFO()
- def check_for_NFO(self):
+ def check_for_NFO(self, nfifile=None):
self.session.summary.setText(self["filelist"].getFilename())
- if self["filelist"].getFilename() is None:
- return
- if self["filelist"].getCurrentDirectory() is not None:
- self.nfifile = self["filelist"].getCurrentDirectory()+self["filelist"].getFilename()
+ if nfifile is None:
+ self.session.summary.setText(self["filelist"].getFilename())
+ if self["filelist"].getFilename() is None:
+ return
+ if self["filelist"].getCurrentDirectory() is not None:
+ self.nfifile = self["filelist"].getCurrentDirectory()+self["filelist"].getFilename()
+ else:
+ self.nfifile = nfifile
if self.nfifile.upper().endswith(".NFI"):
self["key_green"].text = _("Flash")
@@ -152,7 +194,7 @@ def check_for_NFO(self):
else:
self.md5sum = ""
else:
- self["infolabel"].text = _("No details for this image file") + ":\n" + self["filelist"].getFilename()
+ self["infolabel"].text = _("No details for this image file") + (self["filelist"].getFilename() or "")
self.md5sum = ""
else:
self["infolabel"].text = ""
@@ -164,6 +206,7 @@ def ok(self):
self["filelist"].descent()
self.session.summary.setText(self["filelist"].getFilename())
self.check_for_NFO()
+ self.check_for_wizard()
else:
self.queryFlash()
@@ -192,7 +235,10 @@ def md5ready(self, retval):
def md5finished(self, retval):
if retval==0:
- self.session.openWithCallback(self.queryCB, MessageBox, _("This .NFI file has a valid md5 signature. Continue programming this image to flash memory?"), MessageBox.TYPE_YESNO)
+ if self.wizard_mode:
+ self.session.openWithCallback(self.queryCB, MessageBox, _("Shall the USB stick wizard proceed and program the image file %s into flash memory?" % self.nfifile.rsplit('/',1)[-1]), MessageBox.TYPE_YESNO)
+ else:
+ self.session.openWithCallback(self.queryCB, MessageBox, _("This .NFI file has a valid md5 signature. Continue programming this image to flash memory?"), MessageBox.TYPE_YESNO)
else:
self.session.openWithCallback(self.queryCB, MessageBox, _("The md5sum validation failed, the file may be corrupted! Are you sure that you want to burn this image to flash memory? You are doing this at your own risk!"), MessageBox.TYPE_YESNO)
@@ -201,6 +247,7 @@ def queryCB(self, answer):
self.createJob()
else:
self["statusbar"].text = _("Please select .NFI flash image file from medium")
+ self.wizard_mode