Comments (3)
Apologies, I was doing it wrong :) A quick perusal of the code revealed that I should be doing:
mopidy.library.search({artist: ['Can']}, ['beets:'])
from mopidy-beets.
I'm reopening this because I found that the search results can be improved. Searching the way I put in my second comment does limit the results to 'Can' but it still returns every file which has the letters 'Can' in any metadata field, which is not too useful.
I've edited library.py to format the artist, album, track, and year queries according to the way the beet CLI tool does it:
for (field, val) in query.iteritems():
if field == "album":
search.append('album:'+val[0])
if field == "artist":
search.append('artist:'+val[0])
if field == "track":
search.append('track:'+val[0])
if field == "date":
search.append('date:'+val[0])
This gives the results I'd expect.
You can still use mopidy's 'any' field to enter any generic search - eg year:2002
from mopidy-beets.
thank you for your hint!
Now the search code should work fine for the different categories.
from mopidy-beets.
Related Issues (18)
- Search doesn't work HOT 1
- Seek doesn't work HOT 3
- Converting a track to an actual URI might cause unhanded exceptions HOT 1
- Missing v3.0.0 tag HOT 1
- beets backend json/utf8 errors HOT 2
- homebrew formula HOT 1
- Resume doesn't work HOT 1
- Port mopidy-beets to Python 3
- Expose cover art through `library.get_images()`
- Use beets python API instead of web API? HOT 2
- Multiple Beets libraries connected to one Mopidy instance
- No album results in browse or search HOT 4
- Slashes in genre-names breaks AlbumsCategoryBrowser HOT 1
- Support searching non-album tracks
- Artist detail view is broken
- Use 'year' instead of/as well as 'date' for metadata? HOT 2
- Not working with current relases HOT 3
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 mopidy-beets.