Is it possible to ADD functions from one SKIN to another?

There are 54 replies in this Thread which was already clicked 4,768 times. The last Post () by genius5000.

  • Hello there


    Is it possible to ADD diffenert functions from one SKIN to another?

    Example: dB Meter, LOF info, etc ... I'm using VTI on VU+Duo².


    Yes, I've tried the other forums, they wont/cant help ... hope you do.


    Thank you.

  • well, i am just using Notepad++ and copying/pasting codes from here to there.

    it works usually fine if I am just moving things within one skin.

    I tried copying a code/parameter from a different skin, but it wouldn't work in another!

    that's why I asked, if there is a special way of doing it?

  • well, i am just using Notepad++ and copying/pasting codes from here to there.

    it works usually fine if I am just moving things within one skin.

    I tried copying a code/parameter from a different skin, but it wouldn't work in another!

    that's why I asked, if there is a special way of doing it?

    you need som linux tool and a lot of experianes

  • thank you for your reply.



    I guess i dont have too much knowledge about this.


    All I could do so far is moving positions within one skin.


    But, it didnt work when I tried copy/paste from another skin.



    What I need is = dB SNR% AGC BER, and also VPID & APID functionalities.


    Perhaps copying them from the skin HD Glass, then into my customized skin ?



    If it's not too hassle/complicated for you, I'd appreciate your further help !



    Thanks

  • Yes you can pretty much copy any element from one skin to another.


    Each element has code that goes in the xml file. In most skins this will be found in the correct screen in skin.xml


    This xml code then either references a python component that exists in ALL enigma2 builds, or it will reference a custom component just for that skin.


    If its a standard component (which SNR, AGC, BER are) then you just need to copy that bit of code from the xml file.

    If its a custom component you would then also have to copy over the python component to the correct locations.

    These normally live in usr/lib/enigma2/python/Components/...


    If you download a skin IPK and open it up with 7zip. You will see the file structure to see if there is any custom components.


    For example in my slyk1hd skin I use custom time components.


    In the IPK, I will have this file structure. usr/lib folder is my custom components. usr/share folder are all my skin files.


    f63f833bdc22b52a6db3.png


    inside the sub folders of usr/lib/enigma2/python/components/Converter are my custom components.



    dee03292fae.png



    In my skin xml file I reference these like this.


    <widget source="global.CurrentTime" render="Label" position="917,523" size="240,36" font="Regular;24" foregroundColor="skylightblue" backgroundColor="skydarkblue" valign="center" halign="right" transparent="1" zPosition="2">

    <convert type="SlykClockToText">SlykHDDate</convert>

    </widget>



    So its just a case of disecting the original skin, seeing if its a standard or custom component and then copying over any custom components where needed.

    ** A person who feels appreciated will always do more than what is expected **

    Edited once, last by KiddaC ().

  • And just for reference. If you are copying code over from another skin, you have to make sure the font and colour references are correct for the skin you are using.

    For example if Skin A references a font called Roboto, And Skin B doesn't use Roboto. Then the skin will fail to load.

    The same with colours. If Skin A uses a colour called "darkblue", but this colour reference isn't defined in SKIN B, again the skin will fail to load.

    So amend any font and colour references.

    ** A person who feels appreciated will always do more than what is expected **

  • SNR, BER, AGC are found in frontendinfo.py (this is a default component).

    VPID & APID are found in serviceinfo.py (this is a default component).


    Therefore you should have no problem bringing them elements into other skins. You don't even need to copy any python components over.

    ** A person who feels appreciated will always do more than what is expected **

  • KiddaC


    Thank you so much for explaining it in such an easy way.

    I think, if you bare with me, I will probably make it at the end :)



    FIRST:


    Where do I find frontendinfo.py and serviceinfo.py ?


    Instead, I've found similar files in the following directory:

    /usr/lib/enigma2/python/Components/Converter:


    FrontendInfo.pyo

    FrontendInfo2.py

    FrontendInfo3.py


    ServiceInfo.pyo

    ServiceInfo2.py


    Which ones from above should be for my purpose?



    SECOND:


    Please take a look at the attached picture.

    The following codes are from my skin.

    It's the top/middle part of the infobar, where it shows Sat Orbit, Frequency, etc in grey:


    <widget source="session.CurrentService" render="Label" position="760,815" size="600,36" font="Regular; 24" backgroundColor="background" transparent="1"

    halign="left" noWrap="1" valign="center" text="19.2E DVB-S2 11288 27500 3/4 8PSK" zPosition="3" foregroundColor="icon_fgcoff">


    <convert type="KS1V4_ServiceName2">%O %s %F %p %Y %f %M %b</convert>


    </widget>



    And this codes are from the Glass HD skin.

    The dB/SNR/AGC/BER parts that I want to copy:


    <widget source="Frontend" render="Label" position="345,15" zPosition="2" size="420,30" font="Prive3;28" halign="center" valign="center" transparent="1">

    <convert type="FrontendInfo">SNRdB</convert>

    </widget>

    <eLabel name="snr" text="SNR:" position="210,52" size="90,33" font="Prive3;31" halign="right" transparent="1" />

    <widget source="Frontend" render="Progress" position="345,52" size="420,30" pixmap="hd_glass17/bar_snr.png" borderWidth="2" borderColor="grey">

    <convert type="FrontendInfo">SNR</convert>

    </widget>

    <widget source="Frontend" render="Label" position="795,52" size="90,33" font="Prive3;31">

    <convert type="FrontendInfo">SNR</convert>

    </widget>

    <eLabel name="agc" text="AGC:" position="210,90" size="90,33" font="Prive3;31" halign="right" transparent="1" />

    <widget source="Frontend" render="Progress" position="345,90" size="420,30" pixmap="hd_glass17/bar_snr.png" borderWidth="2" borderColor="grey">

    <convert type="FrontendInfo">AGC</convert>

    </widget>

    <widget source="Frontend" render="Label" position="795,90" size="90,33" font="Prive3;31">

    <convert type="FrontendInfo">AGC</convert>

    </widget>

    <eLabel name="ber" text="BER:" position="210,127" size="90,33" font="Prive3;31" halign="right" transparent="1" />

    <widget source="Frontend" render="Progress" position="345,127" size="420,30" pixmap="hd_glass17/bar_ber.png" borderWidth="2" borderColor="grey">

    <convert type="FrontendInfo">BER</convert>

    </widget>

    <widget source="Frontend" render="Label" position="795,127" size="90,33" font="Prive3;31">

    <convert type="FrontendInfo">BER</convert>

    </widget>



    I understand, I have to match its fonts and colors with mine.

    Do I also have to replace widget source="Frontend" with my widget source="session.CurrentService" ?



    THIRD:


    How do I bring on VPID & APID from the scratch ?

    I could not find these codes in the Glass HD skin.



    Thank you and I'll wait for your reply.

  • py files are uncompiled files. When you reboot your box they compile into the pyo file.

    So you have the 2 files. frontendinfo and serviceinfo. So don't worry about them.


    When i put the snr on my very old sky skin I used.


    <widget source="session.FrontendStatus" render="Label" position="1100,598" size="38,36" font="Regular;14" valign="center" noWrap="1" backgroundColor="skydarkblue" foregroundColor="white" transparent="1" halign="right">

    <convert type="FrontendInfo">SNR</convert>

    </widget>


    so if the code is not working with just source="frontend". Try source="session.FrontendStatus"


    Also the position of the elements are from the start of the infobar. If its positioned 0,0 then work from the top of the screen.

    If the infobar is positioned halfway down the page position="0,400", then your frontend widgets will be relative to that. so they might just be 10 pixels down etc. If you are not aware of this they might actually be showing but off screen.


    The oe alliance files for reference are here.


    https://github.com/oe-alliance…thon/Components/Converter


    looking at serviceinfo.py your reference looks to be AudioPid and VideoPid




    I have never used vpid, but it is probably. this.


    <widget source="session.CurrentService" render="Label" ...
    <convert type="ServiceInfo">VideoPid</convert>

    </widget>


    ** A person who feels appreciated will always do more than what is expected **

    Edited once, last by KiddaC ().

  • if you are faffing with skin codes, i always recommend using a proper xml editor. Notepad++ is ok, but something like xml wrench which is free is much better as it has built in syntax checker.

    ** A person who feels appreciated will always do more than what is expected **

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!