mopidy / mopidy-local

Mopidy extension for playing music from your local music archive
https://mopidy.com/ext/local/
Apache License 2.0
61 stars 26 forks source link

Fixes #47 (browse by date for YYYY) #72

Closed schmaller closed 1 year ago

schmaller commented 1 year ago

and even enables browsing by month (YYYY-MM),

schmaller commented 1 year ago

I didn't yet manage to run every linter locally. What's the exact issue with the error in flake8 BLK100 test?

kingosticks commented 1 year ago

What's the exact issue with the error in flake8 BLK100 test?

It's nothing you did, it's just the latest version of the tool having some new check which the old code fails to pass (this happens when we don't run the tools for a while). if you run black . it'll make a formatting change it wants.

schmaller commented 1 year ago

It's nothing you did, it's just the latest version of the tool having some new check which the old code fails to pass

now i got it. fixed it in PR #73

kingosticks commented 1 year ago

Cheers. If you want to pop some extra tests in, that would great. Otherwise, I'll do it tonight. What's needed is to add a date field to some of the existing test Tracks. At least one should be "YYYY" format. Then ensure those dates come out (in the right order) with a new test function that calls schema.date(). Adding more date fields will also change the output of the date section of the existing distinct test so you'd need to fix that one up also.

kingosticks commented 1 year ago

I adjusted the tests a bit. The first one in test_dates() actually passed with the old code since it was only checking length.

Merged in https://github.com/mopidy/mopidy-local/commit/b2234a48228dfb969ef5da52c792052c49bea1ca.