emms-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] Add a source for beets library databases


From: Daniel Semyonov
Subject: [PATCH] Add a source for beets library databases
Date: Mon, 11 Dec 2023 14:36:00 +0200
User-agent: Gnus/5.13 (Gnus v5.13)

Attached is a patch which adds a source which reads a beets library
database using Emacs' built-in SQLite support.

This source is a bit weird; since the beets database also contains the
metadata of the tracks, you don't need to use any info function.  It
read (and saved to the cache, with metadata) a library of ~1450 tracks
in under a second on my PC (I can honestly just disable the cache at
this point).

I've thought about just providing an info function which queries the
beets database (and maybe it could be added anyway), but since it also
contains the paths of all the tracks it made sense to use a source.

I've also thought about integrating the beets database by setting the
various cache function variables to functions which use the database as
the "cache", but I'm not really sure how it would work with tracks
outside the beets library, and it would also require far greater
proficiency in SQL than I currently posses (which is basically nothing).
A huge benefit to this approach theoretically would be the ability to
automatically synchronize edits using the tag editor with the library
database.

The command could be extended in the future to allow more fine-tuned
control over the tracks added.  The beets database contains a table of
albums, and it's probably possible to get a list of album artists from
the items (tracks) table, so it should be possible to allow filtering
the tracks added from the database.

Daniel

Attachment: 0001-Add-an-EMMS-source-for-beets-library-databases.patch
Description: patch


reply via email to

[Prev in Thread] Current Thread [Next in Thread]