Posts by KiddaC

    Unfortunately it doesn't work!20230907-124018-enigma2-crash.log

    this plugin jedimakerxtream and xstreamity both work with epgimport plugin to bring in the epg. Your log is saying you dont have that plugin installed


    FileNotFoundError: [Errno 2] No such file or directory: '/etc/epgimport'


    I should maybe make that optional. Although I see it being a bit pointless for xtream playlists without epgimporter epg.


    ** edit ** in fact it is optional. I just forget to wrap the conditional around delete bouquets. It is everywhere else.
    I will fix that.

    That plugin that wont die.

    I have been asked on github if I can put in an auto restart stream option.
    I have tried this before and it doesn't work well.
    But... I have just put in a quick stream restart button using 0 on your remote.
    I actually have a test line at the moment which has freezing streams, so I was able to test and it works fine.


    Will do an update shortly.

    @czarnynaganiacz

    your epg is bringing back unusual data


    its basically trying to catch lots of similar named channels at once.
    I have never seen an epg file look like this.
    I don't have a solution for you.
    My program will try and generate the channels.xml file from your providers API data. If no channels referenced by an EPG_ID then the channels.xml list will be empty.
    Try my other EPG plugin to assign epgs instead.

    Jedi EPG Xtream

    Now you are all setup was there anything special on the box for the seller to hide/block you from doing anything with it? It just seems odd they have gone out of there way to deny access

    I just think the skin confused meowhaxor
    As it wasn't obvious to a new person what the coloured buttons did.

    There is no text on any of the buttons in that skin he was using.

    :smiling face:


    You could have said before I just spent 10 mins writing you a solution. :nerd face:

    Well thats even better, because openatv is my image of choice. So if you get stuck with anything in that, then I should be able to assist.
    But like someone posted earlier. I already have a very thorough setup guide for people new to these boxes.

    follow that, and you will be fine

    OpenATV 7.* setup guide by KiddaC

    meowhaxor


    OK I have read through this thread. But I think people might be missing something.


    Q) Can you access the plugins menu. Yes or No


    if NO, this isn't your box password. This a parental password that has been set to stop you accessing screens.


    pasted-from-clipboard.png


    pasted-from-clipboard.png

    Now if you have some sort of file explorer / file browser / file commander software installed on your box. We can get this pin code.

    as it lives in the settings file

    /etc/enigma2/settings


    config.ParentalControl.servicepin.0=9999

    config.ParentalControl.setuppin=9999

    config.ParentalControl.setuppinactive=True

    If we haven't got any file explorer software on your box then it gets more difficult.

    But... you show a screen shot of your plugin menu. It just has a badly designed skin.

    pasted-from-clipboard.png

    this is what those buttons should say

    pasted-from-clipboard.png

    So in your plugin menu. press green.

    and you should hopefully get a sub menu

    pasted-from-clipboard.png

    find "systemplugins" and look for "setpasswd" plugin. Click ok button on it to install.

    find "extensions" and look for "filecommander". Click ok button to install.

    reboot GUI.


    If you can install any of the above or ideally both, then we can get you rock and rolling.

    A few more things to look out for


    Code
    try:
     
        trying_to_check_error
     
    except NameError, err:
     
        print err, 'Error Caused'   # Would not work in Python 3.x


    is wrong as it now needs an "as"

    Code
    try:
     
        trying_to_check_error
     
    except NameError as err:
     
        print(err, 'Error Caused')  


    Division calculations.

    either use


    Python
    from __future__ import division
    print(7 / 5)

    or use double slash for all division calculations. Otherwise you will get a rounded integer result rather than a float (decimal).



    Code
    print(7 // 5)

    basically I use a software called Geany as my python editor.
    I have python 3 installed on my computer

    I have a linting package installed in Geany.
    I fix all the linting errors. Which will fix a lot of python 3 errors.

    Then I will load the plugin onto box, try everything and see what crashes. Then google for the answers. Which will normally direct you to a similar question on stackoverflow.

    The rest just comes through experience of what works in python 2 and python 3. I code to work in both though. So I use conditionals.
    Its always the same errors over and over again.
    Usually different library or module calls that might have changed between versions.

    But generally all print statements need to be in brackets. print("BLAHBLAH"). This is often the major culprit. All old plugins would have wrote print "BLAHBLAH"

    python 3 handles strings differently. So might need wrapping in a str() or sometimes a .decode() or .encode() is required.
    This is the most confusing aspect. python 3 is bytes for everything. python 2 classes everything as a string. It doesn't care.

    here are some conditionals I have in my various plugins. Which highlights some changes needed to run in both.


    Code
    import sys
    
    pythonVer = 2
    if sys.version_info.major == 3:
        pythonVer = 3
    Python
    if pythonVer == 2:
        from urllib2 import urlopen, Request
    else:
        from urllib.request import urlopen, Request
    
    
    if pythonVer == 2:
        from urllib import quote
    else:
        from urllib.parse import quote


    from a file load

    Code
                        for line in lines:
                            if pythonVer == 3:
                                line = line.decode()


    from a url response

    Code
        for line in response:
            if pythonVer == 3:
                try:
                    line = line.decode("utf-8")
                except:
                    pass


    timestamp example

    Code
                if pythonVer == 2:
                    glob.pintime = int(time.mktime(datetime.now().timetuple()))
                else:
                    glob.pintime = int(datetime.timestamp(datetime.now()))


    simple byte to string conversion

    Code
            if pythonVer == 3:
                data = str(data)


    Basically all the above will pretty much get most plugins working
    Make sure the library calls are correct
    Make sure all print statements are in brackets.
    Make sure strings are specifically converted to strings. If a string is required.

    It is not always that simple. But most plugins are not really over complicated. They might read a file. They might download from a url. Display a few results.

    Talks other than a print statement not in brackets I dont think there is much wrong with that plugin.

    I think its still an old hd skin though.


    here is a cleaned version of plugin.py from that .rar file you have attached

    I haven't tested this on my box, I just run it through my linting software. So its as clean as it can be.


    A base for someone else to get working if its still not working probably. I am too busy to test properly

    Well it runs now anyway. Don't know what its meant to do or what its meant to look like. But the plugin opens :)
    I don't have any recordings. So I just quickly recorded bbc 1

    pasted-from-clipboard.png

    nope, only barebones images like openpli and dreambox show that dependancy.

    All others have it.

    Its not required as alternative methods are used to match channels if not available. Its just a better match if your image has fuzzywuzzy in feeds