Giter VIP home page Giter VIP logo

Comments (13)

sentriz avatar sentriz commented on August 25, 2024 3

yes I would hope to do this in the future. should not be too hard. just need some time

from gonic.

davidhampgonsalves avatar davidhampgonsalves commented on August 25, 2024 2

Yea I think I would do that. Also thanks for exposing gonicscan, really handy.

from gonic.

sentriz avatar sentriz commented on August 25, 2024 1

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

from gonic.

sentriz avatar sentriz commented on August 25, 2024 1

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 >:))

from gonic.

davidhampgonsalves avatar davidhampgonsalves commented on August 25, 2024

@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.

from gonic.

davidhampgonsalves avatar davidhampgonsalves commented on August 25, 2024

Looks like that's what airsonic is doing as well:

https://github.com/airsonic/airsonic/blob/828c1b2674b1b5bf4f96454ed5c154a0c074f3bb/airsonic-main/src/main/java/org/airsonic/player/controller/SetRatingController.java

I need the audio files to be the source of truth so I'll do something different.
Thanks

from gonic.

sentriz avatar sentriz commented on August 25, 2024

if you follow that path:
https://github.com/airsonic/airsonic/blob/828c1b2674b1b5bf4f96454ed5c154a0c074f3bb/airsonic-main/src/main/java/org/airsonic/player/controller/SetRatingController.java#L62
->
https://github.com/airsonic/airsonic/blob/828c1b2674b1b5bf4f96454ed5c154a0c074f3bb/airsonic-main/src/main/java/org/airsonic/player/service/RatingService.java#L76
->
https://github.com/airsonic/airsonic/blob/828c1b2674b1b5bf4f96454ed5c154a0c074f3bb/airsonic-main/src/main/java/org/airsonic/player/dao/RatingDao.java#L80

they seem to be doing the same as I suggested

from gonic.

davidhampgonsalves avatar davidhampgonsalves commented on August 25, 2024

Yes, sorry I was unclear, I meant that what you suggested is what airsonic does.

from gonic.

sentriz avatar sentriz commented on August 25, 2024

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

from gonic.

sentriz avatar sentriz commented on August 25, 2024

also, looking at http://www.subsonic.org/pages/api.jsp "setRating"
this depends on #41
as pointed out: #41 (comment)
since the rating id can be a track, album, etc. and gonic uses primary keys for it's track, album, etc ids

from gonic.

r0bbie avatar r0bbie commented on August 25, 2024

Would supporting favouriting / starring songs come under this, or be a separate feature request?

from gonic.

sentriz avatar sentriz commented on August 25, 2024

closing in favour of #171

from gonic.

sentriz avatar sentriz commented on August 25, 2024

ratings and stars are now shipped in master / :nightly . thanks to @brian-doherty

next release hopefully soon:
https://github.com/sentriz/gonic/milestone/1

from gonic.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.