Tangerine assigns duplicate IDs to tracks newly added to existing database
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Tangerine |
New
|
Undecided
|
Unassigned | ||
tangerine (Debian) |
Fix Released
|
Unknown
|
Bug Description
Package: tangerine
Version: 0.3.4-3
Starting from scratch, tangerine correctly scans and imports all the tracks from my library folder.
However, if I quit tangerine, add new tracks (or folders of tracks) to my library, and start
tangerine again, the new tracks do not show up or do not play in my clients (Rhythmbox and
XBMC). But if I delete ~/.config/
appear correctly in my clients.
I tracked the problem to some code in daap-sharp/
track ID being assigned to any new track being added to an existing tracks database.
The attached patch fixes that problem for me.
System: Debian GNU/Linux testing (wheezy)
Changed in tangerine (Debian): | |
status: | Unknown → Confirmed |
Changed in tangerine (Debian): | |
status: | Confirmed → Fix Released |
This bugfix introduces another issue. By assigning a new ID, this confuses iTunes and makes it not display the updated track.
When iTunes first connects, Tangerine responds with an item count (dmap.itemcount, "mimc"), which it gets by counting how many tracks it has. dmap.itemid has to be between 1 and this count. Any songs with dmap.itemid values above this count are ignored by iTunes.
When updating entries, Tangerine needs to make a distinction between dmap.persistentid (which can be any value) and dmap.itemid which cannot. A fresh and arbitrary dmap.persistentid can be assigned, but dmap.itemid should be defined as the track's ordinal position in the track database, at all times.