Skip to content
This repository has been archived by the owner on Oct 10, 2024. It is now read-only.

Green Circle for Cached Song's #33

Closed
arbintm opened this issue Jun 10, 2022 · 10 comments
Closed

Green Circle for Cached Song's #33

arbintm opened this issue Jun 10, 2022 · 10 comments
Labels
enhancement New feature or request

Comments

@arbintm
Copy link

arbintm commented Jun 10, 2022

Feature description

Cached Song's to have a green circle or somthing,

Why do you want this feature?

To know wich song on playlist we can listen offline , to listen the other to make all playlist cached .

Additional information

No response

@arbintm arbintm added the enhancement New feature or request label Jun 10, 2022
@vfsfitvnm
Copy link
Owner

This is possible to do, but it will have a dedicated settings section

vfsfitvnm added a commit that referenced this issue Jun 21, 2022
@vfsfitvnm
Copy link
Owner

I tried to implement such feature, but there was a huge performance drop. The cache data (managed by exoplayer) and the song data (managed by me) are in separate databases, and I had to perform a stupid (expensive) procedure to retrieve the cache data for every song - so I just couldn't to it in bulk.

Instead, I added a "Stats for nerds" that also shows the cached percentage (more info: https://github.com/vfsfitvnm/ViMusic/releases/tag/v0.1.7).

I think this is a good compromise.

@f2e6
Copy link

f2e6 commented Jun 23, 2022

I don't know exactly how all of this works, but it would be nice if all hearted songs get cached/downloaded kind of like spotify.

@vfsfitvnm
Copy link
Owner

@Edl2 All songs are already cached when you play them

@vfsfitvnm
Copy link
Owner

@arbintm
Ok, I changed things a little, there are no performance issues now: I think I can now implement a dedicated section.

Could you elaborate your use case?
Note: Since v0.1.7 is possible to view the cached percentage of the song you are playing.

I guess you want to have some sort of offline mode where you can play songs without worrying about the internet connection. If so, would you show a sketch or describe where do you want to see it?

@f2e6
Copy link

f2e6 commented Jun 28, 2022

@Edl2 All songs are already cached when you play them

It would be amazing if there were an option to only have liked/playlisted songs cached, and remove cache of other songs upon closing the app. kind of like "offline mode" on spotify. (also it would appear to be a cache limit that can only go but so far, maybe make it be able to be unlimited, because i like having a lot of songs offline.)

@vfsfitvnm
Copy link
Owner

@Edl2 All songs are already cached when you play them

It would be amazing if there were an option to only have liked/playlisted songs cached, and remove cache of other songs upon closing the app. kind of like "offline mode" on spotify. (also it would appear to be a cache limit that can only go but so far, maybe make it be able to be unlimited, because i like having a lot of songs offline.)

I think I can make an option (in Settings > Other) "Clear orphan songs cache" that frees some memory when tapped. I don't want to make this an automatic feature because I doubt it would be used frequently. I mean, that would make sense if you never listen to the same song and you listen to music 24/7.

Regarding the cache limit, it can be definitely increased or uncapped - I picked 4GB because of a UI reason

@f2e6
Copy link

f2e6 commented Jun 28, 2022

You could keep it at 4gb for UI reasons, and just make the amount clickable to manually enter a cap. The "clear orphan songs cache" seems like a nice solution. :)

@vfsfitvnm
Copy link
Owner

2e542d3

There will be a built-in playlist that contains 100% cached songs. This is how it will look:

Screenshot_20220706_213850

I think this issue can be closed now.

@Pittermaennchen
Copy link

I guess the "Cached"-Playlist, you mentioned is now called "offline" right, @vfsfitvnm?

But I listened to a song and it is still not cached there. Why is that? (I upgraded the cache in the settings to 8 GB)

Thank you for your awesome work!!

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

No branches or pull requests

4 participants