Comments (13)
yes I would hope to do this in the future. should not be too hard. just need some time
from gonic.
Yea I think I would do that. Also thanks for exposing gonicscan, really handy.
from gonic.
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.
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.
@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.
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.
Thanks
from gonic.
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.
Yes, sorry I was unclear, I meant that what you suggested is what airsonic does.
from gonic.
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.
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.
Would supporting favouriting / starring songs come under this, or be a separate feature request?
from gonic.
closing in favour of #171
from gonic.
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)
- Allow setting user for docker image HOT 4
- Request: Parse `format` param in `stream` request for per-request transcoding HOT 3
- LastModified field is set to 0?
- implement subsonic getNowPlaying.view HOT 1
- Possibility for taglib static builds HOT 1
- Question: What happens to the db if I correct the metadata on my collection HOT 1
- Canβt see playlists. Difference from Subsonic API? HOT 1
- Does Gonic support the ability to scan music from 2 different drives in a single docker instance? HOT 1
- songs not being downloaded in dsub after upgrade 15.2β16.4 HOT 2
- feat: Support for composer tag
- Playlist sharing across users
- Could not read tags HOT 4
- gonic db created with world-readable permissions HOT 1
- `artists`, `albumartists`, and `genres` with picard HOT 11
- Request: custom prefix for paths inside playlist
- Feature: Album download
- Quality of life improvements to podcasts
- Missing getNowPlaying endpoint in API HOT 1
- Question are podcasts included in item counts? HOT 2
- Unable to create playlist as non-admin user, error code 50: you aren't allowed update that user's playlist
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gonic.