mopidy / mopidy-gmusic

DEPRECATED (Mopidy extension for playing music from Google Play Music)
https://mopidy.com
Apache License 2.0
214 stars 60 forks source link

Implemented get_distinct in library provider #237

Closed 6ixisgood closed 3 years ago

6ixisgood commented 4 years ago

Implemented enough so that the Media Library tab in ncmpcpp will get the list of artists needed to display content

codecov[bot] commented 4 years ago

Codecov Report

Merging #237 into master will decrease coverage by 1.25%. The diff coverage is 10.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #237      +/-   ##
==========================================
- Coverage   60.42%   59.17%   -1.26%     
==========================================
  Files           9        9              
  Lines         748      747       -1     
==========================================
- Hits          452      442      -10     
- Misses        296      305       +9     
Impacted Files Coverage Δ
mopidy_gmusic/library.py 50.61% <10.00%> (-1.16%) :arrow_down:
mopidy_gmusic/session.py 86.00% <0.00%> (-1.28%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update a4a7846...af4c753. Read the comment docs.

kingosticks commented 4 years ago

This is great. As it happens I've been doing some work to improve get_distinct at https://github.com/mopidy/mopidy/pull/1900 and it'd be great if you could support track_name as well as well as track (and any of the other new fields if you wish).

kingosticks commented 4 years ago

Cheers for making that change. But am I missing something, where are you using the query here? Is there more coming? Doesn't this just dump all the values for the given field?

6ixisgood commented 4 years ago

Yes, sorry. I was reading through how some of the other extensions use the query feature. Not sure if I should implement it to query off just the user's library or not.

kingosticks commented 4 years ago

It's tricky to do something sensible with online catalogues. I think what mopidy-spotify does is reasonable but could be improved to use the entire users library rather than just their playlists in the case where a query was not specified.

6ixisgood commented 4 years ago

This now just uses the same method gmusic does for search. So it will either get the user's library or get their library and search the catalog, depending on if a query is specified.

jodal commented 3 years ago

Closing because Google Play Music has been shut down, and this project is being discontinued.