Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Remote-Playlists #17241

Open
alec4 opened this issue Dec 8, 2024 · 5 comments
Open

[Feature Request] Remote-Playlists #17241

alec4 opened this issue Dec 8, 2024 · 5 comments
Labels
feature request New enhancement to RetroArch.

Comments

@alec4
Copy link

alec4 commented Dec 8, 2024

Hello Libretro Team,

it would be great to define "Remote-Playlists", which could Download the Content-Files from a Webserver.
The Idea is the following, in the "Import Content" Menu would be a new Entry "Remote Content".

There would be then the following entries:

  • Content-Items URL: thats a URL from where a JSON-File should be downloaded with the Items, I append an example below.
  • Username: Optional User Field for a basic authentication
  • Password: Optional Password for a basic authentication
  • System Name: Analog to the "Manual Scan" a selection of the following entries: , & and the Databases
  • Custom System Name: Analog to the "Manual Scan" a field for the Custom-Name
  • Default Core: Analog to the "Manual Scan" an option to choose the Core for the Content
  • Start Scan or Create: Which would Download the JSON-File and would create the Playlist then.

Here is an Example of the JSON-File which i think it could handle every relevant action.

{
    "version": "1.0",
    "items": [
        {
            "url": "http://my-server-ip/ROMs/SNES/Diddy's Kong Quest (D, F, E).smc",
            "file_name": "Diddy's Kong Quest (D, F, E).sfc",
            "label": "Donkey Kong Country",
            "thumbnail_boxart_url": "http://my-server-ip/ROMs/SNES/Diddy's Kong Quest (D, F, E).png",
            "thumbnail_snap_url": "http://my-server-ip/ROMs/SNES/Diddy's Kong Quest (D, F, E)-snap.png",
            "thumbnail_title_url": "http://my-server-ip/ROMs/SNES/Diddy's Kong Quest (D, F, E)-title.png"
        }
    ]
}

Where I think the Thumbnail-Fields should be optional (just to download them if the are defined).

Or it could also be an option to have the url and file_name fields as array in plural to support multi-disc or multi-file roms:

{
    "version": "1.0",
    "items": [
        {
            "urls": [
                "http://my-server-ip/ROMs/PSX/Resident Evil.cue",
                "http://my-server-ip/ROMs/PSX/Resident Evil.bin"
            ],
            "file_names": [
                "Resident Evil.cue",
                "Resident Evil.bin"
            ],
            "label": "Resident Evil",
            "thumbnail_boxart_url": "http://my-server-ip/ROMs/PSX/Resident Evil.png"
        }
    ]
}

It would be nice when I create the playlist in the Retro-Arch, it would download the JSON and the Optional Thumbnails with the right naming conventions.
When I first want to launch a game from an "Remote Playlist" it should download the Content-File(s) from the URL(s) (probably in the "download" folder or a subfolder which already is used for the Cloud-Sync-Process). It should check always if the file already exists and probably redownload it.

This would be a feature which could solve 2 goals for me (and I think for others to ;)).

  1. One central place to manage all ROMs with multiple Client-Devices (Smartphone, Apple-TV, Laptop, and so on).
  2. On an Apple-TV when Apple decides there is not enough space left and delete some files, i haven't to care because the file would be redownloaded when the game is started the next time.

I hope you think this is useful and best regards
Alec4

@alec4 alec4 added the feature request New enhancement to RetroArch. label Dec 8, 2024
@hizzlekizzle
Copy link
Contributor

While it would indeed be very useful, we have purposely avoided adding anything like this because it would make RetroArch into a one-stop piracy machine. Kodi ran into a lot of legal harassment when they indirectly added similar capabilities through their plugin system.

@alec4
Copy link
Author

alec4 commented Dec 9, 2024

Oh, that's a fact which I hadn't in mind🙈.
That could be a problem I see that.
Would it be an other option to create a scan option for a webdav or smb server/directory (I would prefer webdav, because that I already have also for a other reason) to import contents? or do you think that could also be a problem with piracy terms?

I don't want that you get some problems and you make a great job, but I thought I could make an issue to find a way to create ab global roms-management.

@i30817
Copy link
Contributor

i30817 commented Dec 12, 2024

You can already do this, if you have a OS that is not a unconfigurable walled garden. A path is a path is a path. A webdav or nfs server can be mounted by the OS then used for instance. Hell I used to mount a copy on write filesystem for dos games before I started RetroArch and my dos (and x68k too) playlist only had paths there (so the games didn't self modify).

If you ARE in a walled garden like android, you're shit out luck because RetroArch doesn't implement the blessed way to access and record authorizations for network file paths (in android, the SAF: storage access framework).

Ironically in android this only requires using the android file chooser to access network paths plus a 3rd party plugin for the filesystem you want (RSAF implements "filesystem" mounts for webdav, nfs and samba with rclone for instance, if you configure them after installing the apk).

So emulators that use the native file chooser do work without extra code afaict, if not always quite well if they're too smart for their own good (Dolphin playlist might delete itself on a timeout if you open it without the drive available, for example if your server is down or waking up from wake\boot on lan).

The problem is that RetroArch wants to use its file chooser, everywhere and it's a deeply held assumption of all the code, and in android, for unobvious sandbox escaping reasons you can't simply pass a path to RetroArch instead to use the Files app (and thus SAF). Instead all apps that want to use these special mounts must call the api to open a android filechooser from the app itself, so it can record the user authorization and the app that requested it.

Ironically, you only would really NEED to call the file chooser in the scanners (manual and otherwise) file selection options. AFAICT, after getting the path you can operate on subdirs and file paths without any problem in other apps.

Although RetroArch might want to do a option that allows authorizing paths (with the native android file chooser) instead that saves them in a "home page" for its file chooser (scummvm android does this). It would allow future existing playlist backups for android to keep working without recreating them and maybe even portable playlists too (if the file chooser home dir can be changed by first "authorizing" a remote dir then changing it in the usual RetroArch file chooser with a bookmark).

@alec4
Copy link
Author

alec4 commented Dec 13, 2024

Thank you for the explanation, unfortunately I am in a walled garden🙈, which is called tvOS from apple.
On my other devices, i mounted (like you explained) my roms directory and imported them with the manual scan.

I don't want that you have to make a large change which not fit's in the RetroArch architecture, but I thought that it would possible to import Files from a webdav server, because it would be easier to implement (just a PROPFIND HTTP-Request to scan a directory and a GET HTTP-Request to get the ROM-Files), I didn't know or care about the android privileges, but I thought that should be no problems because RetroArch already can access a webdav server with the Cloud-Sync-Feature.

By side the Apple-TV I can help me by my self, but I think this can be make a more comfortably way to. And I would understand if you are thinking that would not be a good idea or to complex to implement it, it was just an idea.

Thank you for your great work!

@i30817
Copy link
Contributor

i30817 commented Dec 13, 2024

I don't know how or even if this can be done in apple devices, since I don't have one, I'm just pointing out a alternative for Android remote games that already exists for other emulators using the native filechooser and could easily be implemented in retroarch. A android only "authorize external paths" button that just opens the native filechooser with the right settings and a shortcut in the RetroArch filechooser to get to those paths would be enough.

Apple was always much more controlling than even google, terrible company, wouldn't be surprised if you had to root the device to mount a network filesystem at the OS level and use it outside the files app.

Anyway, I think hizzlekizzle response clarifies why this functionality will not happen for anything but saves, easy way to get banned from app stores, or even be prosecuted by psychotic companies like nintendo...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New enhancement to RetroArch.
Projects
None yet
Development

No branches or pull requests

3 participants