Hi Littlesat,
You proposal does not allow for substitutions to cope with different skin resolutions. This feature may still be required even when we get SVG images. You can't just find an image and use it particularly if you find an image in the wrong resolution first.
The code should also pay attention to the relative paths provided in the skin. Many skins have multiple copies of some images that may NOT be the same. Those skins should be cleaned up to eliminate or properly differentiate the images.
For performance I don't think you need to have such a complicated search plan. I think that we only need to search in the skin relative path first and then in the resolution appropriate default path next. If the image is not found after those two probes the the image should be classed as not found.
Example 1:
skin = "PLi-FullNightHD"
resolution = 1920 x 1080
data = "/usr/share/enigma2"
image = "buttons/vkey_bg.png"
First look in "/usr/share/enigma2/PLi-FullNightHD/buttons/vkey_bg.png"
Example 2:
skin = "OverlayHD"
resolution = 1280 x 720
data = "/usr/share/enigma2"
image = "buttons/vkey_bg.png"
First look in "/usr/share/enigma2/OverlayHD/buttons/vkey_bg.png"
Example 3:
skin = "PLi-FullNight4K"
resolution = 3840 x 2160
data = "/usr/share/enigma2"
image = "image.png"
First look in "/usr/share/enigma2/PLi-FullNightHD/image.png"
Example 4:
skin = "OverlayHD"
resolution = 1920 x 1080
data = "/usr/share/enigma2"
image = "image.svg"
First look in "/usr/share/enigma2/OverlayHD/image.svg"
Example 5:
skin = "PLi-FullNightHD"
resolution = 1920 x 1080
data = "/usr/share/enigma2"
image = "/tmp/image.svg"
Only look in "/tmp/image.svg"
Regards,
Ian.
Edited by IanSav, 30 August 2018 - 17:39.