-
Notifications
You must be signed in to change notification settings - Fork 586
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
[Feature Request] Automatically rate songs #2621
Comments
I do this as a sql script from my own installation but something in the catalog update sections would be pretty simple. A plugin would also be easier as there are plugin methods that i think would work.
You are reading my mind because i was thinking about moving this into ampache but i didn't work on it as i thought i was the only one actually interested in this. |
In a library i have been rating for years and still only rate ~10% of my collection. Which i actually don't think is that bad, you can't rate everything or it will make the ratings meaningless. The issue will be how other people use stars this is how i arrange my ratings, So what i would propose is:
The plugin would need a row for each star and heart with a list of rules.
I think we could put in a lot more but that's at least a start. |
part 1 is in now. edccc26 The rating match plugin will raise the album and artist value if it's lower than the current song you're rating.
i'll probably expand on this plugin some more but the other parts of automating this might be better in the catalog processes. |
extended for flags as well |
@ncot-tech i think the hardest part about auto rating is the plugin settings. I was thinking a row for each star value
Then the setting string would be a comma separated list of ($plays,$skips,$ratio) so i can explode that out.
Is that enough? i think it's okay, but this is how i would use it.
does this make sense enough for you? I think it's the easiest way to to this. |
i've tested this out with a few tracks i've found and a play,skip setting is a bit easier to manage. Commit is cbda558
I've tested by running a query to see which songs would be hitting the rule and playing. if you want to test yourself here is my query (make sure you change your user)
|
Yeah that looks pretty cool. I would have replied earlier but I've only just realised github doesn't send notifications... But that does also mean this plugin has made it into the latest release. I've got it set like this at the moment. The numbers are completely made up but feel reasonable maybe. If I've understood this right, listening to something twice should give it a 1star rating, 5 times gives it a 2star rating? Will it upgrade a track based on these settings? So if I have a 1star rated track that I've listened to 4 times, then I listen to it again it'll get changed to being a 2star track? Changing a rating up should be OK, but changing them down might not be a good idea thinking about it. It feels like trying to get the system to change the ratings and the user being able to do them could cause confusing conflicts. However having it as an automatic suggestion seems good. If I add some new music and play it quite a lot, it might get enough listens to earn it a 3 or 4 star rating, I will then notice it appearing in playlists and can fine tune it later by hand. For the junk tracks I either delete them entirely if I really don't like them, or click the "do not play" button next to them so they just go away. |
Rating match does run each play. I'll confirm that the rating is raised (but it should be) Moving down def doesn't happen, rating match only raises |
I had the same problem of wanting to get things rated, but jamming out enjoying the music so much that i forget to rate.... here was my idea: #2735 Will definitely checkout the plugin, thanks! |
so the play count will raise the rating based on the number of complete plays of the song? at first I was not sure what the skip part of the value was even for. but based on @lachlan-00 example for Match rule for 2 stars of 1,10 I am going to assume it means if a song is played all the way through atleast once AND has 10 skips, AND is not currently rated or rated as 1 star then set the rating to 2? If I am understanding the logic correctly then I could set Match rule for 1 star to something like 0,30? so that if I have never played it through all the way but have skipped it 30 times then it should be rated 1 star.... i can also think that maybe you accidently listed to the song atleast once.... because you were preoccupied..... for example Match rule for 1 Star |
Also I am not sure if I like that this plugin also sets the Artist and Album to the very highest rated star value whenever you rate a song. For instance there are some albums and even artists that have like 100 songs across 7 albums, and I have rated 2 of their one hit wonder songs as 5 star, but most of the rest of their songs I have rated 1 or 2 stars..... I think I would rather it average the ratings set for their songs and set the artist and album based on the average, possibly even round up, so if the average is 3.6 then set the rating to 4, etc, you could even go to the next whole integer regardless of rounding which would bias it towards voting up, so that even an average of 3.1 would be rated 4 star.... For now I have disabled the plugin because I do not want "one hit wonder" artist and albums getting rated at 5 star.... |
you can disable the match with |
scratch this comment. setting the 2 settings above will block updating |
so I should set it like this? It does seem to stop it from updating the artist or album rating... but im not sure the per song rating is still working, I found a 3 second track in my library and played it 10 times in a row but it never got a rating.... going to turn on debugging and see if I can check what is happening. EDIT: it does work, seems I just could not listen to the track over and over, but by listening to the track, then hit the home page again, then listen to the track, then hit the home page, after I did this a few times it tracked it and set a rating. EDIT2: well I thought it was working, the track finally got rated 3 star, but im up to 20 play counts now and it is still 3 star, it has not progressed to 4 or 5 star. |
I was thinking instead of $play,$skip what about something like $play,$play_percent ($play_percent = $play/$skip, would need to do if skip=0 then play_percent=100 or something... ) For example lets say I have Match rule for 5 Stars: 10,0 What happens if I have listened to the track 20 times, but skipped the track 80 times? does it still consider that a 5 star track? EDIT: I guess it would be more accurate to call it a play_ratio instead of play_percent..... |
I had a thought about it not becoming a 4 or 5 star.... didn't you say that if it has a rating then a new rating does not get set? |
I've been trying to think of a good way to set this up differently. The hardest part is trying to fit 2 values into 1 setting. If you say 100% plays to skip for 5star. 1 play/0 skips is 5 star. 500 play/1 skip isn't. The current setup of play,skip isn't great but isn't the worst either it's just terrible to explain. What if you could set a smartlist for rules instead? It's actually more along the lines of what I do for rating and might actually make more sense. Song title contains instrumental OR length > 1 min Played by me 5 times and skipped by me 0 I like the idea of extending search more than extending the plugin. The. We can have an option like (if already rated don't change) etc etc I think this would solve a lot of issues? |
so you could use the search feature to apply ratings? One thing I will note is that with the plugin, once I had a rating of 3, I could not progress to 4 or 5. then what they will need to do is start at the 5 ratings, and work their way down, eg: Played by me 15 times and skipped by me 0 Played by me 10 times and skipped by me 0 Played by me 5 times and skipped by me 0 Also, I have one more idea on this, the more you listen to these songs, you may wish to update your ratings again months later to reflect a higher rating on songs you have listened to more. but at the same time you may not want to affect ratings that you actually manually clicked on the stars to set a rating. I am suggesting you store a boolean value for the rating, call it autorating. This to me seems like the very safest way to make sure users dont accidentally overwrite ratings they actually set themselves that were not set by the search feature. Then later in a few months you can use the search feature again to update songs that dont have a rating or that have a rating but also have a value of autorating=true I think I made this clear, but sometimes when you type out an idea it can be clear in your head but not clear to others, so let me know if what i am saying is not making sense to you. |
It would be really cool if Ampache somehow knew what music from my collection I was enjoying, and altered the ratings accordingly. I like the star rating, I have some smart playlists to find "music I like" (stuff rated 4/5 stars) and "favourite music" (things I have pressed the heart icon next to). I also have a smart playlist of unrated music which is currently more than 2/3 of my catalogue. I'm trying to rate all my music, along with having it all nicely tagged so I can create smart playlists better. It's just a bit tedious doing it by hand - I often forget because I'm listening to the music! (or I'm in my car and the Subsonic app doesn't seem to do ratings...)
I've noticed Ampache tracks the number of plays and the number of skips for each track, and how many times an artist/album is played. Would it be possible to write a plugin that could use this data to automatically rate songs? I don't mind having a go at writing a plugin, but is it even possible for Ampache plugins to change song/artist/album ratings?
It seems somewhat sensible that if I have at least listened to a track without skipping it, I probably found it OK to listen to so it's worth a 1-2 star rating, but if I've listened to it a number of times but keep skipping it I probably don't like it very much. And if I've played a certain artist/album many times by listening to their tracks, I probably like them more than others.
The text was updated successfully, but these errors were encountered: