home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
Development
Improvement Suggestions
Will EPG data be updated while watching TV?
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Snoopy87" data-source="post: 1013203" data-attributes="member: 128461"><p>Hi,</p><p> </p><p>I always wondered why EPG data is very often not updated and why I very often have no epg info on many channels.</p><p> </p><p>Today I looked in the code and saw this code (EpgCard.cs):</p><p> </p><p>[CODE]public override int OnEpgReceived()</p><p> {</p><p> try</p><p> {</p><p> //is epg grabbing in progress?</p><p> /*if (_state == EpgState.Idle)</p><p> {</p><p> Log.Epg("Epg: card:{0} OnEpgReceived while idle", _user.CardId);</p><p> return 0;</p><p> }*/</p><p> //is epg grabber already updating the database?</p><p> </p><p> if (_state == EpgState.Updating)</p><p> {</p><p> Log.Epg("Epg: card:{0} OnEpgReceived while updating", _user.CardId);</p><p> return 0;</p><p> }</p><p> </p><p> //is the card still idle?</p><p> if (IsCardIdle(_user) == false)</p><p> {</p><p> Log.Epg("Epg: card:{0} OnEpgReceived but card is not idle", _user.CardId);</p><p> _state = EpgState.Idle;</p><p> _tvController.StopGrabbingEpg(_user);</p><p> _user.CardId = -1;</p><p> _currentTransponder.InUse = false;</p><p> return 0;</p><p> }</p><p> </p><p> List<EpgChannel> epg = _tvController.Epg(_user.CardId) ?? new List<EpgChannel>();</p><p> //did we receive epg info?</p><p> if (epg.Count == 0)</p><p> {</p><p> //no epg found for this transponder</p><p> Log.Epg("Epg: card:{0} no epg found", _user.CardId);</p><p> _currentTransponder.InUse = false;</p><p> _currentTransponder.OnTimeOut();</p><p> </p><p> _state = EpgState.Idle;</p><p> _tvController.StopGrabbingEpg(_user);</p><p> _tvController.PauseCard(_user);</p><p> _user.CardId = -1;</p><p> _currentTransponder.InUse = false;</p><p> return 0;</p><p> }</p><p> </p><p> //create worker thread to update the database</p><p> Log.Epg("Epg: card:{0} received epg for {1} channels", _user.CardId, epg.Count);</p><p> _state = EpgState.Updating;</p><p> _epg = epg;</p><p> Thread workerThread = new Thread(UpdateDatabaseThread);</p><p> workerThread.IsBackground = true;</p><p> workerThread.Name = "EPG Update thread";</p><p> workerThread.Start();</p><p> }</p><p> catch (Exception ex)</p><p> {</p><p> Log.Write(ex);</p><p> }</p><p> return 0;</p><p> }[/CODE]</p><p> </p><p>So, if EPG Grabber is already updating some data, the new received EPG data will not be stored.</p><p>Also, if the TV Card is NOT in idle state, the method returns.</p><p> </p><p>So is it true, that the EPG data will only be stored, if my tv card is in idle state? That will mean, the EPG is not stored while watching a channel? Is there any reason for this behaviour? In my opinion it makes more sense to store the EPG which will be received on the channel I'm watching, because this is the normal and expected behaviour of any set top box / tv / dvb software. If I always watch TV with my HTPC, so that my TV card is never in idle mode, EPG data will never be stored?</p><p> </p><p>Or do I understand something completly wrong? :-(</p><p> </p><p>Best regards,</p><p>Sascha</p></blockquote><p></p>
[QUOTE="Snoopy87, post: 1013203, member: 128461"] Hi, I always wondered why EPG data is very often not updated and why I very often have no epg info on many channels. Today I looked in the code and saw this code (EpgCard.cs): [CODE]public override int OnEpgReceived() { try { //is epg grabbing in progress? /*if (_state == EpgState.Idle) { Log.Epg("Epg: card:{0} OnEpgReceived while idle", _user.CardId); return 0; }*/ //is epg grabber already updating the database? if (_state == EpgState.Updating) { Log.Epg("Epg: card:{0} OnEpgReceived while updating", _user.CardId); return 0; } //is the card still idle? if (IsCardIdle(_user) == false) { Log.Epg("Epg: card:{0} OnEpgReceived but card is not idle", _user.CardId); _state = EpgState.Idle; _tvController.StopGrabbingEpg(_user); _user.CardId = -1; _currentTransponder.InUse = false; return 0; } List<EpgChannel> epg = _tvController.Epg(_user.CardId) ?? new List<EpgChannel>(); //did we receive epg info? if (epg.Count == 0) { //no epg found for this transponder Log.Epg("Epg: card:{0} no epg found", _user.CardId); _currentTransponder.InUse = false; _currentTransponder.OnTimeOut(); _state = EpgState.Idle; _tvController.StopGrabbingEpg(_user); _tvController.PauseCard(_user); _user.CardId = -1; _currentTransponder.InUse = false; return 0; } //create worker thread to update the database Log.Epg("Epg: card:{0} received epg for {1} channels", _user.CardId, epg.Count); _state = EpgState.Updating; _epg = epg; Thread workerThread = new Thread(UpdateDatabaseThread); workerThread.IsBackground = true; workerThread.Name = "EPG Update thread"; workerThread.Start(); } catch (Exception ex) { Log.Write(ex); } return 0; }[/CODE] So, if EPG Grabber is already updating some data, the new received EPG data will not be stored. Also, if the TV Card is NOT in idle state, the method returns. So is it true, that the EPG data will only be stored, if my tv card is in idle state? That will mean, the EPG is not stored while watching a channel? Is there any reason for this behaviour? In my opinion it makes more sense to store the EPG which will be received on the channel I'm watching, because this is the normal and expected behaviour of any set top box / tv / dvb software. If I always watch TV with my HTPC, so that my TV card is never in idle mode, EPG data will never be stored? Or do I understand something completly wrong? :-( Best regards, Sascha [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
Development
Improvement Suggestions
Will EPG data be updated while watching TV?
Contact us
RSS
Top
Bottom