Taapat / enigma2-plugin-youtube

YouTube enigma2 plugin to manage your youtube account and wach videos
GNU General Public License v2.0
35 stars 38 forks source link

Skin issue !! #196

Closed fairbird closed 1 year ago

fairbird commented 1 year ago

The plugin does not work correctly if any skin does not have the plugin screens.. For example (PLi-FullNightHD) and openpli image (Python 3) ... If I disable (YouTubeMain) screen in skin just for testing . Selection_001 . As screenshot shown below the plugin does not work correctly . 1 . And happens crash if press ok ...

2023-02-02 14:19:46+0300 [-] [YouTube] Selected: Search [ePNG] loadSVG /usr/lib/enigma2/python/Plugins/Extensions/YouTube/icons/Searchvideo.svg 150x108 from 100x72 [ePNG] loadSVG /usr/lib/enigma2/python/Plugins/Extensions/YouTube/icons/Searchchannel.svg 150x108 from 100x72 [ePNG] loadSVG /usr/lib/enigma2/python/Plugins/Extensions/YouTube/icons/Searchplaylist.svg 150x108 from 100x72 [ePNG] loadSVG /usr/lib/enigma2/python/Plugins/Extensions/YouTube/icons/Searchbroadcasts.svg 150x108 from 100x72 2023-02-02 14:19:46+0300 [-] TypeError: 'float' object cannot be interpreted as an integer 2023-02-02 14:19:46+0300 [-] 2023-02-02 14:19:46+0300 [-] The above exception was the direct cause of the following exception: 2023-02-02 14:19:46+0300 [-] 2023-02-02 14:19:46+0300 [-] SystemError: <function LCD.autoDimUpLCD at 0xaf18f9d8> returned a result with an exception set [ePyObject] (PyObject_CallObject(<bound method LCD.autoDimUpLCD of <Components.Lcd.LCD object at 0xaf190fd0>>,()) failed)

Taapat commented 1 year ago

Are you sure it's a plugin issue and not an image issue?

In your crash log, I see that the LCD throws an error. Are you sure this isn't related to your LCD skin?

fairbird commented 1 year ago

Why if I add the plugin screens inside skin the plugin work just fine ?!!

