I quickly whipped together a working prototype in order to see if my idea works.

I'm unclear about one thing. I'm doing something like this to match
Subsonic media files with Beets' items :

>>> query = (
...     "artist:%s" % artist,
...     "title:%s" % title,
...     "album:%s" % album,
... )
>>> matches = lib.items(query)

Handcrafting a string query seems inefficient ; it also returns
multiple results if a song title is a substring of another (e.g.
"Song" and "Song (Instrumental)"), which is Not Good™. I didn't find
an official way to directly query the Item model in the docs[0], is
there any?

[0] http://beets.readthedocs.io/en/latest/dev/api.html

On Mon, Aug 8, 2016 at 12:48 AM, Adrian Sampson <adr...@radbox.org> wrote:
> Cool! Transitioning from Subsonic to a beets library seems like a common
> problem.
>
> I believe there are ID3 tags for both play count and star rating. There’s
> more about the rating tag in this thread:
> https://github.com/beetbox/beets/issues/122
>
> At the moment, beets doesn’t support either, but this shouldn’t be a
> difficult change to make if you’re interested. In the mean time, you can use
> beets’s flexible attributes to store the data in the SQLite database without
> writing it to the files.
>
> These two attributes are exposed by the Subsonic API. The plan is to match
> the results with :
>
> 1) Filesystem path if possible (e.g. if Subsonic and Beets share a music
> collection)
> 2) Album/Artist/Title if there is only one result in the Beets database
> 3) Finally, user choice if there are multiple results
>
>
> This approach sounds great!
>
> Adrian
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "beets" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/beets-users/_imCIAklSJU/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> beets-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"beets" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beets-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to