SkinReloader-Plugin (DreamOS)

  • Mit dem SkinReloader kann man live (ohne GUI-Neustart) den aktuellen Skin nach einer Änderung der Skin-Datei sofort reloaden bzw. sogar live (ohne GUI-Neustart) zu einem anderen Skin wechseln (beachte jedoch den Hinweis unten !!!).


    Die Idee zum Plugin entstand, da mich immer die vielen nervigen GUI-Neustarts gestört haben, wenn man nur mal schnell ein paar Angaben im Skin ändern wollte :winking_face:

    Insbesondere dann, wenn man eigentlich nur die richtige Position eines Skin-Elements finden wollte, was dann am Ende doch mehr GUI-Neustarts erforderte, als anfangs gedacht.

    Im Ergebnis bietet das Plugin neben dem ursprünglich angedachten Skin-Reload jetzt sogar noch die Möglichkeit zum direkten Skin-Wechsel.


    Als kleine Zugabe kann man im Plugin auch einen einfachen Skin-Syntax-Check (xml-syntax und skin-syntax) ausführen, um schon vor dem Reload zu Fehlern informiert zu werden und nicht erst beim GS, wenn es einen xml-Parse-Error gibt oder der fehlerhafte Skin-Screen aufgerufen wird.

    (dies kann man über die Option im Plugin automatisch beim reload/change machen bzw. manuell im Plugin über die Menü-Taste)


    Auch kann man einen skinWatcher aktivieren, der dann im Hintergrund die skin*.xml's überwacht.

    (der skinWatcher kann im Plugin manuell über die gelbe Taste oder den Befehl im Erweiterungsmenü bzw. über die Option im Plugin automatisch beim Box-/-GUI-Neustart aktiviert werden)

    Dabei wird skin.xml des aktuellen skins sowie die skin_user.xml und skin_user_display.xml in /etc/enigma2 überwacht.

    Sobald eine dieser skin-Dateien geändert wurde, wird durch den aktivierten skinWatcher sofort der Skin-Reload gestartet.

    Diese Funktion sollte man mit dem Skin-Syntax-Check kombinieren, um evtl. noch vorhandene Tippfehler bereits vor dem skinreload abzufangen.

    Bisher erfolgt der skin-Syntax-Check nur für die skin.xml (die skin_user*.xml kommen evtl. noch dazu).


    Hinweis:

    Das Plugin erhebt keinen Anspruch auf eine komplett fehlerfreie Folgenutzung nach SkinReload bzw. SkinChange.

    Grundsätzlich ist e2 für solche Sachen nicht gedacht, so dass es in der Folge durchaus auch mal einen GS geben könnte.

    Daher richtet sich das Plugin grundsätzlich auch nur an Skinner und Plugin-Ersteller, die eben öfter mal den Skin neu laden wollen, um skin-Anpassungen jetzt schneller überprüfen zu können oder die Ansicht eines Plugins schnell in verschiedenen Skins überprüfen zu können.

    Das Plugin ist daher auch nicht für den Normaluser zur Alltagsnutzung gedacht !!!

    PS:

    Da der Code doch sehr mies und tricky ist, wurde das Ganze erstmal in einem .so-File verpackt :winking_face:

    Für die mipsel-Boxen gibt es noch keine .so-Datei, weshalb es das Plugin vorerst nur für die dm9x0 und One gibt.


    Dank an die User, die mich in Vorabtests bei diesem Plugin unterstützt haben (dhwz, pclin, hilfsbereit und zombi) :thumbs_up:

  • Wow, the plugin is just super !!! :thumbs_up: :thumbs_up:


    This is the dream of any skin maker.


    shows in which window and in which widget there is an error in a specific parameter



    Thank's :thumbs_up::thumbs_up::thumbs_up:

  • Er meinte, dass er damit skins aus alten Sourcen einfach nehmen kann und es ihm sagt, was geändert werden muss.

    Gruss
    Dre


    Boxen (im Einsatz): DM920, DM900, DMOne
    Developer Project Merlin - we are OpenSource

  • Bumping life back into this thread :smiling_face:


    I tested this plugin on my Dreambox Two UltraHD but i ran into a greenscreen straight away.


    Here is some crash info


    Everything in life that's any fun is either immoral, illegal or fattening

  • Hi


    I use the version from this post and my image is Peter Pan. I build the image my self from the opendreambox pyro repo

    Everything in life that's any fun is either immoral, illegal or fattening

  • Please test the current version 0.9.7 from first post - for TWO use arm64-version.

    (i have uploaded newest version)


    If the version 0.9.7 don't works, please upload here the skin.py in /usr/lib/enigma2/python/ from your image as attachment.

    Gruß Sven (aka Dreamy)


    DM920 mit unstable OE2.5 DP
    One mit unstable OE2.6 DP

  • Ok, the skinglobals now not the problem.

    Can you make a live log from e2 on reloading the current skin by the green key ?


    live-e2log in telnet:

    journalctl -f -u enigma2


    The "please waiting ..." is showing on active option "check skin-syntax".

    Is the message showing with running points after the text?

    Is the message staying for ever?

    Please test with deactivated option for skin-syntax-check.

    Gruß Sven (aka Dreamy)


    DM920 mit unstable OE2.5 DP
    One mit unstable OE2.6 DP

  • Nice :smiling_face:


    Yes the box freeze and can't be rebooted from Telnet i see the please wait in the lcd screen.

    But from the log file i can see that it's my mod for loading menutext color that is the problem and not your plugin :smiling_face:


    I have a style plugin in my image where you can change the colors menutext in the skin.xml. As you can see i load an external .xml file for this color

    This is not playing ball with your plugin for obviouse reasons.


    Code
    May 24 11:28:41 dreambox enigma2 [3320]: File "SkinReloader.py", line 427, in SkinReloader.SkinReload.reloadSkin
    May 24 11:28:41 dreambox enigma2 [3320]: File "/usr/lib/enigma2/python/skin.py", line 742, in loadSkinData
    May 24 11:28:41 dreambox enigma2 [3320]: loadSingleSkinData (desktop, dom_skin, path)
    May 24 11:28:41 dreambox enigma2 [3320]: File "/usr/lib/enigma2/python/skin.py", line 530, in loadSingleSkinData
    May 24 11:28:41 dreambox enigma2 [3320]: colorNames [name] = parseColor (color)
    May 24 11:28:41 dreambox enigma2 [3320]: File "/usr/lib/enigma2/python/skin.py", line 247, in parseColor
    May 24 11:28:41 dreambox enigma2 [3320]: raise SkinError ("color '% s' must be #aarrggbb or valid named color"% (str))

    Everything in life that's any fun is either immoral, illegal or fattening

  • Have you used colors with wrong format (correct #aarrggbb) or have you used colornames which are unknown at this time in the extern xml ?

    Gruß Sven (aka Dreamy)


    DM920 mit unstable OE2.5 DP
    One mit unstable OE2.6 DP

  • But i don't understand, why you got an error on load the color with parseColor()

    The error is only if you use a unknown colorname in the color-value or you have forget the "#" in the color-value.


    I think there is not wrong code in your xml:

    Code
    <skin>
        <colors>
            <color name="menutext" value="#a97b17" />    
        </colors>
    </skin>

    I don't know, why you got this error ???


    Have you this output in your e2log on GUI-Restart ?

    Code
    print("not loading pp_menutextcolor_default: ", err)

    Gruß Sven (aka Dreamy)


    DM920 mit unstable OE2.5 DP
    One mit unstable OE2.6 DP

  • I am sure it's my novice skills of coding that is the problem :smiling_face:

    I have not that output in the log. the file is loaded on GUI restart


    I did try with the DreamOS skin default and the plugin works just fine :smiling_face:

    So i have to see where my custom code goes wrong.


    So your amazing plugin do actually work since it have found a flaw in my code :smiling_face:


    Tanks Sven

    Everything in life that's any fun is either immoral, illegal or fattening