-
-
Notifications
You must be signed in to change notification settings - Fork 113
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
Ratings support? #31
Comments
yes I would hope to do this in the future. should not be too hard. just need some time |
@sentriz do you have ideas for how you plan on implementing this? I see that nicksellen/audiotags only supports read operations through taglib. Were you thinking of adding the ability to change ratings to that first? If so it looks like https://github.com/NBonaparte/audiotags/commits/master might be a good starting point and if that is inline with your thinking I will probably take a pass at this. |
My idea was a track rating table instead of tags. With columns track_id, user_id, rating - to make sure ratings are per user. But I'd like to know what airsonic etc does |
Looks like that's what airsonic is doing as well: I need the audio files to be the source of truth so I'll do something different. |
Yes, sorry I was unclear, I meant that what you suggested is what airsonic does. |
ohh sorry yes. I misread :) if I did end up implementing ratings the way airsonic does. you could probably make a little script to update the gonic db's ratings for a given user and list of tracks |
Yea I think I would do that. Also thanks for exposing gonicscan, really handy. |
also, looking at http://www.subsonic.org/pages/api.jsp "setRating" |
Would supporting favouriting / starring songs come under this, or be a separate feature request? |
just merged the ambig ids branch. this feature should now be possible. eg handler func (c *Controller) ServeSetRating(r *http.Request) *spec.Response {
params := r.Context().Value(CtxParams).(params.Params)
id, err := params.GetID("id")
// handle err
switch id.Type {
case specid.Artist:
// rate artist
case specid.Album:
// rate album
case specid.Track:
// rate track
}
} hey @r0bbie they're not exactly the same of but very similar to implement (mostly copy paste |
closing in favour of #171 |
ratings and stars are now shipped in master / :nightly . thanks to @brian-doherty next release hopefully soon: |
fixes #171 fixes #31 * Initial code. Compiles and passes unit tests. * Moved average rating calculation from rating fetch to set rating function. Still only compiled and unit tested. * Bug fixes * Fixed bug in savePlayQueue. Removed unique_index for star / rating entries because it's not valid. * Changed time format on stars to RFC3339Nano to match created date format. * Lint fixes. * More lint fixes. * Removed add* functions and replaced with Preload. * Fixed several bugs in handlers for getStarred and getStarred2. * Fixed bug when using music folder ID. Co-authored-by: Brian Doherty <brian@hplaptop.dohertyfamily.me>
Is implementing ratings per track a goal?
The text was updated successfully, but these errors were encountered: