LoadEPG 0.2.4 e 0.2.5 in download

Tutto quello che ha a che fare con i plugins.

Moderatori: ragno, tapino, alez, zulu, davidea

unixer
Messaggi: 205
Iscritto il: 07 dic 2009, 23:21

Re: LoadEPG 0.2.4 e 0.2.5 in download

Messaggio da unixer »

Confermo anche io stesso problema con loadepg

Codice: Seleziona tutto

Mar  1 06:29:20 HTPCServer vdr: [13479] LoadEPG: Data error signature for summary
e mi mancano tutte le descrizioni dei films
Avatar utente
Maggiolino
Messaggi: 83
Iscritto il: 17 gen 2008, 03:35

Re: LoadEPG 0.2.4 e 0.2.5 in download

Messaggio da Maggiolino »

Ti ringrazio anche qui della risposta :)
Qualche idea di cosa è cambiato?
Ciao
lukkino
Messaggi: 1086
Iscritto il: 20 gen 2007, 09:49

Re: LoadEPG 0.2.4 e 0.2.5 in download

Messaggio da lukkino »

Ecco una piccola patch.
Aprite il file loadepg.c
Andate alla riga 2304 e dovreste trovare il seguente codice:

Codice: Seleziona tutto

if(Data[p+4] != 0xb9)
cambiatelo in:

Codice: Seleziona tutto

if(Data[p+4] != 0xb9 && Data[p+4] != 0xd0)
e poi ricompilate e riprovate.

Non ho mai capito perchè quel byte in quella posizione era 0xb9, però ho visto che ora oltre a quel valore hanno aggiunto anche 0xd0.
Non vorrei che questo nuovo valore faccia cambiare la tabella di traduzione.
Non mi sembra, ho dato un occhio veloce, e sembra che il testo sia comprensibile.

Verificate se dove prima vi mancavano le descrizioni, ora ci sono e se si leggono bene.

Ciao ciao :)
VDRBOX: GA-K8NS, AMD Sempron 2600+, Hauppauge Nexus 2.1, LFS
lukkino
Messaggi: 1086
Iscritto il: 20 gen 2007, 09:49

Re: LoadEPG 0.2.4 e 0.2.5 in download

Messaggio da lukkino »

Allora dopo un pò di controlli sull'epg creato alcune descrizioni erano ancora tagliate o mancanti.
Per cui ho riscritto una parte del codice.
Potete scaricare il nuovo file loadepg.c.
Fatte copia ed incolla del link qui sotto su una finestra nuova del browser, altrimenti Altervista si perde ;)

http://lukkinosat.altervista.org/loadepg.c

Provate e fatemi sapere.
Ovviamente dovete ricompilare il plugin.
Dalle prove fatte, nei log i titoli e le descrizioni sono quasi identici come numero, sono poco più di 70000.

Ciao ciao :D
VDRBOX: GA-K8NS, AMD Sempron 2600+, Hauppauge Nexus 2.1, LFS
Avatar utente
Maggiolino
Messaggi: 83
Iscritto il: 17 gen 2008, 03:35

Re: LoadEPG 0.2.4 e 0.2.5 in download

Messaggio da Maggiolino »

Semplicemente perfetto! :D
Grazie mille lukkino, senza descrizioni non si capiva nulla!
Ciao e grazie ancora
P.S.
La 0.25 su vdr 2.04 compila, come la 0.24 su vdr 1.7.31, mentre la 0.24 su vdr 1.7.27 dà questo errore:

Codice: Seleziona tutto

loadepg.c: In member function void cTaskLoadepg::CreateEpgDataFile():
loadepg.c:2924:46: error: struct sConfig has no member named Tmp
loadepg.c:2925:46: error: struct sConfig has no member named Tmp
loadepg.c:2926:51: error: struct sConfig has no member named Tmp
loadepg.c: In member function virtual bool cPluginLoadepg::ProcessArgs(int, char**):
loadepg.c:3471:27: error: struct sConfig has no member named Tmp
loadepg.c: In member function virtual bool cPluginLoadepg::Initialize():
loadepg.c:3504:14: error: struct sConfig has no member named Tmp
loadepg.c:3506:23: error: struct sConfig has no member named Tmp
loadepg.c:3508:28: error: struct sConfig has no member named Tmp
loadepg.c:3511:5: error: struct sConfig has no member named Tmp
loadepg.c:3512:22: error: struct sConfig has no member named Tmp
loadepg.c:3514:7: error: struct sConfig has no member named Tmp
loadepg.c:3518:7: error: struct sConfig has no member named Tmp
make[1]: *** [loadepg.o] Error 1
lukkino
Messaggi: 1086
Iscritto il: 20 gen 2007, 09:49