{"template": [ MultiContentEntryPixmapAlphaTest(pos=(0,0), flags=BT_SCALE, size=(150,108), png=2), # Thumbnail MultiContentEntryText(pos=(165,1), size=(862,78), font=0, flags=RT_HALIGN_LEFT|RT_VALIGN_CENTER|RT_WRAP, text=3), # Title MultiContentEntryText(pos=(180, 75), size=(300,33), font=1, flags=RT_HALIGN_LEFT, text=4), # Views MultiContentEntryText(pos=(540,75), size=(300,33), font=1, flags=RT_HALIGN_LEFT, text=5), # Duration ], "fonts": [gFont("Regular",30), gFont("Regular",24)], "itemHeight": 108 } # Thumbnail size in list

. 1 After remove screen I have got the issue of skin . 2 . But I will test my old version image before I built new version and see what happens

fairbird commented 1 year ago

This is also other crash ..

2023-02-02 15:42:25+0300 [-] [Screen] Showing screen 'YouTubeMain'. 2023-02-02 15:42:25+0300 [-] TypeError: 'float' object cannot be interpreted as an integer 2023-02-02 15:42:25+0300 [-] 2023-02-02 15:42:25+0300 [-] The above exception was the direct cause of the following exception: 2023-02-02 15:42:25+0300 [-] 2023-02-02 15:42:25+0300 [-] Traceback (most recent call last): 2023-02-02 15:42:25+0300 [-] File "/usr/lib/enigma2/python/Screens/InfoBarGenerics.py", line 3968, in checkBsodCallback 2023-02-02 15:42:25+0300 [-] SystemError: <method 'start' of 'eBaseImpl.eTimer' objects> returned a result with an exception set [ePyObject] (PyObject_CallObject(<bound method InfoBarHandleBsod.checkBsodCallback of <class 'Screens.InfoBar.InfoBar'>>,()) failed) 2023-02-02 15:42:26+0300 [-] [ActionMap] Keymap 'WizardActions' -> Action = 'back'. 2023-02-02 15:42:26+0300 [-] [Screen] Showing screen '['PluginBrowserNew_summary', 'SimpleSummary']'. 2023-02-02 15:42:26+0300 [-] Traceback (most recent call last): 2023-02-02 15:42:26+0300 [-] File "/usr/lib/enigma2/python/Screens/InfoBarGenerics.py", line 3989, in checkBsodCallback 2023-02-02 15:42:26+0300 [-] File "/usr/lib/enigma2/python/StartEnigma.py", line 310, in openWithCallback 2023-02-02 15:42:26+0300 [-] dlg = self.open(screen, *arguments, **kwargs) 2023-02-02 15:42:26+0300 [-] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2023-02-02 15:42:26+0300 [-] File "/usr/lib/enigma2/python/StartEnigma.py", line 317, in open 2023-02-02 15:42:26+0300 [-] raise RuntimeError("modal open are allowed only from a screen which is modal!") 2023-02-02 15:42:26+0300 [-] RuntimeError: modal open are allowed only from a screen which is modal! [ePyObject] (PyObject_CallObject(<bound method InfoBarHandleBsod.checkBsodCallback of <class 'Screens.InfoBar.InfoBar'>>,()) failed)

Taapat commented 1 year ago

Are you using openpli develop image from feed or build your own? If you build your own do you change any components? If you change some components by taking them from another image, I assume that they do not support the scaling factor (float) that can be used to rescale screen displays to suit the current resolution of the screen.

fairbird commented 1 year ago

Yes it is my own image ... https://github.com/fairbird/enigma2-dreambox

I will try to figure out where is the problem exactly !!

Taapat commented 1 year ago

I checked on openpli-develop-gbue4k-20230201. I can't confirm any problems. If you change the code, make sure it works as intended and don't blame the plugin.

fairbird commented 1 year ago

Just right now .. I have compiled e2 from openpli source (Not from my source) and test it .. Same issue ...

Installing enigma2 (3.11+git20521+dd87f17) on root

[Skin] Parsing embedded skin ''. [Skin] Processing screen '', position=(412, 147), size=(1095 x 786) for module 'YouTubeMain'. [ePNG] loadSVG /usr/share/enigma2/skin_default/buttons/red.svg 210x60 from 140x40 [ePNG] loadSVG /usr/share/enigma2/skin_default/buttons/green.svg 210x60 from 140x40 [Screen] Warning: Skin is missing element 'text' in <class 'Plugins.Extensions.YouTube.YouTubeUi.YouTubeMain'>. [ePNG] loadSVG /usr/lib/enigma2/python/Plugins/Extensions/YouTube/YouTube.svg 150x60 from 100x40 [ePNG] loadSVG /usr/lib/enigma2/python/Plugins/Extensions/YouTube/icons/icon.svg 150x108 from 100x72 [ePNG] loadSVG /usr/lib/enigma2/python/Plugins/Extensions/YouTube/icons/Search.svg 150x108 from 100x72 [ePNG] loadSVG /usr/lib/enigma2/python/Plugins/Extensions/YouTube/icons/PubFeeds.svg 150x108 from 100x72 [ePNG] loadSVG /usr/lib/enigma2/python/Plugins/Extensions/YouTube/icons/MyFeeds.svg 150x108 from 100x72 [Skin] Processing screen 'SimpleSummary' from list 'YouTubeMain_summary, SimpleSummary', position=(0, 0), size=(400 x 240) for module 'SimpleSummary'. [Screen] Showing screen '['YouTubeMain_summary', 'SimpleSummary']'. [Screen] Showing screen 'YouTubeMain'. TypeError: 'float' object cannot be interpreted as an integer The above exception was the direct cause of the following exception: SystemError: <function InfoBarUnhandledKey.checkUnused at 0xaf6e9758> returned a result with an exception set [ePyObject] (CallObject(<bound method InfoBarUnhandledKey.checkUnused of <class 'Screens.InfoBar.InfoBar'>>,()) failed)

fairbird commented 1 year ago

This code case the issue https://github.com/Taapat/enigma2-plugin-youtube/blob/master/src/__init__.py#L37-L40 If I remove it from https://github.com/Taapat/enigma2-plugin-youtube/blob/master/src/YouTubeUi.py#L218-L252 I have got screen plugin like this . 1

It is E2 issue I think .. On OpenATV after test it no problem on openpli

Taapat commented 1 year ago

The code in init is not the cause of the error. It just checks if the image has the necessary things to support svg and screen scaling. If your image has the applySkinFactor method, but it doesn't work, it's not the plugin's fault. Any skin that uses applySkinFactor will not work for you either. Try my scaling svg skin SimpleGray and you will get the same problem: https://github.com/Taapat/skin-SimpleGray

fairbird commented 1 year ago

You are right SimpleGray skin same error ... So the problem from where now ?!! How to solve it ?!! Please Send the correct commit for E2 to test it ?!!

fairbird commented 1 year ago

@Taapat I built image depend on offical openpli source (Not my source). Then I got same issue ... I tested OpenaTV + OpenVix = No problem ....

So the issue is in E2 of openpli I think need to be fix it !!

P.s: If you want to test openpli by yourself don't forget to remove plugin screen from skin ... Let E2 use default screens of plugin.

Taapat commented 1 year ago

I checked on openpli-develop-gbue4k-20230201.

As I wrote, I already checked on the openpli develop image. In addition to that, I use my skin SimpleGray on openpli develop every day. First check on official image from openpli feed on receiver supported by openpli. The fact that you build your own image from openpli source and think that you are not changing anything does not mean that you are not changing any files.

biko-73 commented 1 year ago

Thanks for new skin which support svg checked skin SimpleGray on openpli 8.3 on vu+ zero 4k only hd skin which work image back to default skin when use any of sd or fhd

1 2 3 5 5 1

Taapat commented 1 year ago

@biko-73 strange. Are you using official openpli 8.3 image from feed? Did you try skin from image feed or from github releases?

I checked on image openpli-8.3-release-gbue4k-20230129 on Gigablue UHD UE 4K receiver . Both skin, from image feed and from github releases (on releases are only python3 compatibility improvements in components) work for me without problems on all resolutions. I agree that all screens are not correct in SD, but I don't want to spend a lot of time on it, because I don't believe that anyone uses SD skin nowadays. HD and FHD work without problems. Maybe there are problems in some specific screens that I haven't tested. I assume that some independent plugins might have problems.

Anyway, you can open the issue on skin repository if you want.

biko-73 commented 1 year ago

Thank you for your interest, would you share the link for skin which you can discuss skin issue on it i use official image from opli site https://downloads.openpli.org/builds/vuzero4k/openpli-8.3-release-vuzero4k-20230116_usb.zip and the skin from github releases

Taapat commented 1 year ago

You can open a new skin issue here: https://github.com/Taapat/skin-SimpleGray/issues

fairbird commented 1 year ago

I have solved the issue by updating my E2 source ...