Drag'n'drop from Folders into a playlist/auto-dj does not work

Bug #1014842 reported by Max Linke
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Mixxx
Fix Released
High
Max Linke

Bug Description

Debug output suggests that the songs are added to the playlist

Debug [Main]: PlaylistTableModel::addTracks could not add 3 to playlist 15

But they are not added and do not appear in the sqldatabase

Revision history for this message
jus (jus) wrote :

Confirmed with latest trunk on OSX X 10.6.8

For example when dropping 2 tracks fron FInder into AutoDJ:

Debug [Main]: Committing transaction on "qt_sql_default_connection" result: true
Debug [Main]: TrackDAO(0x1060b4dc0) addTracks took 6 ms to add 2 tracks
Debug [Main]: BaseTrackCache(0x119621420) updateIndexWithQuery took 0 ms
Debug [Main]: src/library/dao/playlistdao.cpp 435 FAILED QUERY [ "UPDATE PlaylistTracks SET position=position+1 WHERE position>=1 ANDplaylist_id=2" ] QSqlError(-1, "Unable to fetch row", "No query")
Debug [Main]: src/library/dao/playlistdao.cpp 435 FAILED QUERY [ "UPDATE PlaylistTracks SET position=position+1 WHERE position>=1 ANDplaylist_id=2" ] QSqlError(-1, "Unable to fetch row", "No query")
Debug [Main]: Committing transaction on "qt_sql_default_connection" result: true

Changed in mixxx:
status: New → Confirmed
importance: Undecided → High
milestone: none → 1.11.0
Revision history for this message
Max Linke (max-linke) wrote :

I've had the error on Windows/Linux for 1.11-a/1.10/1.09

Ok I've did some triaging today. wTrackTableView::dropEvent() works almost fine(more on that in p.s.)
PlaylistTablemodel::addTracks() seems to works fine the problems lies in playlistdao.
PTM calls trackdao.addTracks first and this works fine but the call to playlistdao.addtracks afterwards fails and returns 0 added tracks, it does not matter if the track is already in the library or not.

p.s. I found these two comments on wtracktableview.cpp

TODO: Filter out invalid URLs (eg. files that aren't supported audio filetypes, etc.)
// XXX: Crappy, assumes all URLs are valid songs. Should filter
              // out invalid URLs at the start of this function.

select() happens only for crates, adding select() in LTM::addTracks() should fix this.

Revision history for this message
Max Linke (max-linke) wrote :

The error was just a missing space character.

The patch also takes care of the TODO in wtracktableview.cpp. I'm not sure if this is really necessary since we don't accept drop events for files that aren't audio files anyway.

The rest is some reformatting to follow the coding guidelines.

Changed in mixxx:
assignee: nobody → Max Linke (max-linke)
Max Linke (max-linke)
Changed in mixxx:
status: Confirmed → In Progress
RJ Skerry-Ryan (rryan)
Changed in mixxx:
status: In Progress → Fix Committed
RJ Skerry-Ryan (rryan)
Changed in mixxx:
status: Fix Committed → Fix Released
Revision history for this message
Swiftb0y (swiftb0y) wrote :

Mixxx now uses GitHub for bug tracking. This bug has been migrated to:
https://github.com/mixxxdj/mixxx/issues/6529

lock status: Metadata changes locked and limited to project staff
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.