jmshrv / finamp

A Jellyfin music client for mobile
Mozilla Public License 2.0
2.01k stars 130 forks source link

[Feature Request] Ability to listen to already cached/listened songs for offline listening #90

Open Extarys opened 3 years ago

Extarys commented 3 years ago

I love seeing what part of the song was already buffered. I would suggest a setting to set a cache limit and cache already listened songs. Those would also be available when offline. I listened to a song, waited till is was fully cached and turned offline mode. The song wasn't available, obviously. that feature could save some headache on frequently listened songs without the end user having to manually download them.

I would make the cache quite dumb, when the limit is reached just delete the oldest played cached song.

Also add "big" numbers 1GB, 2GB, 5GB... and unlimited. I believe Audinaut have a similar setting if a contributor or the author wants to take a look.

jmshrv commented 3 years ago

Caching is supported by the audio player that I use, so it could be implemented. Just wondering, why don't you just download what you want to play?

Extarys commented 3 years ago

Well I just play tracks I like without really thinking about downloading them necessarily. I previously downloaded a playlist for offline use and when I had no cell service I wanted to play another track I listened to like the day before but it wasn't on the playlist.

I kind of hate the workflow of adding songs to playlists currently on the jellyfin web interface if I'm being honest so I tend to forget to add new songs to them :joy: It's kind of a chore hahaha

But this isn't a priority, just a general feature suggestion. Would avoid surprises.

EDIT: Like audinaut, the blue download arrow could be gray-ish is the song was automatically cached and not downloaded explicitly by the user for example.

jmshrv commented 3 years ago

That makes sense, I'll look into it :)

bbigras commented 3 years ago

I think Google Play music has a nice feature that allowed to download the music ahead in case you take the subway and lose internet.

joszz commented 3 years ago

+1 this is the number 1 feature I miss. I used DSub with Subsonic for ages, but Subsonic is just old, not maintained and generally not very stable. I'd love to have this feature back!

For me I just want to play songs and have them cache, so I don't think about it just like the poster but also to preserve some bandwidth not having to stream the song over and over. I'm lazy as well, and just like this to seamlessly work. The stream is coming down the pipe anyway, just having it store on disk doesn't seem like a huge effort (I think, but ofcourse could be wrong :))

This and an implementation for offline artist view would just make this perfect for me.

Extarys commented 3 years ago

Thinking about it, right now manually downloaded songs are raw/not transcoded no matter what the transcode setting is. Caching songs "on the fly"/as you listen to them would cache the transcoded version of it if the setting is enabled, saving space on the device. 2 birds with one stone - poor little birdies.

For @bbigras comment, yeah maybe caching the next X songs of the queue in advance could be nice.

BloodyIron commented 1 year ago

@jmshrv is this the earliest issue on this topic? I see at least a few possible duplicates that we may want to close (plus answer outstanding questions in them, in here) #239 (which I just posted in) #185 maybe others?

Tidying up issues may help your sanity on this project ;) Appreciate your work!

jmshrv commented 1 year ago

Thanks for pointing those out!

Just to add a bit more detail, just_audio has LockCachingAudioSource, which looks like it does what this issue wants

Extarys commented 1 year ago

@BloodyIron Sorry, it looks like I missed those back when I created this.

BloodyIron commented 1 year ago

@Extarys I'm a fan of caching the whole album (or playlist) automatically when I'm on WiFi, and caching only a few songs when on cellular. This difference in settings in dsub was particularly useful. If that difference could eventually be a thing (and do this by # of songs) that would be great.

But in the interim, the cache length based on (time?) will probably work as a stop-gap solution. :)

Again, I'm seriously impressed by how fast Finamp caches/downloads... it's as if its actually using the proper bandwidth available to it ;P (dsub cached pretty slowly IMO)