10992v sid 0x213f al posto di Rai - vi succede ?

contezero

Vu+ Newbie
Io sconsiglio di farlo, mi sembra che se non si sta bene attenti si rischia di mandare in loop crash il dec.

Sinceramente il decoder può andare in crash per tanti motivi, ma sicuramente non per il cambiamento che ti ho indicato.
Chiaramente vanno cambiate esattamente quelle righe, inoltre il cambiamento può non essere più valido se in futuro il file EventName.py venisse cambiato in modo radicale.
 

Tamaki

Administrator
Sinceramente il decoder può andare in crash per tanti motivi, ma sicuramente non per il cambiamento che ti ho indicato.
Chiaramente vanno cambiate esattamente quelle righe, inoltre il cambiamento può non essere più valido se in futuro il file EventName.py venisse cambiato in modo radicale.
In realtà è quello che mi è successo ieri sera, ho provato a cambiare quelle righe, ma al riavvio mi andava il loop, allora ho ripristinato il file originario e tutto è andato nel modo corretto.
Non ho controllato se nel sistemare le righe il file abbia per caso perso il formato linux o se ho sbagliato qualcosa nelle tabulazioni perchè era tardi e avevo sonno :D
Stasera riproverò, voglio però avvisare chi fa questa modifica di farsi un backup del file originale per eventualmente ripristinarlo se qualcosa va storto :)
 

contezero

Vu+ Newbie
CVD :D
Hai fatto un backup del file originale?
In realtà è quello che mi è successo ieri sera, ho provato a cambiare quelle righe, ma al riavvio mi andava il loop, allora ho ripristinato il file originario e tutto è andato nel modo corretto.
Non ho controllato se nel sistemare le righe il file abbia per caso perso il formato linux o se ho sbagliato qualcosa nelle tabulazioni perchè era tardi e avevo sonno :D
Stasera riproverò, voglio però avvisare chi fa questa modifica di farsi un backup del file originale per eventualmente ripristinarlo se qualcosa va storto :)

L'unica spiegazione è che nella BlackHole quel file sia stato modificato in modo notevole dagli sviluppatori, quindi cambiando quelle righe si creano problemi. Se posti il file gli do un'occhiata e guardo cosa non va. (Attualmente non ho istallata la BlackHole sul decoder)
 

contezero

