-
Notifications
You must be signed in to change notification settings - Fork 6
Create a forgotten favorites feature #38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Conversation
Nice, that looks promising. I think it would be neat to emphasize the "favorites" aspect of this a bit more, only including tracks that we're played a lot, or are actual favorites. What do you think? |
Only if you didn't play much else during the year. I have a lot of tracks I only played once at the start of the year, and you can see it only picked up the ones I played at least twice. The sort weights the play count. We can play with the weight value to fine tune the formula. |
Ahh yeah I didn't see that. Another problem I could see is that if there really isn't a "forgotten love", it would still create and show the list. That could contain something like "last played December 20th", in theory. Maybe we should add a threshold there? |
I've added a minimum last play age - currently set to 180 days, roughly half a year. I also added code to auto skip the forgotten favorites slide if no tracks are found. I coded it so we can easily use the auto skip logic for other feature slides. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the minimum age and auto skip. I think we can set the age lower, 3-4 months are probably enough.
Also, I'd like to stay consistent with the other features and only feature the first 5 tracks, with the remaining tracks in a plain list, to avoid scrolling and improve screenshotability on mobile. Could you please change that?
Also, you should add a padding to the description/subtitle on the feature (or limit the width in another way), so it can't stretch to the edges of the screen, as that looks a bit weird. Here's a picture:
26d981f
to
49ee145
Compare
Sorry about the force push. Commit ended up in the wrong branch :( |
Since all other features (top albums, top tracks, etc.) also list the top 20, and feature the first 5, I've adjusted that quickly. If it's more trouble than benefit, we can also leave it like this :) |
I can move it if you tell me to, but personally, I think we should be going the other way and moving things out of I'm a big believer of clean code standards and single responsibility. I like functions to do 1 thing - that way all the code in the function is pointing to 1 goal and 1 goal only. Sticking to this helps the code be cleaner, easier to maintain, and easier to write tests for. |
@1hitsong that sounds good and I'm also a fan of it, as long as things are consistent. So things like local variables setting the number of returned items are a bit icky. Maybe we could have some sort of global configuration/constant object that each function can then use to determine these things? What do you think? |
🤘 Heck yeah, I'm in for that! I'll open a ticket. |
Code Cleanup ticket created: #42 |
@Chaphasilor Anything else you need on this PR to get it merged? |
Creates a list of tracks weighted by play count and time since last play.
As part of this, I created a new
lastPlay
property. I know there is also alastPlayed
property, but it works differently , has a different default value, and is used all over the code, so I didn't want to change it or rework it as part of a new feature PR.Screenshot of feature

Fixes #18