Changeset 12090 for ipk/source/epg_crossepg/usr/lib/enigma2/python/Plugins/SystemPlugins/CrossEPG/crossepg_setup.py
- Timestamp:
- 12/07/11 11:58:44 (12 years ago)
- Location:
- ipk/source/epg_crossepg
- Files:
-
- 1 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
ipk/source/epg_crossepg/usr/lib/enigma2/python/Plugins/SystemPlugins/CrossEPG/crossepg_setup.py
r7451 r12090 4 4 from Screens.MessageBox import MessageBox 5 5 6 from Components.config import KEY_LEFT, KEY_RIGHT, KEY_HOME, KEY_END, KEY_0, ConfigYesNo, ConfigSelection, ConfigClock 6 from Components.config import KEY_LEFT, KEY_RIGHT, KEY_HOME, KEY_END, KEY_0, ConfigYesNo, ConfigSelection, ConfigClock, config, configfile 7 7 from Components.ConfigList import ConfigList 8 8 from Components.Button import Button … … 21 21 22 22 from time import * 23 24 import os 23 25 24 26 class CrossEPG_Setup(Screen): … … 53 55 self.show_extension = self.config.show_extension 54 56 self.show_plugin = self.config.show_plugin 57 self.show_force_reload_as_plugin = self.config.show_force_reload_as_plugin 55 58 56 59 # make devices entries … … 60 63 61 64 for partition in harddiskmanager.getMountedPartitions(): 62 if (partition.mountpoint != '/') and (partition.mountpoint != '') : #and self.isMountedInRW(partition.mountpoint):65 if (partition.mountpoint != '/') and (partition.mountpoint != '') and self.isMountedInRW(partition.mountpoint): 63 66 self.mountpoint.append(partition.mountpoint + "/crossepg") 64 67 … … 114 117 self.makeList() 115 118 119 def isMountedInRW(self, path): 120 testfile = path + "/tmp-rw-test" 121 os.system("touch " + testfile) 122 if os.path.exists(testfile): 123 os.system("rm -f " + testfile) 124 return True 125 return False 126 116 127 def showWarning(self): 117 128 self.session.open(MessageBox, _("PLEASE READ!\nNo disk found. An hard drive or an usb pen is HARDLY SUGGESTED. If you still want use your internal flash pay attention to:\n(1) If you don't have enough free space your box may completely block and you need to flash it again\n(2) Many write operations on your internal flash may damage your flash memory"), type = MessageBox.TYPE_ERROR) … … 188 199 self.list.append((_("Show as plugin"), ConfigYesNo(self.config.show_plugin > 0))) 189 200 self.list.append((_("Show as extension"), ConfigYesNo(self.config.show_extension > 0))) 201 self.list.append((_("Show 'Force reload' as plugin"), ConfigYesNo(self.config.show_force_reload_as_plugin > 0))) 190 202 191 203 self["config"].setList(self.list) … … 233 245 self.config.show_plugin = int(self.list[i][1].getValue()) 234 246 self.config.show_extension = int(self.list[i+1][1].getValue()) 247 self.config.show_force_reload_as_plugin = int(self.list[i+2][1].getValue()) 235 248 236 249 if redraw: … … 247 260 248 261 if index == 0: 249 self["information"].setText(_("Drive where you save data.\nThe drive MUST be mounted in rw "))262 self["information"].setText(_("Drive where you save data.\nThe drive MUST be mounted in rw. If you can't see your device here probably is mounted as read only or autofs handle it only in read only mode. In case of mount it manually and try again")) 250 263 elif index == 1: 251 264 self["information"].setText(_("Lamedb used for epg.dat conversion.\nThis option doesn't work with crossepg patch v2")) … … 279 292 self.config.configured = 1 280 293 self.config.save() 294 try: 295 if self.config.db_root[-8:] == "crossepg": 296 config.misc.epgcache_filename.setValue(self.config.db_root[:-9] + "/epg.dat") 297 else: 298 config.misc.epgcache_filename.setValue(self.config.db_root + "/epg.dat") 299 config.misc.epgcache_filename.callNotifiersOnSaveAndCancel = True 300 config.misc.epgcache_filename.save() 301 configfile.save() 302 except Exception, e: 303 print "custom epgcache filename not supported by current enigma2 version" 304 305 if getEPGPatchType() == -1: 306 # exec crossepg_prepare_pre_start for unpatched images 307 os.system(self.config.home_directory + "/crossepg_prepare_pre_start.sh") 308 281 309 if self.show_extension != self.config.show_extension or self.show_plugin != self.config.show_plugin: 282 310 for plugin in plugins.getPlugins(PluginDescriptor.WHERE_PLUGINMENU):
Note: See TracChangeset
for help on using the changeset viewer.