Vu+ Newbie
Questo è il file EventName.py con la modifica valido per la Black Pole (ho modificato il file preso dall'indirizzo https://github.com/BlackPole/bp-dvbapp/blob/master/lib/python/Components/Converter/EventName.py ) :

Code:
from Components.Converter.Converter import Converter
from Components.Element import cached
from enigma import eEPGCache
 
class EventName(Converter, object):
    NAME = 0
    SHORT_DESCRIPTION = 1
    EXTENDED_DESCRIPTION = 2
    FULL_DESCRIPTION = 3
    ID = 4
    NEXT_NAME = 5
        NEXT_DESCRIPTION = 6
   
    def __init__(self, type):
        Converter.__init__(self, type)
        self.epgcache = eEPGCache.getInstance()
        if type == "Description":
            self.type = self.SHORT_DESCRIPTION
        elif type == "ExtendedDescription":
            self.type = self.EXTENDED_DESCRIPTION
        elif type == "FullDescription":
            self.type = self.FULL_DESCRIPTION
        elif type == "ID":
            self.type = self.ID
        elif type == "NextName":
                        self.type = self.NEXT_NAME
                elif type == "NextDescription":
                        self.type = self.NEXT_DESCRIPTION
        else:
            self.type = self.NAME
 
    @cached
    def getText(self):
        event = self.source.event
        if event is None:
            return ""
           
#        if self.type == self.NAME:
#            return event.getEventName()
                if self.type == self.NAME:
          if (event.getEventName())[:31] == "Visibile gratis su tv terrestre":
              return event.getShortDescription().title()
          else:
                        return event.getEventName()
        elif self.type == self.SHORT_DESCRIPTION:
            return event.getShortDescription()
        elif self.type == self.EXTENDED_DESCRIPTION:
            return event.getExtendedDescription() or event.getShortDescription()
        elif self.type == self.FULL_DESCRIPTION:
            description = event.getShortDescription()
            extended = event.getExtendedDescription()
            if description and extended:
                description += '\n'
            return description + extended
        elif self.type == self.ID:
            return str(event.getEventId())
        elif self.type == self.NEXT_NAME or self.type == self.NEXT_DESCRIPTION:
                        reference = self.source.service
                        info = reference and self.source.info
                        if info is not None:
                            nextEvent = self.epgcache.lookupEvent(['SETX', (reference.toString(), 1, -1)])
                                if self.type == self.NEXT_NAME:
                                        return nextEvent[0][2]
                                else:
                                        if nextEvent[0][1] != "":
                                                return nextEvent[0][1]
                                        else:
                                                return nextEvent[0][0]
        return ""
       
    text = property(getText)

Se qualcuno ha tempo di provarlo mi faccia sapere se funziona correttamente.
Per la Black Hole ho bisogno che qualcuno posti il file.
 

Tamaki

Administrator
Questo è il file EventName.py con la modifica valido per la Black Pole (ho modificato il file preso dall'indirizzo https://github.com/BlackPole/bp-dvbapp/blob/master/lib/python/Components/Converter/EventName.py ) :

Code:
from Components.Converter.Converter import Converter
from Components.Element import cached
from enigma import eEPGCache
 
class EventName(Converter, object):
    NAME = 0
    SHORT_DESCRIPTION = 1
    EXTENDED_DESCRIPTION = 2
    FULL_DESCRIPTION = 3
    ID = 4
    NEXT_NAME = 5
        NEXT_DESCRIPTION = 6
 
    def __init__(self, type):
        Converter.__init__(self, type)
        self.epgcache = eEPGCache.getInstance()
        if type == "Description":
            self.type = self.SHORT_DESCRIPTION
        elif type == "ExtendedDescription":
            self.type = self.EXTENDED_DESCRIPTION
        elif type == "FullDescription":
            self.type = self.FULL_DESCRIPTION
        elif type == "ID":
            self.type = self.ID
        elif type == "NextName":
                        self.type = self.NEXT_NAME
                elif type == "NextDescription":
                        self.type = self.NEXT_DESCRIPTION
        else:
            self.type = self.NAME
 
    @cached
    def getText(self):
        event = self.source.event
        if event is None:
            return ""
       
#        if self.type == self.NAME:
#            return event.getEventName()
                if self.type == self.NAME:
          if (event.getEventName())[:31] == "Visibile gratis su tv terrestre":
              return event.getShortDescription().title()
          else:
                        return event.getEventName()
        elif self.type == self.SHORT_DESCRIPTION:
            return event.getShortDescription()
        elif self.type == self.EXTENDED_DESCRIPTION:
            return event.getExtendedDescription() or event.getShortDescription()
        elif self.type == self.FULL_DESCRIPTION:
            description = event.getShortDescription()
            extended = event.getExtendedDescription()
            if description and extended:
                description += '\n'
            return description + extended
        elif self.type == self.ID:
            return str(event.getEventId())
        elif self.type == self.NEXT_NAME or self.type == self.NEXT_DESCRIPTION:
                        reference = self.source.service
                        info = reference and self.source.info
                        if info is not None:
                            nextEvent = self.epgcache.lookupEvent(['SETX', (reference.toString(), 1, -1)])
                                if self.type == self.NEXT_NAME:
                                        return nextEvent[0][2]
                                else:
                                        if nextEvent[0][1] != "":
                                                return nextEvent[0][1]
                                        else:
                                                return nextEvent[0][0]
        return ""
   
    text = property(getText)

Se qualcuno ha tempo di provarlo mi faccia sapere se funziona correttamente.
Per la Black Hole ho bisogno che qualcuno posti il file.

No, anche cosi crasha.
Ti posto il file originale.
 

Attachments

  • EventName.rar
    677 bytes · Views: 2

contezero

Vu+ Newbie
No, anche cosi crasha.
Ti posto il file originale.

Prova questo, se non va dovete chiedere ai programmatori della Black Hole per quale motivo non funziona.

Code:
from Components.Converter.Converter import Converter
from Components.Element import cached
from enigma import eEPGCache
 
class EventName(Converter, object):
    NAME = 0
    SHORT_DESCRIPTION = 1
    EXTENDED_DESCRIPTION = 2
    ID = 3
    NEXT_NAME = 4
        NEXT_DESCRIPTION = 5
   
    def __init__(self, type):
        Converter.__init__(self, type)
        self.epgcache = eEPGCache.getInstance()
        if type == "Description":
            self.type = self.SHORT_DESCRIPTION
        elif type == "ExtendedDescription":
            self.type = self.EXTENDED_DESCRIPTION
        elif type == "ID":
            self.type = self.ID
        elif type == "NextName":
                        self.type = self.NEXT_NAME
                elif type == "NextDescription":
                        self.type = self.NEXT_DESCRIPTION
        else:
            self.type = self.NAME
 
    @cached
    def getText(self):
        event = self.source.event
        if event is None:
            return ""
           
        if self.type == self.NAME:
          if (event.getEventName())[:31] == "Visibile gratis su tv terrestre":
              return event.getShortDescription()
          else:
            return event.getEventName()
        elif self.type == self.SHORT_DESCRIPTION:
            return event.getShortDescription()
        elif self.type == self.EXTENDED_DESCRIPTION:
            return event.getExtendedDescription()
        elif self.type == self.ID:
            return str(event.getEventId())
        elif self.type == self.NEXT_NAME or self.type == self.NEXT_DESCRIPTION:
                        reference = self.source.service
                        info = reference and self.source.info
                        if info is not None:
                            nextEvent = self.epgcache.lookupEvent(['SETX', (reference.toString(), 1, -1)])
                                if self.type == self.NEXT_NAME:
                                        return nextEvent[0][2]
                                else:
                                        if nextEvent[0][1] != "":
                                                return nextEvent[0][1]
                                        else:
                                                return nextEvent[0][0]
 
        return ""
       
    text = property(getText)
 

birubiru

Vu+ User
Ragazzi si è capito perchè ogni tanto a piacimento per i canali Rai, nella lista canali, compare 10992v sid 0x213f al posto dei relativi nomi? Grazie
 
Top