dkanada / gelli

Native Music Player for Jellyfin
GNU General Public License v3.0
527 stars 41 forks source link

Offline Sync Last Added #64

Open screwfaze opened 4 years ago

screwfaze commented 4 years ago

I know syncing for offline play is not implemented yet but when it is can we please have option to sync last added songs?

Thanks

screwfaze commented 4 years ago

Any update on this feature request pleaseeeee? I really love the app and want to use it daily but there is no data where I am listening to music so please can you add this?

Thanks

dkanada commented 4 years ago

No updates, haven't felt like adding it yet. I almost never need offline playback so it's not a high priority for me.

screwfaze commented 4 years ago

No updates, haven't felt like adding it yet. I almost never need offline playback so it's not a high priority for me.

Guess I will have to keep using dsub then but keep up the good work mate.

zombiehoffa commented 4 years ago

I'm in the same boat screwfaze "damn this is nice but I need a way to sync all or a chosen subset of my collection to my phone as mp3s for offline listening since I leave the house sometimes." dsub and airsonic it still is for now since I am not a programmer (yet).

dkanada commented 4 years ago

I have no estimate for true offline support, but I'm currently testing recents caching on a local build. As long as the phone is online to access metadata, the songs themselves would get cached to reduce data usage. There's no way to request a cache manually though, it happens transparently while the songs are downloaded for playback.

screwfaze commented 4 years ago

I have no estimate for true offline support, but I'm currently testing recents caching on a local build. As long as the phone is online to access metadata, the songs themselves would get cached to reduce data usage. There's no way to request a cache manually though, it happens transparently while the songs are downloaded for playback.

How are you getting on with this? Any chance you have a version I can test.

dkanada commented 3 years ago

Caching and proper downloads have been added, but can anyone explain what this feature would look like with some examples in other services? Should it sync in the background, what options should be available, et cetera?

zombiehoffa commented 3 years ago

How I use this feature in dsub with airsonic as the backend is I tell it to download most of my collection transcoded as mp3 of a certain bitrate, which I then use to play my music when I am not home. When I am on my network it streams my music as flac from the airsonic server.

In airsonic this is accomplished by starring all my albums and having it set to download starred items in a specific format. It would be better to just set default behavior and then flag stuff to nit be transcoded and Downloaded.

kevincox commented 3 years ago

In my mind it should be a background sync and most things in the app should work offline. (Offline-first if you will.) So probably cache and sync all library metadata (IDK if some people have libraries too big for this but it seems unlikely, but eventually someone will want to filter what they see on their phone anyways so that is something to keep in mind) then the app can just use that. (maybe if online it can try to use the server first? However personally I would prefer the snappiness of the offline cache anyways.) Then there would be some way to select what to download offline (precaching). This could be "pinning" an album, playlist or song for offline. (or the favourites list) then those pins would be kept up to date, even if those albums or playlists change.

It would also be good to have an offline mode, where everything that isn't downloaded is filtered out. (This is actually quite hard to do well as you probably want to filter out albums and playlists that have no songs downloaded as well, which can be a little difficult to do efficiently)

An advanced feature is auto-rotating downloads. For example I could say "download me 2GiB of music" and it pre-caches that on my phone, then slowly cycles the cache as I listen to it.

screwfaze commented 3 years ago

What @kevincox above said, basically like how GPM(sorry best app I used with offline sync) used to work where almost everything was cached offline and you had an option to filter downloaded only mode or online but you could search, filter and do everything else offline and did not feel like the way you navigate the app changed at all.

Thanks

rigrig commented 3 years ago

Caching and proper downloads have been added, but can anyone explain what this feature would look like with some examples in other services? Should it sync in the background, what options should be available, et cetera?

What I think Syncing would ideally look like:

Some ways to select what to sync:

Some way to view synced items:

Settings for when to sync:

A Sync button in the main menu with dynamic behavior:

Sync behavior:

Sync state:

Sync mode is in one of five states: "disconnected", "paused", "stopped", "automatic" or "manual".

All states except "Stopped" keep running in the background and show a notification
I think this state diagram covers it all: image
(I cheated a bit by just restarting whenever settings change, but things seemed complicated enough already)

Background Sync operation: (both Manual and Automatic)

rigrig commented 3 years ago

Also

What I think a minimal implementation could look like:

Some ways to select what to sync:

Some way to view synced items:

Settings for when to sync:

Sync behavior:

Sync state:

Sync mode is in one of three states: "disconnected","stopped", "automatic".

All states except "Stopped" keep running in the background and show a notification
State diagram: image

Background Sync operation:

kevincox commented 3 years ago

Oh, we also forgot an important point. When offline metadata changes need to be tracked and applied when you come back online. For example:

  1. Add to playlist.
  2. Add Favourite.
  3. Play counts. (is this tracked?)
  4. Delete.
  5. Metadata operations (like track name)
TomRomeo commented 3 years ago

I'd really love this feature