Giter VIP home page Giter VIP logo

Comments (3)

fatg3erman avatar fatg3erman commented on August 22, 2024

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.

fatg3erman avatar fatg3erman commented on August 22, 2024

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.

sumpfralle avatar sumpfralle commented on August 22, 2024

thank you for your hint!
Now the search code should work fine for the different categories.

from mopidy-beets.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.