3 ms·
> > - you need to be able to open files without user interactions (no file picker), in order to open playlist, MXF or MKV files; > That's what xdg portals are
by iggldiggl 6y ago
> > - you need to be able to open files without user interactions (no file picker), in order to open playlist, MXF or MKV files;
> That's what xdg portals are for: display a native file picker, pass the file descriptor. https://docs.flatpak.org/en/latest/desktop-integration.html https://docs.flatpak.org/en/latest/desktop-integration.html?...
This doesn't fulfil the "without user interaction" bit, though, does it? The problem with those "let the user pick a file and the program just gets an opaque file handle"-style solutions is that they break down for any kind of file format that implicitly or explicitly consists of more than one single, atomic file that can stand for itself and doesn't require accessing data stored in other files.
E.g. playlists (letting the user pick the playlist through the OS-blessed file dialogue isn't enough, as you also need to access all media files referenced by that playlist), any kind of multi-part files (multi-part MKVs, multi-part RAR archives, whatever...), subtitles (the current expectation is that if you open a video, the video player is able to automatically find matching subtitle files stored in the same directory), locally stored HTML documents (your browser might need to load additional CSS/JS/images/... and you might also want to follow any links without having to go through a file picker each time...)
- MayeulC 6y agoYou are right, I misread the quoted line. For now, I think you could use a directory picker, but that's not exactly ideal either.