Tangerine assigns duplicate IDs to tracks newly added to existing database

Bug #1015985 reported by Chow Loong Jin
16
This bug affects 3 people
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/tangerine/tracks.db and start tangerine again, the tracks
appear correctly in my clients.
I tracked the problem to some code in daap-sharp/src/Database.cs that results in a duplicate
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)

Revision history for this message
Chow Loong Jin (hyperair) wrote :
Changed in tangerine (Debian):
status: Unknown → Confirmed
Revision history for this message
Kyzer (stuart-caie) wrote :

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.

Changed in tangerine (Debian):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.