Video View For All Themes
-
@jdrassa that's true, we need to test if can be done without issues...
-
I did some testing tonight with my EmulationStation build in windows and it worked exactly how I anticipated above. The video element broke the parsing of the theme, but the marquee image and including "video" in the name attribute of a view element had no effect and the theme worked as expected.
One thing we could do to try to prevent this if/when grid view is incorporated would be to tweak the theme parsing code so that it is a little more flexible and having it log and ignore unexpected elements vs. throwing an error and failing to load the theme.
-
@jdrassa agreed. I just tested and got the same results:
lvl0: from theme "/home/pi/.emulationstation/themes/pixel video/snes/theme.xml" (from included file "/home/pi/.emulationstation/themes/pixel video/snes/../pixel.xml") Unknown element of type "video"! lvl0: from theme "/home/pi/.emulationstation/themes/pixel video/retropie/theme.xml" (from included file "/home/pi/.emulationstation/themes/pixel video/retropie/../pixel.xml") Unknown element of type "video"!
Perhaps some of the stuff @fieldofcows is working on with metadata may help with this. Still doesn't really fix backward compatibility but then again we are looking toward the future and there is only so much you can do.
-
@Zigurana said in Video View For All Themes:
Let's put it differently, why would someone not want to upgrade their ES? If there are relevant issues, those should be adressed.
I'm personally not planning on updating ES because I have it working how I like it, and I'm too lazy to go through the hassle of fixing any potential breaks caused by updating. I also have no real interest in video previews, but people have asked about it for MetaPixel, so I'm going to have to look into it anyway.
-
I had a quick look at this last night. What I was looking for was a way to write the theme whereby older versions of ES would just ignore the unsupported new functionality.
Going forward it makes sense to build this into ES - we can either just warn about and ignore unknown tags rather than aborting or we could implement some sort of versioning. However this doesn't help for anyone that does not what to update their ES.
I did have a quick try to see if I could introduce some version checks that older ES would ignore with some success. If you put something like this into your theme:
<version minimum="5"> <view name="video> <video name="md_video"> ... </view> </version>
All of the above is ignored by older versions of ES. I could then implement and submit a change that checks the version tag when parsing the theme and conditionally includes the XML within the version elements if the version is greater or equal. I don't think it would be too hard to do this and would allow us to make breaking changes to themes whilst maintaining support for older ES. It would mean a bit more work for themers though because they would potentially need to test on multiple versions of ES.
-
@fieldofcows I agree, this doesn't help for anyone that does not want to update their ES, so instead implementing this and make things difficult for theme developers, it's more easy for everybody to update ES, or we can try the two main.xml thing...
-
@Nismo Hah! bugger me, I'm a themer that doesn't want to update ES. Looks like I'm screwed :D
-
@mattrixk you don't need to update if you don't want, what I mean is for doing what @fieldofcows said about theme versions, you will need to update, so no sense for people that doesn't want to update.
I mean there is no sense on theme versions (that make things more difficult for theme developers) if people will need to update their ES to use that feature anyway.
Because we are trying to find a solution to help people that doesn't want to update ES, that's because no sense. A solution without the need to update.
I hope it's more clear now, sorry english it's not my native language.
-
@Nismo Hmm... I'm not sure that's what I envisaged with my suggestion.
In looking for a solution I was trying to satisfy the following, where "New ES" supports video and "Old ES" does not support video.
- Existing themes that do not support video work on both New ES and Old ES without error
- Themes that have been updated to support video work on Old ES as well but obviously without video support (warnings are fine in the console but the theme should still work)
- Theme writers can continue writing and testing non-video themes on any version of ES
- Theme writers can write video supported themes on New ES
If we make a change to New ES that supports a new <version> tag (or similar) then we can satisfy all the conditions above.
The extra work that I referred to for themers is that if they way to support video in their themes and also be backwards-compatible with Old ES then they need to include the <version> tags as well as testing on Old ES (or getting someone else to :) )
-
@fieldofcows As far I now... new video themes doesn't work on old ES. Read a few posts ago... and that's the only problem we have...
-
@Nismo said in Video View For All Themes:
@fieldofcows As far I now... new video themes doesn't work on old ES. Read a few posts ago...
Yes, hence wrapping the video view tags in <version></version> which is ignored by old ES, allowing the theme to load without video support.
-
@fieldofcows wrapping the video view tags in <version></version> will work on old ES out of the box?
-
@Nismo said in Video View For All Themes:
@fieldofcows wrapping the video view tags in <version></version> will work on old ES out of the box?
Yep. I tried it. Anything inside <version></version> (or any other unsupported tag for that matter) is silently ignored by old versions of ES.
-
@fieldofcows Then yes, that's the solution for all our problems.
-
@fieldofcows My theme it's being made with video support in mind so if I don't include version tags it still working with latest ES? Just because if I do that, I need to modify a lot of lines of code... and my theme desing it's not made for old ES.
-
@Nismo I haven't made any changes to support the <version> tags yet :) But when/if that change is made the use of the tags will be purely optional: if you want to support non-video ES then you can use the tags, if you don't want to support non-video ES then you can leave them out.
-
@fieldofcows And what happen when apart from video view you use things like this (from carbon with video support):
<view name="basic, detailed, video">
I use it on my theme too, and don't remember but in pixel theme uses it too...
I suposse we need to divide the views to make it backward compatible and place the version tag...
Anyway i think your solution it's the best one for all...
-
@Nismo said in Video View For All Themes:
@fieldofcows And what happen when apart from video view you use things like this (from carbon with video support):
<view name="basic, detailed, video">
I believe that is already ignored by the non-video ES.
-
@fieldofcows Yeah I imagine that, we need to separate views in order to place the "version" tag. It's a little bit more work but that way we can have the compatibility we are looking for...
-
So I think if finally we use the "version" workaround, the themes uploaded to github must be backward compatible so no problems for anybody...
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.