Grabber only active if not card is in use (1 Viewer)

mts

Portal Pro
September 2, 2007
317
25
Home Country
Germany Germany
Hey guys,

I'm using 4 tuners, but the epg-grabber only works if no tuner is in use.
Is there any way to change this behavior?

e.g. 1 TV is watching TV nonstop, so one TV-card is in use and 3 tuners are available. In this case I run out of EPG data completely.

CU
mts
 

mm1352000

Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    Is there any way to change this behavior?
    Not at present with standard TVE 3. The idle EPG grabber only runs when all tuners are idle as you say.
    One way to workaround would be to enable the timeshifting EPG grabber, then schedule a short manual recording on any channel(s) from the transmitter(s) where you get your EPG from. That should allow the timeshifting EPG grabber to do the update, instead of the idle EPG grabber.
     

    mts

    Portal Pro
    September 2, 2007
    317
    25
    Home Country
    Germany Germany
    hmm, ok. A little disappointing, but ok.
    I hope this feature is on your ToDo-List for upcoming features.

    But anyway, I don't know how it is actually solved but instead of checking for all cards to be idle you just have to take the first idle card...
    I'm gonna have a look at the MP-code, maybe I can implement it myself.
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    I hope this feature is on your ToDo-List for upcoming features.
    For TVE 3.5, yes. For TVE 3, no. I no longer work on TVE 3 unless there is a serious problem to solve (eg. a crash).

    I'm gonna have a look at the MP-code, maybe I can implement it myself.
    Good luck. Don't hesitate to ask if you need help. :)
    A good place to start would be the classes in the TvService project Epg folder (EpgCard, EpgGrabber, Transponder). Those are the idle EPG grabber classes. All the logic about when to grab and which tuners to use is in there.
     

    mts

    Portal Pro
    September 2, 2007
    317
    25
    Home Country
    Germany Germany
    Just a quick draw, but shouldn't this do the job?

    EpgGrabber.cs:
    add this method:
    Code:
        public bool IsIdle
        {
          get { return IsCardIdle(_user);  }
        }

    EgpGrabber.cs:
    add this method:
    Code:
        private EpgCard _getAvailableEpgCard()
        {    
          /// check if there is already a card grabbing
          foreach (EpgCard card in _epgCards)
          {
            if (card.IsGrabbing)
              return null;
          }
    
          /// return first available card
          foreach (EpgCard card in _epgCards)
          {
            if (card.IsIdle)
              return card;
          }
    
          return null;  
        }

    remove this line from _epgTimer_Elapsed:
    Code:
            if (_tvController.AllCardsIdle == false)
              return;

    and change this:
    Code:
            foreach (EpgCard card in _epgCards)
            {
              //Log.Epg("card:{0} grabbing:{1}", card.Card.IdCard, card.IsGrabbing);
    
              if (!_isRunning)
                return;
              if (card.IsGrabbing)
                continue;
              if (_tvController.AllCardsIdle == false)
                return;
              GrabEpgOnCard(card);
            }
    to this:

    Code:
    EpgCard card = _getAvailableEpgCard();
    if (card != null)
      GrabEpgOnCard(card);
     

    mts

    Portal Pro
    September 2, 2007
    317
    25
    Home Country
    Germany Germany
    ok, I have a working version now.
    There is only a small "bug" but I think it is not critical.
    Everytime a timeshift stops, it restarts the epg-grabber.
    comment from some dev:
    // we need this, otherwise tvservice will hang in the event stoptimeshifting is called by heartbeat timeout function

    If you want I can send you the dif-files. Maybe you can add it to some release.
     

    Users who are viewing this thread

    Top Bottom