Implementation of the "Custom Tags" Feature

Jeff Mitchell mitchell at kde.org
Wed Oct 28 22:23:29 CET 2009


Dan Meltzer wrote:
> On Wed, Oct 28, 2009 at 4:45 PM, Daniel Dewald
> <Daniel.Dewald at time-shift.de> wrote:
>> Hi List,
>>
>> I want to implement the "custom Tags" Feature for Amarok 2.2.x . Basically my
>> Idea is the following:
>>
>> - Create a new Table in the Database with the following Scheme:
>> Custom_Tags(id,Name,Value); Where ID would be a foreign key to the id of the
>> Tracks table, Name the name of the custom tag and value the value the user
>> want to give the tag.
> 
> I think this is the wrong approach, the general usage of tagging (when
> I think of it) is to apply a 'tag' to a track (or album, or etc).  I
> don't see where the name,value pair fits into this.  Tracks should
> instead have a list of tags associated with them, or perhaps even
> better, tags should have a list of tracks associated with them.  There
> should be no need to have name,value pairs, I don't think.

Two things.

First, there is already a "labels" table that should be used for this
purpose (schema modified if necessary) instead of leaving it fallow and
creating yet another one. Labels is probably better anyways, since tags
has a lot of connotations already with music files.

I would also highly suggest that you link tags/labels to the urls table,
not the tracks table. The tracks table is frequently wiped out, whereas
the urls table keeps its data between scans (just like, presumably,
labels/tags). You could of course easily make a query to the DB to only
fetch urls associated with a label for which there is a currently valid
track associated with that url.

--Jeff

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 196 bytes
Desc: OpenPGP digital signature
Url : http://mail.kde.org/pipermail/amarok-devel/attachments/20091028/9c08dae2/attachment.sig 


More information about the Amarok-devel mailing list