Question about AFT and duplicate entries

Colin Guthrie gmane at colin.guthr.ie
Mon Feb 25 21:28:12 UTC 2008


Hi,

Just wondering if in the replies to my previous mail, this little titbit
 got missed:


Accepting that ATF does not filter out duplicates on the collection
browser, it becomes possible for me to play two versions of the same
song from different locations, but for the two (or more) files there
will only ever be one entry in the uniqueid table.

Does this mean that the uniqueid itself is calculated every time a file
is played? Is that not a little pointless? I thiought that the uniquied
table was used to provide a cache of these values? In my case it means
that the one on the network is read.

Would it not make way more sense to remove the unique key on the
uniqueid field on the uniqueid table? (too many uniques there!!)

Colin Guthrie wrote:
> From some more indepth testing, it transpires I only have one entry in
> uniqueid per unique track and some tracks are actually not listed:
> e.g.
> mysql> SELECT * FROM uniqueid WHERE url LIKE '%Cold Water%Intro%mp3' \G
> *************************** 1. row ***************************
>      url: ./home/colin/Music/Aim/Cold Water Music/01 - Intro.mp3
> deviceid: -1
> uniqueid: f4575b93e55a0cb1095ff870ac76cd61
>      dir: ./home/colin/Music/Aim/Cold Water Music
> 1 row in set (0.02 sec)
> 
> 
> But:
> mysql> SELECT * FROM tags WHERE url LIKE '%Cold Water%Intro%mp3' \G
> *************************** 1. row ***************************
>        url: ./audio/mp3/Aim/Cold Water Music/01 - Intro.mp3
>        dir: ./audio/mp3/Aim/Cold Water Music
> createdate: 1164990147
> modifydate: 1111277784
>      album: 203
>     artist: 184
>   composer: 1
>      genre: 49
>      title: Intro
>       year: 9
>    comment: Aim - Cold Water Music - 1/12 - Intro
>      track: 1
> discnumber: 0
>    bitrate: 256
>     length: 55
> samplerate: 44100
>   filesize: 1777802
>   filetype: 1
>    sampler: 0
>        bpm: 0
>   deviceid: 2   <------ NFS
> *************************** 2. row ***************************
>        url: ./home/colin/Music/Aim/Cold Water Music/01 - Intro.mp3
>        dir: ./home/colin/Music/Aim/Cold Water Music
> createdate: 1203086177
> modifydate: 1203086177
>      album: 203
>     artist: 184
>   composer: 1
>      genre: 49
>      title: Intro
>       year: 9
>    comment: Aim - Cold Water Music - 1/12 - Intro
>      track: 1
> discnumber: 0
>    bitrate: 256
>     length: 55
> samplerate: 44100
>   filesize: 1777802
>   filetype: 1
>    sampler: 0
>        bpm: 0
>   deviceid: -1
> 
> 
> This shows that I have this same file stored twice on my system (once on
> my local disk (deviceid -1) and once on my NFS mount (deviceid 2).
> 
> But only one entry in uniqueid.
> 
> Looking at the uniqueid table in more depth, I see there is a unique key
> on the uniqueid field. This means that it is impossible to store the
> uniqueid from both locations of the same file at once. This means that
> if you were to try and hide the duplicates in the collection browser, it
> would be impossible to do so via reduction based on uniqueid (favoyring
> the lower deviceid if duplicates are found).
> 
> Is perhaps the unique key in the uniqueid table a fundamentally broken
> concept? I think there *should* be a unique key on the url and deviceid
> fields for the uniqueid table.
> 
> I'm possibly doing something wrong, so thanks for any insights :)
> 
> Col




More information about the Amarok mailing list