git.cweiske.de
/
enigma2.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
8abe6bd
)
dont open epglist when no epg is avail
author
Andreas Monzner
<andreas.monzner@multimedia-labs.de>
Sun, 13 Nov 2005 08:57:45 +0000
(08:57 +0000)
committer
Andreas Monzner
<andreas.monzner@multimedia-labs.de>
Sun, 13 Nov 2005 08:57:45 +0000
(08:57 +0000)
lib/components/listboxepg.cpp
patch
|
blob
|
history
lib/dvb/epgcache.cpp
patch
|
blob
|
history
lib/dvb/epgcache.h
patch
|
blob
|
history
lib/python/Screens/ChannelSelection.py
patch
|
blob
|
history
lib/python/Screens/InfoBar.py
patch
|
blob
|
history
diff --git
a/lib/components/listboxepg.cpp
b/lib/components/listboxepg.cpp
index d088006bc9852c23c38aa6a65fe836987188e589..0d5c541265b4908ff1d54e167780d7745132f131 100644
(file)
--- a/
lib/components/listboxepg.cpp
+++ b/
lib/components/listboxepg.cpp
@@
-4,8
+4,8
@@
void eListboxEPGContent::setRoot(const eServiceReference &root)
{
void eListboxEPGContent::setRoot(const eServiceReference &root)
{
- eEPGCache *epg=
NULL
;
- if (
!eEPGCache::getInstance(epg)
)
+ eEPGCache *epg=
eEPGCache::getInstance()
;
+ if (
epg
)
{
m_list.clear();
m_root = root;
{
m_list.clear();
m_root = root;
diff --git
a/lib/dvb/epgcache.cpp
b/lib/dvb/epgcache.cpp
index 7b94a1a7956b8f7679eaabebefb0aba3905e1052..c1f294a6cba3b643a681eaf7d78dc1ec0f35142e 100644
(file)
--- a/
lib/dvb/epgcache.cpp
+++ b/
lib/dvb/epgcache.cpp
@@
-747,14
+747,6
@@
void eEPGCache::save()
#endif
}
#endif
}
-RESULT eEPGCache::getInstance(eEPGCache *&ptr)
-{
- ptr = instance;
- if (!ptr)
- return -1;
- return 0;
-}
-
eEPGCache::channel_data::channel_data(eEPGCache *ml)
:cache(ml)
,abortTimer(ml), zapTimer(ml)
eEPGCache::channel_data::channel_data(eEPGCache *ml)
:cache(ml)
,abortTimer(ml), zapTimer(ml)
diff --git
a/lib/dvb/epgcache.h
b/lib/dvb/epgcache.h
index 5643fa43eae0094f8b10bfd06773638809ba33d7..aa0410b3a3a5c9afa4117d24ce7ecbbe181edfaa 100644
(file)
--- a/
lib/dvb/epgcache.h
+++ b/
lib/dvb/epgcache.h
@@
-223,7
+223,7
@@
private:
timeMap::iterator m_timemap_cursor, m_timemap_end;
#endif // SWIG
public:
timeMap::iterator m_timemap_cursor, m_timemap_end;
#endif // SWIG
public:
- static
RESULT getInstance(eEPGCache *&ptr);
+ static
eEPGCache *getInstance() { return instance; }
eEPGCache();
~eEPGCache();
eEPGCache();
~eEPGCache();
@@
-257,7
+257,7
@@
public:
// eServiceEvent are parsed epg events.. it's safe to use them after cache unlock
// for use from python ( members: m_start_time, m_duration, m_short_description, m_extended_description )
RESULT lookupEvent(const eServiceReference &service, int event_id, ePtr<eServiceEvent> &);
// eServiceEvent are parsed epg events.. it's safe to use them after cache unlock
// for use from python ( members: m_start_time, m_duration, m_short_description, m_extended_description )
RESULT lookupEvent(const eServiceReference &service, int event_id, ePtr<eServiceEvent> &);
- RESULT lookupEvent(const eServiceReference &service, time_t
, ePtr<eServiceEvent> &);
+ RESULT lookupEvent(const eServiceReference &service, time_t, ePtr<eServiceEvent> &);
RESULT getNextTimeEntry(ePtr<eServiceEvent> &);
};
RESULT getNextTimeEntry(ePtr<eServiceEvent> &);
};
diff --git
a/lib/python/Screens/ChannelSelection.py
b/lib/python/Screens/ChannelSelection.py
index b30190e49774e89dfb4e5dc664a500608cf93200..c31b794906604284a7e0f559ca408d46d149807c 100644
(file)
--- a/
lib/python/Screens/ChannelSelection.py
+++ b/
lib/python/Screens/ChannelSelection.py
@@
-3,7
+3,7
@@
from Components.Button import Button
from Components.ServiceList import ServiceList
from Components.ActionMap import ActionMap
from EpgSelection import EPGSelection
from Components.ServiceList import ServiceList
from Components.ActionMap import ActionMap
from EpgSelection import EPGSelection
-from enigma import eServiceReference
+from enigma import eServiceReference
, eEPGCache, eEPGCachePtr
from Screens.FixedMenu import FixedMenu
from Screens.FixedMenu import FixedMenu
@@
-87,7
+87,12
@@
class ChannelSelection(Screen):
self["actions"].csel = self
def showEPGList(self):
self["actions"].csel = self
def showEPGList(self):
- self.session.open(EPGSelection, self["list"].getCurrent())
+ ref=self["list"].getCurrent()
+ ptr=eEPGCache.getInstance()
+ if ptr.startTimeQuery(ref) != -1:
+ self.session.open(EPGSelection, ref)
+ else:
+ print 'no epg for service', ref.toString()
# marked edit mode
def startMarkedEdit(self):
# marked edit mode
def startMarkedEdit(self):
diff --git
a/lib/python/Screens/InfoBar.py
b/lib/python/Screens/InfoBar.py
index 62639c04d50f9876cf617aad02e9cdec9ed5e81c..78a47dddf03735587ccf56afb76c1574136f511e 100644
(file)
--- a/
lib/python/Screens/InfoBar.py
+++ b/
lib/python/Screens/InfoBar.py
@@
-224,7
+224,12
@@
class InfoBar(Screen):
self.muteDialog.instance.hide()
def showEPGList(self):
self.muteDialog.instance.hide()
def showEPGList(self):
- self.session.open(EPGSelection, self.session.nav.getCurrentlyPlayingServiceReference())
+ ref=self.session.nav.getCurrentlyPlayingServiceReference()
+ ptr=eEPGCache.getInstance()
+ if ptr.startTimeQuery(ref) != -1:
+ self.session.open(EPGSelection, ref)
+ else:
+ print 'no epg for service', ref.toString()
def quit(self):
self.session.open(Standby)
def quit(self):
self.session.open(Standby)