Kodi Community Forum
overal zip support gets disabled after emulator install - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Game support (https://forum.kodi.tv/forumdisplay.php?fid=292)
+--- Thread: overal zip support gets disabled after emulator install (/showthread.php?tid=379996)



overal zip support gets disabled after emulator install - pduchesne - 2025-01-03

Hello,

I'm using LibreELEC 12.0.1 on a RPi 5, with a connected samba share.
Out of the box, I can browse to a folder, open a zip file, and run a ROM from inside the zip (in this case a SNES ROM).

After installing another emulator (I think PSX, maybe MAME), the browsing of any ZIP content is no longer possible.
Clicking on the zip does nothing, and forcing the 'play' action from the context menu only offers the Sinclair emulator option (which is not installed to my knowledge).

I could not find a way to revert that behaviour, other than reinstalling from scratch. But then it happened again after installing extra emulators.

Any clue ?


RE: overal zip support gets disabled after emulator install - garbear - 2025-01-03

I was able to reproduce your error - I had several emulators installed, and attempting to browse the zip did nothing.

I was on v21.1 (the same version used in LE 12.0.1) with some extra patches. Then I tried master, our v22 branch, and browsing the zip worked.

Can you try a nightly build of LibreELEC 13? If that works, we can figure out which change fixed it (I'm eyeing https://github.com/xbmc/xbmc/pull/26179 ).


RE: overal zip support gets disabled after emulator install - garbear - 2025-01-03

OK, I think I figured out what's going on. Do you have vfs.libarchive installed? When I run Kodi without vfs.libarchive, browsing the zip works.

The cause seems to be that vfs.libarchive opens the zip and sees my single file. However, it doesn't tell Kodi that it's a browsable zip. So Kodi tries to browse the zip using its samba implementation as a fallback. But samba fails to browse the zip, as it can only browse directories.

Long story short, there seems to be a logic error in the original VFS add-on implementation from 9 years ago. I think I've fixed the error, but I'll have to get some feedback from team members who have a better understanding of VFS add-ons. I'm opening a PR with my fix, I'll link it here when it's open.

EDIT: Here's the PR: https://github.com/xbmc/xbmc/pull/26224


RE: overal zip support gets disabled after emulator install - garbear - 2025-01-04

Hm, I determined that PR was too intrusive. I spent another 6 hours on the problem, and came up with a solution that I'm satisfied with: https://github.com/xbmc/xbmc/pull/26227

I'll try to get this in v21.2, due in a couple days. I'll also create an RPi 5 test build of LE 12.0.1 so we can verify the fix.


RE: overal zip support gets disabled after emulator install - zachmorris - 2025-01-04

(2025-01-04, 03:51)garbear Wrote: Hm, I determined that PR was too intrusive. I spent another 6 hours on the problem, and came up with a solution that I'm satisfied with: https://github.com/xbmc/xbmc/pull/26227

I'll try to get this in v21.2, due in a couple days. I'll also create an RPi 5 test build of LE 12.0.1 so we can verify the fix.

Does this potentially fix this annoying feature in Kodi?
I have an SMB folder mapped as a source in Kodi, lets call it 'SMB Downloads'
Usually, this folder only contains Video files. If the folder only contains Video files, selecting the file has Kodi play the file normally. All is well.
On rare occasion, I've downloaded a zip file to this folder.
Attempting to play the same video file as before causes Kodi to choke, stop responding (Windows pops up the 'Kodi has stopped responding' program interrupt window) if the zip file is in the same directory. I'll note the zip file is completely independent of the video file I'm attempting to play.
After deleting that zip file from the folder, all is well again.


RE: overal zip support gets disabled after emulator install - garbear - 2025-01-04

This is possibly fixed with the PR. I'm uploading test builds here: https://github.com/garbear/xbmc/releases/tag/retroplayer-21.1-20250103

If this isn't fixed with the most recent PR, I'll try to reproduce.


RE: overal zip support gets disabled after emulator install - garbear - 2025-01-04

@pduchesne Can you try my 12.0.1 test build for RPi 5 here? https://github.com/garbear/xbmc/releases/tag/retroplayer-21.1-20250103

It should fix the loading from zip error.

Note that "playing" a zip file will still only show fuse. As that is the only core that can load zips from the VFS (aka an SMB share). But it should be able to play files inside the zip , assuming the core has VFS support, which you can see here: https://kodi.wiki/view/Game_add-ons

Next, I'll augment Kodi to make it clear that cores can't play zips from the VFS like network shares. Moving the zip to the local disk will allow more cores beyond Fuse to show up (but only if you play the zip, not the files inside it). Playing SNES files inside the zip should work fine.


RE: overal zip support gets disabled after emulator install - pduchesne - 2025-01-04

Thank you for the suggestions and the investigation work.
I'm only catching up with your previous messages. In the mean time, i have been experimenting, and identified one exact sequence that causes the bug : 
 - install the ZachMorris 1.0.4 repository
 - install the IAGL add on 
 - install the Retro Bios addon
 - restart
(not doing the last step is what threw me off while experimenting)

I suppose this results in installing the lib you mention as a dependency.

Anyway, I'll try your new build asap and let you know.


RE: overal zip support gets disabled after emulator install - zachmorris - 2025-01-04

(2025-01-04, 18:47)pduchesne Wrote: Thank you for the suggestions and the investigation work.
I'm only catching up with your previous messages. In the mean time, i have been experimenting, and identified one exact sequence that causes the bug : 
 - install the ZachMorris 1.0.4 repository
 - install the IAGL add on 
 - install the Retro Bios addon
 - restart
(not doing the last step is what threw me off while experimenting)

I suppose this results in installing the lib you mention as a dependency.

Anyway, I'll try your new build asap and let you know.

IAGL has a secondary dependency on vfs.libarchive, so that makes sense.


RE: overal zip support gets disabled after emulator install - garbear - 2025-01-04

I've done a round of builds for all platforms now with the zip fix included: https://github.com/garbear/xbmc/releases/tag/retroplayer-21.1-20250104


RE: overal zip support gets disabled after emulator install - garbear - 2025-01-07

@pduchesne Can you confirm the fix with my RPi 5 build there? There's some urgency, as the v21.2 release is going out basically now. It's a "speak now or forever hold your peace" moment, as any bugs in my fix will be baked into the code for at least the next 6 months, if not a full year.


RE: overal zip support gets disabled after emulator install - pduchesne - 2025-01-09

Hum, i'm very sorry to read this only know, and to have left your urgent question unanswered.

Anyway, yes, it does work, thank you.
I have to admit it's a bit misleading at first to no longer see the zip, but directly its inline content (is that what it is ?), but in practice it does the job.

Am I correct in understanding that this problem only applies to SNES games, as that is the only emulator that can run files from within a zip ?

thx again,

--p.


RE: overal zip support gets disabled after emulator install - garbear - 2025-01-10

(2025-01-09, 14:53)pduchesne Wrote: I have to admit it's a bit misleading at first to no longer see the zip, but directly its inline content (is that what it is ?), but in practice it does the job.

This "collapsing" is the behavior of the My Videos window for at least 9 years now, and is kinda nice to save browsing into a zip file that contains only 1 file.

You'll notice that if the zip contains 2 or more games (or subfolders), then you can navigate into it as expected and it's not collapsed.

(2025-01-09, 14:53)pduchesne Wrote: Am I correct in understanding that this problem only applies to SNES games, as that is the only emulator that can run files from within a zip ?

No, this applies to all games. Loading files from within zips, or loading them from samba shares, (or from within zips on samba shares, etc), is called the "virtual filesystem" in Kodi. Of course cores don't know how Samba works, but using the VFS, they can still load the files. You can see which cores support loading from VFS here: https://kodi.wiki/view/Game_add-ons

The reason Fuse shows up for zips on samba shares, is because it's the only core that supports zips, and also supports VFS. If you move the uncollapsed zip (so containing 0 or 2+ games) to your local disk, context menu and click "Play", then you'll see all 30-something cores that support zips.

I'm working on a patch so that, if you play a zip on a samba share, then it'll show Fuse correctly, plus all 30-something other cores greyed out with a message "VFS files not supported" so that it's clear why the cores don't work with the game.