bouquets.tv \
dm800se.info \
dm500hd.info \
+ dm7020hd.info \
dm7025.info \
dm8000.info \
dm800.info \
settings.800se \
settings.500hd \
+ settings.7020hd \
settings.7025 \
settings.800 \
settings.8000
--- /dev/null
+<default>
+ <prerequisites>
+ <!-- hardware can occur more than once -->
+ <hardware type="dm7020hd" />
+ </prerequisites>
+
+ <info>
+ <author>Dream Multimedia GmbH</author>
+ <name>Dream Multimedia Default</name>
+ </info>
+
+ <!-- available types: "directories" -->
+ <files type="directories">
+ <!--file type="skin" directory="test_skin/" flag="default" name="Default Skin" /-->
+ <file type="config" name="settings.7020hd" />
+ <!--file type="services" name="lamedb.192">
+ <prerequisites>
+ <bcastsystem type="DVB-S" />
+ <satellite type="192" />
+ </prerequisites>
+ </file-->
+ <file type="favourites" directory="" name="bouquets.tv" />
+ <file type="favourites" directory="hdbouquets/" name="userbouquet.favourites.tv" />
+ <!--file type="package" directory="packages/" name="small-test_1.0_mipsel.ipk" /-->
+ </files>
+</default>
--- /dev/null
+config.misc.rcused=1
\ No newline at end of file
<pixmap pos="bpBottomRight" filename="skin_default/b_br.png" />
</borderset>
</windowstyle>
- <!-- Main screen colors (id=1 LCD) -->
- <windowstyle type="skinned" id="1">
- <color name="Background" color="#000000" />
- <color name="LabelForeground" color="#ffffff" />
- <color name="ListboxBackground" color="#000000" />
- <color name="ListboxForeground" color="#ffffff" />
- <color name="ListboxSelectedBackground" color="#000000" />
- <color name="ListboxSelectedForeground" color="#ffffff" />
- <color name="ListboxMarkedBackground" color="#000000" />
- <color name="ListboxMarkedForeground" color="#ffffff" />
- <color name="ListboxMarkedAndSelectedBackground" color="#000000" />
- <color name="ListboxMarkedAndSelectedForeground" color="#ffffff" />
- <color name="WindowTitleForeground" color="#ffffff" />
- <color name="WindowTitleBackground" color="#000000" />
- </windowstyle>
- <windowstyle type="skinned" id="2">
- <color name="Background" color="#000000" />
- <color name="LabelForeground" color="#ffffff" />
- <color name="ListboxBackground" color="#000000" />
- <color name="ListboxForeground" color="#ffffff" />
- <color name="ListboxSelectedBackground" color="#000000" />
- <color name="ListboxSelectedForeground" color="#ffffff" />
- <color name="ListboxMarkedBackground" color="#000000" />
- <color name="ListboxMarkedForeground" color="#ffffff" />
- <color name="ListboxMarkedAndSelectedBackground" color="#000000" />
- <color name="ListboxMarkedAndSelectedForeground" color="#ffffff" />
- <color name="WindowTitleForeground" color="#ffffff" />
- <color name="WindowTitleBackground" color="#000000" />
- </windowstyle>
<!-- Fonts -->
<fonts>
<!-- <font filename="md_khmurabi_10.ttf" name="Regular" scale="90" /> -->
<skin>
+ <!-- Main screen colors (id=1 LCD) -->
+ <windowstyle type="skinned" id="1">
+ <color name="Background" color="#000000" />
+ <color name="LabelForeground" color="#ffffff" />
+ <color name="ListboxBackground" color="#000000" />
+ <color name="ListboxForeground" color="#ffffff" />
+ <color name="ListboxSelectedBackground" color="#000000" />
+ <color name="ListboxSelectedForeground" color="#ffffff" />
+ <color name="ListboxMarkedBackground" color="#000000" />
+ <color name="ListboxMarkedForeground" color="#ffffff" />
+ <color name="ListboxMarkedAndSelectedBackground" color="#000000" />
+ <color name="ListboxMarkedAndSelectedForeground" color="#ffffff" />
+ <color name="WindowTitleForeground" color="#ffffff" />
+ <color name="WindowTitleBackground" color="#000000" />
+ </windowstyle>
+ <!-- Main screen colors (id=2 Color OLED (dm800se)) -->
+ <windowstyle type="skinned" id="2">
+ <color name="Background" color="#000000" />
+ <color name="LabelForeground" color="#ffffff" />
+ <color name="ListboxBackground" color="#000000" />
+ <color name="ListboxForeground" color="#ffffff" />
+ <color name="ListboxSelectedBackground" color="#000000" />
+ <color name="ListboxSelectedForeground" color="#ffffff" />
+ <color name="ListboxMarkedBackground" color="#000000" />
+ <color name="ListboxMarkedForeground" color="#ffffff" />
+ <color name="ListboxMarkedAndSelectedBackground" color="#000000" />
+ <color name="ListboxMarkedAndSelectedForeground" color="#ffffff" />
+ <color name="WindowTitleForeground" color="#ffffff" />
+ <color name="WindowTitleBackground" color="#000000" />
+ </windowstyle>
<!-- Screwed Stone II skin (skin_default.xml) /Nemesis -->
<!-- About screen -->
<screen name="About" position="center,center" size="420,350" title="About">
RESULT eDVBTSRecorder::stop()
{
+ int state=3;
+
for (std::map<int,int>::iterator i(m_pids.begin()); i != m_pids.end(); ++i)
stopPID(i->first);
if (!m_running)
return -1;
+
+#if HAVE_DVB_API_VERSION >= 5
+ /* workaround for record thread stop */
+ if (::ioctl(m_source_fd, DMX_STOP) < 0)
+ perror("DMX_STOP");
+ else
+ state &= ~1;
+
+ if (::close(m_source_fd) < 0)
+ perror("close");
+ else
+ state &= ~2;
+#endif
+
m_thread->stop();
-
- close(m_source_fd);
+
+ if (state & 3)
+ ::close(m_source_fd);
+
+ m_running = 0;
m_source_fd = -1;
-
+
m_thread->stopSaveMetaInformation();
-
return 0;
}
DEFINE_REF(eEPGCache)
eEPGCache::eEPGCache()
- :messages(this,1), cleanTimer(eTimer::create(this))//, paused(0)
+ :messages(this,1), cleanTimer(eTimer::create(this)), m_running(0)//, paused(0)
{
- eDebug("[EPGC] Initialized EPGCache");
+ eDebug("[EPGC] Initialized EPGCache (wait for setCacheFile call now)");
CONNECT(messages.recv_msg, eEPGCache::gotMessage);
CONNECT(eDVBLocalTimeHandler::getInstance()->m_timeUpdated, eEPGCache::timeUpdated);
if (!res_mgr)
eDebug("[eEPGCache] no resource manager !!!!!!!");
else
- {
res_mgr->connectChannelAdded(slot(*this,&eEPGCache::DVBChannelAdded), m_chanAddedConn);
+
+ instance=this;
+ memset(m_filename, 0, sizeof(m_filename));
+}
+
+void eEPGCache::setCacheFile(const char *path)
+{
+ bool inited = !!strlen(m_filename);
+ strncpy(m_filename, path, 1024);
+ if (!inited)
+ {
+ eDebug("[EPGC] setCacheFile read/write epg data from/to '%s'", m_filename);
if (eDVBLocalTimeHandler::getInstance()->ready())
timeUpdated();
}
- instance=this;
}
void eEPGCache::timeUpdated()
{
- if (!sync())
+ if (strlen(m_filename))
{
- eDebug("[EPGC] time updated.. start EPG Mainloop");
- run();
- } else
- messages.send(Message(Message::timeChanged));
+ if (!sync())
+ {
+ eDebug("[EPGC] time updated.. start EPG Mainloop");
+ run();
+ singleLock s(channel_map_lock);
+ channelMapIterator it = m_knownChannels.begin();
+ for (; it != m_knownChannels.end(); ++it)
+ {
+ if (it->second->state == -1) {
+ it->second->state=0;
+ messages.send(Message(Message::startChannel, it->second));
+ }
+ }
+ } else
+ messages.send(Message(Message::timeChanged));
+ }
+ else
+ eDebug("[EPGC] time updated.. but cache file not set yet.. dont start epg!!");
}
void eEPGCache::DVBChannelAdded(eDVBChannel *chan)
return;
}
#endif
- messages.send(Message(Message::startChannel, chan));
- // -> gotMessage -> changedService
+ if (m_running) {
+ data.state=0;
+ messages.send(Message(Message::startChannel, chan));
+ // -> gotMessage -> changedService
+ }
}
}
}
case iDVBChannel::state_release:
{
eDebug("[eEPGCache] remove channel %p", chan);
- messages.send(Message(Message::leaveChannel, chan));
+ if (it->second->state >= 0)
+ messages.send(Message(Message::leaveChannel, chan));
pthread_mutex_lock(&it->second->channel_active);
singleLock s(channel_map_lock);
m_knownChannels.erase(it);
void eEPGCache::thread()
{
hasStarted();
+ m_running=1;
nice(4);
load();
cleanLoop();
runLoop();
save();
+ m_running=0;
}
void eEPGCache::load()
{
- FILE *f = fopen("/hdd/epg.dat", "r");
+ FILE *f = fopen(m_filename, "r");
if (f)
{
- unlink("/hdd/epg.dat");
+ unlink(m_filename);
int size=0;
int cnt=0;
-#if 0
- unsigned char md5_saved[16];
- unsigned char md5[16];
- bool md5ok=false;
- if (!md5_file("/hdd/epg.dat", 1, md5))
- {
- FILE *f = fopen("/hdd/epg.dat.md5", "r");
- if (f)
- {
- fread( md5_saved, 16, 1, f);
- fclose(f);
- if ( !memcmp(md5_saved, md5, 16) )
- md5ok=true;
- }
- }
- if ( md5ok )
-#endif
{
unsigned int magic=0;
fread( &magic, sizeof(int), 1, f);
eventDB[key]=std::pair<eventMap,timeMap>(evMap,tmMap);
}
eventData::load(f);
- eDebug("[EPGC] %d events read from /hdd/epg.dat", cnt);
+ eDebug("[EPGC] %d events read from %s", cnt, m_filename);
#ifdef ENABLE_PRIVATE_EPG
char text2[11];
fread( text2, 11, 1, f);
void eEPGCache::save()
{
- struct statfs s;
- off64_t tmp;
- if (statfs("/hdd", &s)<0)
- tmp=0;
- else
+ /* create empty file */
+ FILE *f = fopen(m_filename, "w");
+
+ if (!f)
+ {
+ eDebug("[EPGC] couldn't save epg data to '%s'(%m)", m_filename);
+ return;
+ }
+
+ char *buf = realpath(m_filename, NULL);
+ if (!buf)
{
- tmp=s.f_blocks;
- tmp*=s.f_bsize;
+ eDebug("[EPGC] realpath to '%s' failed in save (%m)", m_filename);
+ fclose(f);
+ return;
}
- // prevent writes to builtin flash
- if ( tmp < 1024*1024*50 ) // storage size < 50MB
+ eDebug("[EPGC] store epg to realpath '%s'", buf);
+
+ struct statfs s;
+ off64_t tmp;
+ if (statfs(buf, &s) < 0) {
+ eDebug("[EPGC] statfs '%s' failed in save (%m)", buf);
+ fclose(f);
return;
+ }
+
+ free(buf);
// check for enough free space on storage
tmp=s.f_bfree;
tmp*=s.f_bsize;
if ( tmp < (eventData::CacheSize*12)/10 ) // 20% overhead
+ {
+ eDebug("[EPGC] not enough free space at path '%s' %lld bytes availd but %d needed", buf, tmp, (eventData::CacheSize*12)/10);
+ fclose(f);
return;
+ }
- FILE *f = fopen("/hdd/epg.dat", "w");
int cnt=0;
- if ( f )
- {
- unsigned int magic = 0x98765432;
- fwrite( &magic, sizeof(int), 1, f);
- const char *text = "UNFINISHED_V7";
- fwrite( text, 13, 1, f );
- int size = eventDB.size();
- fwrite( &size, sizeof(int), 1, f );
- for (eventCache::iterator service_it(eventDB.begin()); service_it != eventDB.end(); ++service_it)
- {
- timeMap &timemap = service_it->second.second;
- fwrite( &service_it->first, sizeof(uniqueEPGKey), 1, f);
- size = timemap.size();
- fwrite( &size, sizeof(int), 1, f);
- for (timeMap::iterator time_it(timemap.begin()); time_it != timemap.end(); ++time_it)
- {
- __u8 len = time_it->second->ByteSize;
- fwrite( &time_it->second->type, sizeof(__u8), 1, f );
- fwrite( &len, sizeof(__u8), 1, f);
- fwrite( time_it->second->EITdata, len, 1, f);
- ++cnt;
- }
+ unsigned int magic = 0x98765432;
+ fwrite( &magic, sizeof(int), 1, f);
+ const char *text = "UNFINISHED_V7";
+ fwrite( text, 13, 1, f );
+ int size = eventDB.size();
+ fwrite( &size, sizeof(int), 1, f );
+ for (eventCache::iterator service_it(eventDB.begin()); service_it != eventDB.end(); ++service_it)
+ {
+ timeMap &timemap = service_it->second.second;
+ fwrite( &service_it->first, sizeof(uniqueEPGKey), 1, f);
+ size = timemap.size();
+ fwrite( &size, sizeof(int), 1, f);
+ for (timeMap::iterator time_it(timemap.begin()); time_it != timemap.end(); ++time_it)
+ {
+ __u8 len = time_it->second->ByteSize;
+ fwrite( &time_it->second->type, sizeof(__u8), 1, f );
+ fwrite( &len, sizeof(__u8), 1, f);
+ fwrite( time_it->second->EITdata, len, 1, f);
+ ++cnt;
}
- eDebug("[EPGC] %d events written to /hdd/epg.dat", cnt);
- eventData::save(f);
+ }
+ eDebug("[EPGC] %d events written to %s", cnt, m_filename);
+ eventData::save(f);
#ifdef ENABLE_PRIVATE_EPG
- const char* text3 = "PRIVATE_EPG";
- fwrite( text3, 11, 1, f );
- size = content_time_tables.size();
+ const char* text3 = "PRIVATE_EPG";
+ fwrite( text3, 11, 1, f );
+ size = content_time_tables.size();
+ fwrite( &size, sizeof(int), 1, f);
+ for (contentMaps::iterator a = content_time_tables.begin(); a != content_time_tables.end(); ++a)
+ {
+ contentMap &content_time_table = a->second;
+ fwrite( &a->first, sizeof(uniqueEPGKey), 1, f);
+ int size = content_time_table.size();
fwrite( &size, sizeof(int), 1, f);
- for (contentMaps::iterator a = content_time_tables.begin(); a != content_time_tables.end(); ++a)
+ for (contentMap::iterator i = content_time_table.begin(); i != content_time_table.end(); ++i )
{
- contentMap &content_time_table = a->second;
- fwrite( &a->first, sizeof(uniqueEPGKey), 1, f);
- int size = content_time_table.size();
+ int size = i->second.size();
+ fwrite( &i->first, sizeof(int), 1, f);
fwrite( &size, sizeof(int), 1, f);
- for (contentMap::iterator i = content_time_table.begin(); i != content_time_table.end(); ++i )
- {
- int size = i->second.size();
- fwrite( &i->first, sizeof(int), 1, f);
- fwrite( &size, sizeof(int), 1, f);
- for ( contentTimeMap::iterator it(i->second.begin());
- it != i->second.end(); ++it )
- {
- fwrite( &it->first, sizeof(time_t), 1, f);
- fwrite( &it->second.first, sizeof(time_t), 1, f);
- fwrite( &it->second.second, sizeof(__u16), 1, f);
- }
- }
- }
-#endif
- // write version string after binary data
- // has been written to disk.
- fsync(fileno(f));
- fseek(f, sizeof(int), SEEK_SET);
- fwrite("ENIGMA_EPG_V7", 13, 1, f);
- fclose(f);
-#if 0
- unsigned char md5[16];
- if (!md5_file("/hdd/epg.dat", 1, md5))
- {
- FILE *f = fopen("/hdd/epg.dat.md5", "w");
- if (f)
+ for ( contentTimeMap::iterator it(i->second.begin());
+ it != i->second.end(); ++it )
{
- fwrite( md5, 16, 1, f);
- fclose(f);
+ fwrite( &it->first, sizeof(time_t), 1, f);
+ fwrite( &it->second.first, sizeof(time_t), 1, f);
+ fwrite( &it->second.second, sizeof(__u16), 1, f);
}
}
-#endif
}
+#endif
+ // write version string after binary data
+ // has been written to disk.
+ fsync(fileno(f));
+ fseek(f, sizeof(int), SEEK_SET);
+ fwrite("ENIGMA_EPG_V7", 13, 1, f);
+ fclose(f);
}
eEPGCache::channel_data::channel_data(eEPGCache *ml)
:cache(ml)
- ,abortTimer(eTimer::create(ml)), zapTimer(eTimer::create(ml)), state(0)
+ ,abortTimer(eTimer::create(ml)), zapTimer(eTimer::create(ml)), state(-1)
,isRunning(0), haveData(0)
#ifdef ENABLE_PRIVATE_EPG
,startPrivateTimer(eTimer::create(ml))
eEPGCache *cache;
ePtr<eTimer> abortTimer, zapTimer;
int prevChannelState;
- __u8 state, isRunning, haveData;
+ int state;
+ __u8 isRunning, haveData;
ePtr<eDVBChannel> channel;
ePtr<eConnection> m_stateChangedConn, m_NowNextConn, m_ScheduleConn, m_ScheduleOtherConn, m_ViasatConn;
ePtr<iDVBSectionReader> m_NowNextReader, m_ScheduleReader, m_ScheduleOtherReader, m_ViasatReader;
void thread(); // thread function
// called from epgcache thread
+ int m_running;
+ char m_filename[1024];
void save();
void load();
#ifdef ENABLE_PRIVATE_EPG
#endif
#endif
+ // must be called once!
+ void setCacheFile(const char *filename);
+
// called from main thread
inline void Lock();
inline void Unlock();
m_filepara->id = F_JPEG;
eDebug("[Picload] Cache File found");
}
+ fclose(f);
}
}
if (ppixmap)
{
ePtr<gPixmap> pixmap;
+ if (PyInt_Check(ppixmap) && data) /* if the pixmap is in fact a number, it refers to the data list */
+ ppixmap = PyTuple_GetItem(data, PyInt_AsLong(ppixmap));
+
if (SwigFromPython(pixmap, ppixmap))
{
eDebug("eListboxPythonMultiContent (Pixmap) get pixmap failed");
void eWindowStyleManager::getStyle(int style_id, ePtr<eWindowStyle> &style)
{
- style = m_current_style[style_id];
+ std::map<int, ePtr<eWindowStyle> >::iterator it = m_current_style.find(style_id);
+ ASSERT(it != m_current_style.end());
+ style = it->second;
}
void eWindowStyleManager::setStyle(int style_id, eWindowStyle *style)
from MenuList import MenuList
-from Components.ParentalControl import parentalControl, IMG_WHITESERVICE, IMG_WHITEBOUQUET, IMG_BLACKSERVICE, IMG_BLACKBOUQUET
+from Components.ParentalControl import IMG_WHITESERVICE, IMG_WHITEBOUQUET, IMG_BLACKSERVICE, IMG_BLACKBOUQUET
from Tools.Directories import SCOPE_SKIN_IMAGE, resolveFilename
from enigma import eListboxPythonMultiContent, gFont, RT_HALIGN_LEFT
self.l.setItemHeight(32)
def toggleSelectedLock(self):
+ from Components.ParentalControl import parentalControl
print "self.l.getCurrentSelection():", self.l.getCurrentSelection()
print "self.l.getCurrentSelectionIndex():", self.l.getCurrentSelectionIndex()
curSel = self.l.getCurrentSelection()
if curSel[0][2]:
parentalControl.unProtectService(self.l.getCurrentSelection()[0][0])
else:
- parentalControl.protectService(self.l.getCurrentSelection()[0][0])
+ parentalControl.protectService(self.l.getCurrentSelection()[0][0])
#Instead of just negating the locked- flag, now I call the getProtectionType every time...
self.list[self.l.getCurrentSelectionIndex()] = ParentalControlEntryComponent(curSel[0][0], curSel[0][1], parentalControl.getProtectionType(curSel[0][0]))
self.l.setList(self.list)
self.list_updating = True
self.packetlist = []
self.installed_packetlist = {}
+ self.upgradeable_packages = {}
self.Console = Console()
self.cmdList = []
self.cachelist = []
self.cache_file = '/usr/lib/enigma2/python/Plugins/SystemPlugins/SoftwareManager/packetmanager.cache' #Path to cache directory
self.oktext = _("\nAfter pressing OK, please wait!")
self.unwanted_extensions = ('-dbg', '-dev', '-doc', 'busybox')
+ self.opkgAvail = fileExists('/usr/bin/opkg')
self.ipkg = IpkgComponent()
self.ipkg.addCallback(self.ipkgCallback)
def IpkgList_Finished(self, result, retval, extra_args = None):
if result:
self.packetlist = []
+ last_name = ""
for x in result.splitlines():
- tokens = x.split(' - ') #self.blacklisted_packages
+ tokens = x.split(' - ')
name = tokens[0].strip()
if not any(name.endswith(x) for x in self.unwanted_extensions):
l = len(tokens)
version = l > 1 and tokens[1].strip() or ""
descr = l > 2 and tokens[2].strip() or ""
+ if name == last_name:
+ continue
+ last_name = name
self.packetlist.append([name, version, descr])
+
if not self.Console:
self.Console = Console()
cmd = "ipkg list_installed"
if result:
self.installed_packetlist = {}
for x in result.splitlines():
- tokens = x.split(' - ') #self.blacklisted_packages
+ tokens = x.split(' - ')
name = tokens[0].strip()
if not any(name.endswith(x) for x in self.unwanted_extensions):
l = len(tokens)
version = l > 1 and tokens[1].strip() or ""
self.installed_packetlist[name] = version
- self.buildPacketList()
+ if self.opkgAvail:
+ if not self.Console:
+ self.Console = Console()
+ cmd = "opkg list-upgradable"
+ self.Console.ePopen(cmd, self.OpkgListUpgradeable_Finished)
+ else:
+ self.buildPacketList()
+ def OpkgListUpgradeable_Finished(self, result, retval, extra_args = None):
+ if result:
+ self.upgradeable_packages = {}
+ for x in result.splitlines():
+ tokens = x.split(' - ')
+ name = tokens[0].strip()
+ if not any(name.endswith(x) for x in self.unwanted_extensions):
+ l = len(tokens)
+ version = l > 2 and tokens[2].strip() or ""
+ self.upgradeable_packages[name] = version
+ self.buildPacketList()
+
def buildEntryComponent(self, name, version, description, state):
divpng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/div-h.png"))
if state == 'installed':
installedpng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_PLUGIN, "SystemPlugins/SoftwareManager/installed.png"))
- return((name, version, description, state, installedpng, divpng))
+ return((name, version, _(description), state, installedpng, divpng))
elif state == 'upgradeable':
upgradeablepng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_PLUGIN, "SystemPlugins/SoftwareManager/upgradeable.png"))
- return((name, version, description, state, upgradeablepng, divpng))
+ return((name, version, _(description), state, upgradeablepng, divpng))
else:
installablepng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_PLUGIN, "SystemPlugins/SoftwareManager/installable.png"))
- return((name, version, description, state, installablepng, divpng))
+ return((name, version, _(description), state, installablepng, divpng))
def buildPacketList(self):
self.list = []
self.cachelist = []
-
if self.cache_ttl > 0 and self.vc != 0:
print 'Loading packagelist cache from ',self.cache_file
try:
print 'rebuilding fresh package list'
for x in self.packetlist:
status = ""
- if self.installed_packetlist.has_key(x[0].strip()):
- if self.installed_packetlist[x[0].strip()] == x[1].strip():
- status = "installed"
- self.list.append(self.buildEntryComponent(x[0].strip(), x[1].strip(), x[2].strip(), status))
+ if self.installed_packetlist.has_key(x[0]):
+ if self.opkgAvail:
+ if self.upgradeable_packages.has_key(x[0]):
+ status = "upgradeable"
+ else:
+ status = "installed"
else:
- status = "upgradeable"
- self.list.append(self.buildEntryComponent(x[0].strip(), x[1].strip(), x[2].strip(), status))
+ if self.installed_packetlist[x[0]] == x[1]:
+ status = "installed"
+ else:
+ status = "upgradeable"
else:
status = "installable"
- self.list.append(self.buildEntryComponent(x[0].strip(), x[1].strip(), x[2].strip(), status))
- if not any(x[0].strip().endswith(x) for x in self.unwanted_extensions):
- self.cachelist.append([x[0].strip(), x[1].strip(), x[2].strip(), status])
+ self.list.append(self.buildEntryComponent(x[0], x[1], x[2], status))
+ self.cachelist.append([x[0], x[1], x[2], status])
write_cache(self.cache_file, self.cachelist)
self['list'].setList(self.list)
def reloadPluginlist(self):
plugins.readPluginList(resolveFilename(SCOPE_PLUGINS))
+
class IpkgInstaller(Screen):
skin = """
<screen name="IpkgInstaller" position="center,center" size="550,450" title="Install extensions" >
<prerequisites>
<hardware type="dm8000" />
<hardware type="dm500hd" />
+ <hardware type="dm800se" />
+ <hardware type="dm7020hd" />
<tag type="System" />
</prerequisites>
<info>
<hardware type="dm8000" />
<hardware type="dm800" />
<hardware type="dm500hd" />
+ <hardware type="dm800se" />
+ <hardware type="dm7020hd" />
<tag type="Display" />
<tag type="System" />
</prerequisites>
portlist = self.getPortList()
for port in portlist:
descr = port
- if descr == 'DVI' and hw_type in ('dm500hd', 'dm800se'):
+ if descr == 'DVI' and hw_type in ('dm500hd', 'dm800se', 'dm7020hd'):
descr = 'HDMI'
- elif descr == 'DVI-PC' and hw_type in ('dm500hd', 'dm800se'):
+ elif descr == 'DVI-PC' and hw_type in ('dm500hd', 'dm800se', 'dm7020hd'):
descr = 'HDMI-PC'
lst.append((port, descr))
for port in self.hw.getPortList():
if self.hw.isPortUsed(port):
descr = port
- if descr == 'DVI' and hw_type in ('dm500hd', 'dm800se'):
+ if descr == 'DVI' and hw_type in ('dm500hd', 'dm800se', 'dm7020hd'):
descr = 'HDMI'
if port != "DVI-PC":
list.append((descr,port))
self.inputSelect(self.selection)
if self["portpic"].instance is not None:
picname = self.selection
- if picname == "DVI" and HardwareInfo().get_device_name() in ("dm500hd", "dm800se"):
+ if picname == "DVI" and HardwareInfo().get_device_name() in ("dm500hd", "dm800se", "dm7020hd"):
picname = "HDMI"
self["portpic"].instance.setPixmapFromFile(resolveFilename(SCOPE_PLUGINS, "SystemPlugins/Videomode/" + picname + ".png"))
class ChannelContextMenu(Screen):
def __init__(self, session, csel):
- from Components.ParentalControl import parentalControl
+
Screen.__init__(self, session)
#raise Exception("we need a better summary screen here")
self.csel = csel
isPlayable = not (current_sel_flags & (eServiceReference.isMarker|eServiceReference.isDirectory))
if isPlayable:
if config.ParentalControl.configured.value:
+ from Components.ParentalControl import parentalControl
if parentalControl.getProtectionLevel(csel.getCurrentSelection().toCompareString()) == -1:
append_when_current_valid(current, menu, (_("add to parental protection"), boundFunction(self.addParentalProtection, csel.getCurrentSelection())), level = 0)
else:
self.close()
def addParentalProtection(self, service):
+ from Components.ParentalControl import parentalControl
parentalControl.protectService(service.toCompareString())
self.close()
def pinEntered(self, service, result):
if result:
+ from Components.ParentalControl import parentalControl
parentalControl.unProtectService(service)
self.close()
else:
from Components.ActionMap import NumberActionMap
from Components.config import config, getConfigListEntry, ConfigNothing, NoSave, ConfigPIN
from Components.ParentalControlList import ParentalControlEntryComponent, ParentalControlList
-from Components.ParentalControl import parentalControl
+
from Components.Sources.StaticText import StaticText
from Screens.ChoiceBox import ChoiceBox
from Screens.MessageBox import MessageBox
elif self["config"].l.getCurrentSelection() == self.changeSetupPin:
self.session.open(ParentalControlChangePin, config.ParentalControl.setuppin, _("setup PIN"))
elif self["config"].l.getCurrentSelection() == self.reloadLists:
+ from Components.ParentalControl import parentalControl
parentalControl.open()
else:
ConfigListScreen.keyRight(self)
self.session.openWithCallback(self.letterChosen, ChoiceBox, title=_("Show services beginning with"), list=mylist, keys = [], selection = sel)
def letterChosen(self, result):
+ from Components.ParentalControl import parentalControl
if result is not None:
print "result:", result
self.currentLetter = result[1]
}, -1)
def cancel(self):
+ from Components.ParentalControl import parentalControl
parentalControl.save()
self.close()
self.bouquetlist = list.getContent("CN", True)
def selectBouquet(self):
+ from Components.ParentalControl import parentalControl
self.list = [ParentalControlEntryComponent(x[0], x[1], parentalControl.getProtectionType(x[0])) for x in self.bouquetlist]
self.bouquetslist.setList(self.list)
if raw_channel:
frontend = raw_channel.getFrontend()
if frontend:
+ frontend.closeFrontend() # immediate close...
del frontend
del raw_channel
return True
def cableTransponderSearchSessionClosed(self, *val):
print "cableTransponderSearchSessionClosed, val", val
- self.resetTimeout()
self.cable_search_container.appClosed.remove(self.cableTransponderSearchClosed)
self.cable_search_container.dataAvail.remove(self.getCableTransponderData)
+ if val and len(val):
+ if val[0]:
+ self.setCableTransponderSearchResult(self.__tlist)
+ else:
+ self.cable_search_container.sendCtrlC()
+ self.setCableTransponderSearchResult(None)
self.cable_search_container = None
self.cable_search_session = None
- if val and len(val) and val[0]:
- self.setCableTransponderSearchResult(self.__tlist)
self.__tlist = None
self.cableTransponderSearchFinished()
parm.modulation = qam[data[4]]
parm.inversion = inv[data[5]]
self.__tlist.append(parm)
- tmpstr = _("Try to find used Transponders in cable network.. please wait...")
- tmpstr += "\n\n"
- tmpstr += data[1]
- tmpstr += " kHz "
- tmpstr += data[0]
- self.cable_search_session["text"].setText(tmpstr)
-
- def setTimeout(self):
- try:
- self.oldtimeoutvalue = 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"
-
- def resetTimeout(self):
- try:
- open("/sys/module/dvb_core/parameters/dvb_shutdown_timeout", "w").write(self.oldtimeoutvalue)
- except:
- print "[info] no /sys/module/dvb_core/parameters/dvb_shutdown_timeout available"
+ tmpstr = _("Try to find used Transponders in cable network.. please wait...")
+ tmpstr += "\n\n"
+ tmpstr += data[1]
+ tmpstr += " kHz "
+ tmpstr += data[0]
+ self.cable_search_session["text"].setText(tmpstr)
def startCableTransponderSearch(self, nim_idx):
if not self.tryGetRawFrontend(nim_idx):
self.cable_search_container.execute(cmd)
tmpstr = _("Try to find used transponders in cable network.. please wait...")
tmpstr += "\n\n..."
- self.setTimeout()
self.cable_search_session = self.session.openWithCallback(self.cableTransponderSearchSessionClosed, MessageBox, tmpstr, MessageBox.TYPE_INFO)
class DefaultSatLists(DefaultWizard):
self.tlist = tlist
def cableTransponderSearchFinished(self):
- self.startScan(self.tlist, self.flags, self.feid)
+ if self.tlist is None:
+ self.tlist = []
+ else:
+ self.startScan(self.tlist, self.flags, self.feid)
def startScan(self, tlist, flags, feid):
if len(tlist):
self.session.open(MessageBox, _("Nothing to scan!\nPlease setup your tuner settings before you start a service scan."), MessageBox.TYPE_ERROR)
def setCableTransponderSearchResult(self, tlist):
- self.scanList.append({"transponders": tlist, "feid": self.feid, "flags": self.flags})
+ if tlist is not None:
+ self.scanList.append({"transponders": tlist, "feid": self.feid, "flags": self.flags})
def cableTransponderSearchFinished(self):
self.buildTransponderList()
profile("PYTHON_START")
from enigma import runMainloop, eDVBDB, eTimer, quitMainloop, \
- getDesktop, ePythonConfigQuery, eAVSwitch, eServiceEvent
+ getDesktop, ePythonConfigQuery, eAVSwitch, eServiceEvent, \
+ eEPGCache
from tools import *
profile("LANGUAGE")
config.misc.useTransponderTime = ConfigYesNo(default=True)
config.misc.startCounter = ConfigInteger(default=0) # number of e2 starts...
config.misc.standbyCounter = NoSave(ConfigInteger(default=0)) # number of standby
+config.misc.epgcache_filename = ConfigText(default = "/hdd/epg.dat")
+
+def setEPGCachePath(configElement):
+ eEPGCache.getInstance().setCacheFile(configElement.value)
+config.misc.epgcache_filename.addNotifier(setEPGCachePath)
#demo code for use of standby enter leave callbacks
#def leaveStandby():