spl0k / supysonic

Supysonic is a Python implementation of the Subsonic server API.
https://supysonic.readthedocs.io
GNU Affero General Public License v3.0
264 stars 58 forks source link

Initial ListenBrainz support #261

Closed ivan-avalos closed 6 months ago

ivan-avalos commented 6 months ago

I'm finally making this happen! https://github.com/spl0k/supysonic/issues/80#issuecomment-1405881111

TODO

ivan-avalos commented 6 months ago

Any word about this merge request?

spl0k commented 6 months ago

Sorry, I didn't had the time to look at it yet, I'm quite busy at the moment. I'll try to do it this weekend.

ivan-avalos commented 6 months ago

It's okay, thanks for the update. Please feel free to check it out whenever you have time. Just wanted to make sure it didn't fly under your radar.

spl0k commented 6 months ago

Hello. It's nice to see a pull request that has everything covered, not only the implementation but also migrations, tests and documentation 👍

I spotted a bug though: one can't link or unlink their token if they're not an admin. This is most likely due to the fact that you only use the full user id in the template and not the special me id. Note that it could also be seen as a bug in the me_or_uuid decorator.

codecov[bot] commented 6 months ago

Codecov Report

Attention: Patch coverage is 65.11628% with 30 lines in your changes are missing coverage. Please review.

Project coverage is 85.74%. Comparing base (1feaae7) to head (0f49dfb).

:exclamation: Current head 0f49dfb differs from pull request most recent head 8d3a31d. Consider uploading reports for the commit 8d3a31d to get more accurate results

Files Patch % Lines
supysonic/listenbrainz.py 55.93% 26 Missing :warning:
supysonic/frontend/user.py 78.94% 4 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #261 +/- ## ========================================== - Coverage 86.21% 85.74% -0.48% ========================================== Files 46 47 +1 Lines 3801 3886 +85 ========================================== + Hits 3277 3332 +55 - Misses 524 554 +30 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

ivan-avalos commented 6 months ago

I spotted a bug though: one can't link or unlink their token if they're not an admin. This is most likely due to the fact that you only use the full user id in the template and not the special me id. Note that it could also be seen as a bug in the me_or_uuid decorator.

Sorted! Please check my last commit.

spl0k commented 6 months ago

👍 merged.