Re: LoadEPG 0.2.4 e 0.2.5 in download

Messaggio da lukkino »

Visto che su 1.7.31 la 0.2.4 compila, prendi per buona questa.
L'errore sulla 1.7.27 è dovuto al tuo compilatore che è troppo restrittivo.

Ciao ciao
VDRBOX: GA-K8NS, AMD Sempron 2600+, Hauppauge Nexus 2.1, LFS
unixer
Messaggi: 205
Iscritto il: 07 dic 2009, 23:21

Re: LoadEPG 0.2.4 e 0.2.5 in download

Messaggio da unixer »

grazie lukkino
per i più puntigliosi
ecco la patch

Codice: Seleziona tutto

--- vdr-loadepg-0.2.5/loadepg.c.org	2013-01-21 18:55:00.000000000 +0100
+++ vdr-loadepg-0.2.5/loadepg.c	2014-03-03 21:02:45.663049528 +0100
@@ -2270,8 +2270,9 @@
   int p;
   unsigned short int ChannelId;
   unsigned short int MjdTime;
-  int Len1;
-  int Len2;
+  unsigned short int DescriptorTag;
+  int DescriptorLength;
+  int SummaryLength;
   
   if(Length < 20)
   {
@@ -2295,53 +2296,47 @@
       if(MjdTime > 0)
       {
         p = 10;
-        loop1:;
-        sSummary *S = (lSummaries + nSummaries);
-        S->ChannelId = ChannelId;
-        S->MjdTime = MjdTime;
-        S->EventId = (Data[p] << 8) | Data[p+1];
-        Len1 = ((Data[p+2] & 0x0f) << 8) | Data[p+3];
-        if(Data[p+4] != 0xb9)
+        while(p < Length)
         {
-          if(DEBUG)
+          sSummary *S = (lSummaries + nSummaries);
+          S->ChannelId = ChannelId;
+          S->MjdTime = MjdTime;
+          S->EventId = (Data[p] << 8) | Data[p+1];
+          SummaryLength = ((Data[p+2] & 0x0f) << 8) | Data[p+3];
+          p += 4;
+          while(SummaryLength > 0)
           {
-            esyslog("LoadEPG: Data error signature for summary");
+            DescriptorTag = Data[p];
+            DescriptorLength = Data[p+1];
+            p += 2;
+            switch(DescriptorTag)
+            {
+              case 0xb9:
+                S->pData = pS;
+                S->lenData = DescriptorLength;
+                if((pS + DescriptorLength) >= MAX_BUFFER_SIZE_SUMMARIES)
+                {
+                  esyslog("LoadEPG: Error, buffer overflow, summaries size more than %i bytes", MAX_BUFFER_SIZE_SUMMARIES);
+                  IsError = true;
+                  return;
+                }
+                memcpy(&bSummaries[pS], &Data[p], DescriptorLength);
+                pS += (DescriptorLength + 1);
+                nSummaries ++;
+                if(nSummaries >= MAX_SUMMARIES)
+                {
+                  esyslog("LoadEPG: Error, summaries found more than %i", MAX_SUMMARIES);
+                  IsError = true;
+                  return;
+                }
+                break;
+              default:
+                break;
+            }
+            SummaryLength -= (DescriptorLength + 2);
+            p += DescriptorLength;
           }
-          goto endloop1;
         }
-        if(Len1 > Length)
-        {
-          if(DEBUG)
-          {
-            esyslog("LoadEPG: Data error length for summary");
-          }
-          goto endloop1;
-        }
-        p += 4;
-        Len2 = Data[p+1];
-        S->pData = pS;
-        S->lenData = Len2;
-        if((pS + Len2 + 2) > MAX_BUFFER_SIZE_SUMMARIES)
-        {
-          esyslog("LoadEPG: Error, buffer overflow, summaries size more than %i bytes", MAX_BUFFER_SIZE_SUMMARIES);
-          IsError = true;
-          return;
-        }
-        memcpy(&bSummaries[pS], &Data[p+2], Len2);
-        pS += (Len2 + 1);
-        p += Len1;
-        nSummaries ++;
-        if(nSummaries >= MAX_SUMMARIES)
-        {
-          esyslog("LoadEPG: Error, summaries found more than %i", MAX_SUMMARIES);
-          IsError = true;
-          return;
-        }
-        if(p < Length)
-        {
-          goto loop1;
-        }
-        endloop1:;
       }
     }
   }
Rispondi