finamp
finamp copied to clipboard
Add support for Linux, maybe publish on Flathub
Hi, I just tried Finamp and I gotta say it's a pretty great way to listen to Jellyfin music. I was wondering if you wanted to add support for Linux, since this is built with Flutter. This way we could use it on our desktop PCs as well as on the new Linux phones.
Publishing on Flathub would be an added value, you can look at Fluffy chat as an example for another Flutter app that has been published on Flathub.
I'd love to create a Linux version, but not all Flutter packages run on all platforms. Many use platform code to use native Android/iOS stuff. Here are all of the packages that are currently incompatible with Linux:
- device_info (Used to give Jellyfin device info)
- package_info (Used to give Jellyfin device info)
- cached_network_image (Image widget that automatically caches image to save bandwidth)
- just_audio/audio_service/audio_session (The packages that handle audio playback)
- flutter_downloader (Handles downloads)
- file_picker (Used to select custom directories)
- permission_handler (Used to request storage permissions for external directories)
The only packages that are really essential there are the audio packages. I could probably create a desktop interface for device_info and package_info. On desktop, caching images isn't so important, so I could use the normal image widget on desktop. Downloading songs isn't so important on desktop, which would remove the need for file_picker too. permission_handler won't be needed on desktop (it might on macOS, but this issue is about Linux). Of course, this still means that the app won't work on desktop in its current state, unless you want a music player that doesn't play music. The audio packages are actually supported on macOS, so I might work on some desktop stuff for a potential macOS release.
As I mentioned in the PR, I'm not a dart/Flutter developer, but maybe one could re-implement those interfaces to work on Linux? Or possibly request Linux support for the original libraries?
Windows/Linux support is being worked on for just_audio. The issue can be viewed at https://github.com/ryanheise/just_audio/issues/103. They're working on using VLC for the backend. For audio_service, a "default audio service" was added since Desktop doesn't rely on platform stuff for background playback (https://github.com/ryanheise/audio_service/issues/609/https://github.com/ryanheise/audio_service/pull/632). audio_session may not be required, since that package is meant for configuring the audio player for pausing during calls and stuff.
I might have a look at contributing to the just_audio issue, and I might look into adding MPRIS (and whatever Windows uses) support to audio_service, since the default implementation doesn't really do anything special. No promises though :p
Any work is highly appreciated! Besides if someone else wants to jump in and contribute, this is already a start :)
device_info and package_info could be replaced by the "plus" packages that both have desktop support. https://plus.fluttercommunity.dev/
Since everything but flutter_downloader worked on macOS, I tried a macOS version. It technically works, but I've basically just commented out everything related to downloading, which makes the app a bit janky. There are some other issues, such as the settings stuff not loading properly and the progress bar not working. I've pushed the changes to the macos branch if any macOS users want to try messing about with it themselves (not recommended). I'd still like a proper desktop release in the future.

Did you put a deadline for releasing Finamp desktop client? I think Flutter for desktop is somehow mature now
It won't be a thing by next release, but maybe the release after. There are three major things that I would have to do:
- Add desktop support to just_audio. This shouldn't be too hard since it'll just be a wrapper around dart_vlc.
- Create a new download plugin. flutter_downloader is basically entirely native code, so adding desktop support to that would be difficult. Also, flutter_download is a bit buggy with things like download callbacks (this is why download indicators are jank). I'll probably make the plugin in Dart instead of native code for better compatibility.
- Make the UI desktop-friendly. The current phone layout won't look right on a big display, so I'd need to mess around with the UI. This would also bring improvements to Finamp on tablets.
It won't be a thing by next release,
I'm really glad to hear that from you and I wish to see the package in the next release. Thanks a lot
just_audio just got Windows and Linux support 👀
Posting an update since this issue hasn't had one for a bit:
The Windows/Linux package I mentioned above has been discontinued as it wasn't production ready and the Linux implementation wasn't very good - it created a webview to play the audio in an <audio> tag. There have been some recent developments in https://github.com/ryanheise/just_audio/issues/332 with a proper win32-based package for Windows and an mpv-based package for Linux. The mpv package is a bit early on still but it looks very promising and I personally really like mpv so I have no objection using it.
This all means that I can effectively cross of the GStreamer-based package I was going to make (referenced here). Once I've created the new download package (#213), I will be able to make an initial desktop release. From there, I will create a proper desktop UI, which has the added benefit of improving Finamp on tablets.
Very nice to know :-).
Since that part is going to be revamped, it would be nice if - when the Linux Desktop arrives - a Linux Mobile is also provided, which is basically Linux Desktop with the UX of Android/mobile
The UI will be adaptive so it should show the mobile form factor on mobile displays
Just leaving this here for myself: Flutter sort of supports Linux ARM targets but it needs to be run from a Linux ARM host. https://github.com/flutter/flutter/issues/60678
ARM support should be doable, setup was basically the same as x86 (this is running on Asahi Linux)

Please release this for Windows and MacOS as well.
For Linux, I would prefer it to be release as the following package types...
AUR Pacstall Flatpak
Desktop support will likely come on all platforms at once, it'll just take a while. I should be able to publish on all of those package managers, and I'll also provide a deb, rpm, and a tar.gz of the build for other distros.
Any update on this? Just trying out jellyfin for the first time and would love finamp on desktop.
The main thing that needs to get implemented is #213, as that is needed for desktop.
I could just rip out downloads for desktop, but that would be an annoyingly involved process (in hindsight, I should have made it more easy to enable/disable downloads).
Ripping out or disabling downloads would also make it less useful for mobile linux.
Well, for now, I'd love to have Finamp on desktop even without downloads. Downloading being implemeted in the future would be awesome (Especially for Linux Mobile, as mentioned) but I can live without it. Your call, of course, just glad to see there's an effort to get it on desktop at all
Even without downloads, desktop version of Finamp will be very useful. I don't need downloads on my laptop because 99% of time I have working internet connection, as many other people too I presume.
Yeah its very unlikely that you're on a desktop without internet. There will still be a few things other than downloads that needs to be done for desktop (UI, ensuring audio works well), so I won't get this done now. I've started writing in detail what needs to be done for #213, see the linked document there for info.
Hopefully this will see the light, it would be super helpful to have a windows client.