Summary: | Collection Browser doesn't update when changes are made to files in the collection | ||
---|---|---|---|
Product: | [Applications] amarok | Reporter: | Sergei Andreev <seajey.serg> |
Component: | Collection Browser | Assignee: | Amarok Developers <amarok-bugs-dist> |
Status: | RESOLVED DUPLICATE | ||
Severity: | normal | CC: | bartoschek, biounifreiburg, gentoo.integer, hakan, hohyeis, kdestuff, martinralbrecht, matej, maximilian.kossick, mitchell, mprizee, piotrek.juzwiak, powertothepenguins, ralf-engels, rubens.matos, seajey.serg, silver.salonen, steven.clugston |
Priority: | NOR | ||
Version: | 2.7.1 | ||
Target Milestone: | 2.6 | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Bug Depends on: | |||
Bug Blocks: | 269535, 300983 | ||
Attachments: |
screenshot 1
screenshot 2 doubling artist changed sort order screenshot when doesn't work screenshot when work 2 Screenshot - Rubens |
Description
Sergei Andreev
2008-10-10 21:03:05 UTC
Created attachment 27797 [details]
screenshot 1
Created attachment 27798 [details]
screenshot 2
Anything special about your setup? Is this reproducible? >Anything special about your setup? Don't no, only gstreamer backend is something unusual. >Is this reproducible? Yes, I did it several times. With amarok 2.0 SVN I cannot reproduce this issue. I am closing this report as noone seems to be able to reproduce this. Please try again with the release candidate once it is released or also beta 3 that is out already. Use a clean config. If it still happens then please reopen. Bug is still here: Qt: 4.5.2 KDE: 4.3.00 (KDE 4.3.0) Amarok: 2.2-GIT Build 2009-08-16 MySQL embedded 5.1.37 I've added 3 albums of new artist "Bloodbound" Right after the scan I have this picture: http://pic.ipicture.ru/uploads/090816/876/9LFg8Uj5l3.png and http://pic.ipicture.ru/uploads/090816/876/2GRiBWLzXb.png Music files are in FLAC format, example: General Complete name : /media/Data/Music/metal/Bloodbound/2007 - Book of the Dead/01 - Sign of the Devil.flac Format : FLAC Format/Info : Free Lossless Audio Codec File size : 40.6 MiB Duration : 5mn 23s Overall bit rate : 1 053 Kbps Album : Book of the Dead Track name : Sign of the Devil Track name/Position : 01 Performer : Bloodbound Genre : Power Metal Description : gCue2tracks Recorded date : 2007 Audio Format : FLAC Format/Info : Free Lossless Audio Codec Duration : 5mn 23s Bit rate mode : Variable Bit rate : 1 053 Kbps Channel(s) : 2 channels Sampling rate : 44.1 KHz Resolution : 16 bits Stream size : 40.6 MiB (100%) Writing library : libFLAC 1.2.1 (UTC 2007-09-17) After searching in collection Bloodbound appeared in Collection view, but Artist "Bolt Thrower" dissappeared and some other artists were doubled: http://pic.ipicture.ru/uploads/090816/876/3FJS6WzC25.png Restarting Amarok fixes the mess in Collection View though. And the problem is not file type relative: I've added an album of another new artist "Crimfall", this time in mp3, and having the same situation: there is no new performer right after collection rescan, and last artist in collection view is doubled. After Amarok restart Collection seems to be normal again. General Complete name : /media/Data/Music/metal/Crimfall/2009 - As The Path Unfolds/01 - Neothera Awakening.mp3 Format : MPEG Audio File size : 6.76 MiB Duration : 2mn 55s Overall bit rate : 320 Kbps Album : As The Path Unfolds Part/Position : 1/1 / 1 Part/Total : 1 Track name : Neothera Awakening Track name/Position : 01 Track name/Total : 11 Performer : Crimfall Accompaniment : Crimfall Composer : (Music: Jakke Viitala) Genre : Metal Recorded date : 2009 Writing library : iTunes 8.0.1.11 Cover : Yes Cover MIME : image/jpeg Comment : alex / alex iTunes_CDDB_IDs : 11+E6A9E4201E3C310F380F8C567E855545+12373092 Audio Format : MPEG Audio Format version : Version 1 Format profile : Layer 3 Duration : 2mn 55s Bit rate mode : Constant Bit rate : 320 Kbps Channel(s) : 2 channels Sampling rate : 44.1 KHz Resolution : 16 bits Stream size : 6.71 MiB (99%) *** Bug 203875 has been marked as a duplicate of this bug. *** Actually, this is a display problem, as restarting Amarok fixes the issue. See also comments #2-#4 on bug 203875 which I marked as a duplicate of this one. Changing target. Sergei, can you reproduce this bug now? There were a lot of changes made since you last reported this. The problem still exists: last entry in collection view is doubled http://yfrog.com/5kamarok10p and album sort order is changed from year desc to alphabet after collection rescan http://yfrog.com/58amarok11p $ amarok -v Qt: 4.5.2 KDE: 4.3.1 (KDE 4.3.1) Amarok: 2.2-GIT 2009-10-03 Created attachment 37342 [details]
doubling artist
Created attachment 37343 [details]
changed sort order
Does it persist across restarts of Amarok? Restarting Amarok fixes the problem in Collection View like in earlier revisions. has been reported in the forum, too. Reproduced on 2.2-git (Build Date: Nov 26 2009) Created attachment 38592 [details]
screenshot when doesn't work
album doesn't show the file, but responds on click by changing + to -, + to -.
So double click doesn't work.
Created attachment 38593 [details]
screenshot when work 2
It's after restart of amarok. Album in collection show the file, so double click is working.
(In reply to comment #22) > Created an attachment (id=38593) [details] > screenshot when work 2 > > It's after restart of amarok. Album in collection show the file, so double > click is working. Well, that's the whole point of this bug: the collection browser doesn't update when changes are made. Changing the title accordingly. *** Bug 210199 has been marked as a duplicate of this bug. *** Is this still valid with latest git? The bug is still here even with latest git. Additional observation: I'm using now option "Watch folders for changes". Amarok is running, I'm moving new album to the folder already under watch for artist already in collection. Checking this artist in Collection View - there is still one album. Then I'm dragging whole artist from Collection View to playlist - all two albums are added to playlist: http://imagebin.ca/view/zM6DMiC.html I am using the current release Amarok 2.2.2 and can reproduce this bug. When I add the files for an album to my collection directories, Amarok does not automatically update the list of albums in the collection pane to show the just-added album, even though I have the 'Watch folders for changes' option checked. Attempting to force an update by clicking Tools->Update Collection does not cause the collection pane to show the just-added album either. Like others who have commented on this bug, I have had some luck getting the just-added album to show by restarting Amarok once. Unlike others, unfortunately, restarting once doesn't always have to do the trick--I've had to restart twice a couple times to get the just-added album to show up in the collection pane. As far as I can remember, I've never had to restart more than two times. However, I've found a way to make the just-added album show up in the collection pane, and it's worked every time I tried it. After adding the files to my collection directory, I click Tools->Update Collection, then go to the collection pane's filter text box and type a few letters in the name of the just-added album. The just-added album will then show up in the filtered list. When I clear the filter text box, the collection pane will show the list of all albums in the collection again--and this time, the just-added album is in that list. This behaviour leads me to believe that Amarok is indeed updating the collection when forced to with Tools->Update Collection, but does not actually update the collection pane view until some event (e.g. filtering the collection pane) explicitly triggers an update of the view. I am still not sure whether the 'Watch folders for changes' option is doing its job properly. *** Bug 226255 has been marked as a duplicate of this bug. *** Changing priority. This causes too many reports already. *** Bug 233652 has been marked as a duplicate of this bug. *** *** Bug 235725 has been marked as a duplicate of this bug. *** *** Bug 238500 has been marked as a duplicate of this bug. *** *** Bug 245967 has been marked as a duplicate of this bug. *** Same situation. FLAC files. Collection gets updated properly only after restarting amarok. Yes, it's a known problem. We've tracked it down partway (the queries to the database are correct, so it's somewhere in the model/view code) and it's high on the priority list. Hopefully will be fixed by 2.3.2 final. commit 392516c51cdc4d6fa1e60b38d93b04789a505699 Author: Jeff Mitchell <mitchell@kde.org> Date: Tue Aug 24 18:46:15 2010 -0400 Properly refresh the collection browser when a full scan is performed that results in a change (such as when you change your collection directories). The current solution leaves your database quite a bit messier, but there's a silver lining in that it also may make debugging future DB problems easier. Fixes bug 172542, among others. CCMAIL: maximilian.kossick@gmail.com BUG: 172542 diff --git a/ChangeLog b/ChangeLog index 14a4d65..846d9dd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -10,6 +10,9 @@ VERSION 2.3.2 * Use system date/time format for default name when saving user playlists. BUGFIXES: + * Fix Collection Browser not properly updating after a full rescan, + necessitating Amarok to be closed and reopened. Fixes various bugs. + (BR 172542) * Fix possible crash in Labels Applet when playing new track. (BR 248538) * Fix cover found dialog closing when download failed or is cancelled. * Fix failure when fetching cddb info for audio CDs in localized Amarok. diff --git a/src/core-impl/collections/sqlcollection/DatabaseUpdater.cpp b/src/core-impl/collections/sqlcollection/DatabaseUpdater.cpp index 5ee8fee..00a9e25 100644 --- a/src/core-impl/collections/sqlcollection/DatabaseUpdater.cpp +++ b/src/core-impl/collections/sqlcollection/DatabaseUpdater.cpp @@ -744,7 +744,12 @@ void DatabaseUpdater::prepareTemporaryTablesForFullScan() { m_storage->query( "INSERT INTO urls_temp SELECT * FROM urls;" ); + m_storage->query( "INSERT INTO artists_temp SELECT * FROM artists;" ); + m_storage->query( "INSERT INTO years_temp SELECT * FROM years;" ); + m_storage->query( "INSERT INTO albums_temp SELECT * FROM albums;" ); m_storage->query( "INSERT INTO images_temp SELECT * FROM images;" ); + m_storage->query( "INSERT INTO genres_temp SELECT * FROM genres;" ); + m_storage->query( "INSERT INTO composers_temp SELECT * FROM composers;" ); } void diff --git a/src/core-impl/collections/sqlcollection/ScanManager.cpp b/src/core-impl/collections/sqlcollection/ScanManager.cpp index 5f90048..9f0d37d 100644 --- a/src/core-impl/collections/sqlcollection/ScanManager.cpp +++ b/src/core-impl/collections/sqlcollection/ScanManager.cpp @@ -22,16 +22,16 @@ #include "ScanManager.h" +#include "amarokconfig.h" #include "App.h" -#include "core/support/Debug.h" +#include "playlistmanager/PlaylistManager.h" #include "ScanResultProcessor.h" #include "SqlCollection.h" #include "SqlCollectionDBusHandler.h" -#include "amarokconfig.h" +#include "statusbar/StatusBar.h" +#include "core/support/Debug.h" #include "core/meta/support/MetaConstants.h" #include "core/meta/support/MetaUtility.h" -#include "playlistmanager/PlaylistManager.h" -#include "statusbar/StatusBar.h" #include <QFileInfo> #include <QListIterator> @@ -104,7 +104,6 @@ ScanManager::startFullScan() } checkTables( true ); - cleanTables(); if( m_parser ) { @@ -577,20 +576,6 @@ ScanManager::restartScanner() } void -ScanManager::cleanTables() -{ - DEBUG_BLOCK - m_storage->query( "DELETE FROM tracks;" ); - m_storage->query( "DELETE FROM genres;" ); - m_storage->query( "DELETE FROM years;" ); - m_storage->query( "DELETE FROM composers;" ); - m_storage->query( "DELETE FROM albums;" ); - m_storage->query( "DELETE FROM artists;" ); - m_storage->query( "DELETE FROM directories;" ); - //images table is deleted in DatabaseUpdater::copyToPermanentTables -} - -void ScanManager::checkTables( bool full ) { DEBUG_BLOCK diff --git a/src/core-impl/collections/sqlcollection/ScanManager.h b/src/core-impl/collections/sqlcollection/ScanManager.h index ac35538..135a877 100644 --- a/src/core-impl/collections/sqlcollection/ScanManager.h +++ b/src/core-impl/collections/sqlcollection/ScanManager.h @@ -69,7 +69,6 @@ class AMAROK_SQLCOLLECTION_EXPORT_TESTS ScanManager : public IScanManager private: QStringList getDirsToScan(); void handleRestart(); - void cleanTables(); void checkTables( bool full = true ); void stopParser(); void writeBatchIncrementalInfoFile(); diff --git a/src/core-impl/collections/sqlcollection/ScanResultProcessor.cpp b/src/core-impl/collections/sqlcollection/ScanResultProcessor.cpp index 464253f..e968e7c 100644 --- a/src/core-impl/collections/sqlcollection/ScanResultProcessor.cpp +++ b/src/core-impl/collections/sqlcollection/ScanResultProcessor.cpp @@ -293,8 +293,6 @@ ScanResultProcessor::commit() m_collection->dbUpdater()->deleteAllRedundant( "composer" ); m_collection->dbUpdater()->deleteAllRedundant( "year" ); - debug() << "Sending changed signal"; - m_collection->sendChangedSignal(); updateAftPermanentTablesUrlString(); updateAftPermanentTablesUidString(); @@ -303,6 +301,9 @@ ScanResultProcessor::commit() m_collection, SLOT( updateTrackUrlsUids( const ChangedTrackUrls &, const TrackUrls & ) ) ); emit changedTrackUrlsUids( m_changedUrls, m_changedUids ); + + debug() << "Sending changed signal"; + m_collection->sendChangedSignal(); } void *** Bug 252715 has been marked as a duplicate of this bug. *** I think I'm facing a similar problem in Amarok 2.4.1, KDE 4.6.3. Steps to reproduce: 1. Change the album name in some songs. 2. Collection does not reflect the changes automatically (even when I update the collection), or information about old album is kept (see image in link below). http://img707.imageshack.us/img707/3976/amaroku.png If I change track number, the new track number appears, but the order is not updated. I don't know if this matters, but my collection is in a USB drive. Rubens, can you please give me a more detailed information. 1. Are you using the "merged view"? (a bigger screenshot will help me if you don't know what a "merged view" is) 2. Does your main collection include the files on the USB drive or do those tracks appear once you plug your external drive in. 3. Do you change the album name inside Amarok with the meta information editor? 4. Does a restarting Amarok help? Created attachment 61663 [details]
Screenshot - Rubens
The album called "no title" had already its name changed using Amarok, but the change it is not shown.
Comment on attachment 61663 [details]
Screenshot - Rubens
1. I'm not sure if I'm using "merged view", but I think the screenshot can clarify it to you.
2. Those tracks appear only when I plug my external drive in. There is no file in my "Local collection", in hard disk.
3. I changed the album name inside Amarok.
4. When I restart Amarok, the modified album name appears.
Ok, this time it seems that it's a media collection not doing the update. So I re-open the error. *** Bug 260373 has been marked as a duplicate of this bug. *** Still happening with Amarok 2.5-git, bumping version. *** Bug 299200 has been marked as a duplicate of this bug. *** *** Bug 299627 has been marked as a duplicate of this bug. *** *** Bug 299627 has been marked as a duplicate of this bug. *** Please try to reproduce with Amarok 2.6 - that fixed many db update errors. Try followint scenarios (start from the "clean" state each time): a) move tracks in and let automatic update notice it b) move tracks in and touch Update Collection c) move tracks in and touch Full Rescan Any news about this? We are still waiting for feedback regarding Amarok 2.6 (In reply to comment #49) > Any news about this? We are still waiting for feedback regarding Amarok 2.6 I have just tested with Amarok 2.6. The automatic update in the local collection is working perfectly. Although the automatic update does not work for files in the external device. Neither the "Update Collection" and "Full rescan" works for this device. Maybe they should not work, if the device's folder is not included in the local collection in Amarok settings menu... I am not sure. I had only marked the option "Use automatically when connected", accessible by right-click menu. If I add the folder of the external device to the local collection, through "Settings -> Configure Amarok -> Local Collection", the albums appear duplicated, in both "Local collection" and "SAMSUNG" (my external device). I could not start from a complete "clean state", as Matej advised. (Well, of course the update will only work for tracks and folders that are part of the collection, so you certainly need to add the external device to the collection. Also the albums will of course show in both places, that is totally normal. Since what you describe is not a bug but normal behavior I think we can close this now, as the database update is what matters here. (In reply to comment #51) > (Well, of course the update will only work for tracks and folders that are > part of the collection, so you certainly need to add the external device to > the collection. > > Also the albums will of course show in both places, that is totally normal. > > Since what you describe is not a bug but normal behavior I think we can > close this now, as the database update is what matters here. Yep. On the other hand, Rubens, you may want to file a bug against USB Mass Storage collection that it doesn't update the tracks if changes are made to them. (from an external program?) This is perhaps simply not implemented. (In reply to comment #52) > (In reply to comment #51) > > (Well, of course the update will only work for tracks and folders that are > > part of the collection, so you certainly need to add the external device to > > the collection. > > > > Also the albums will of course show in both places, that is totally normal. > > > > Since what you describe is not a bug but normal behavior I think we can > > close this now, as the database update is what matters here. > > Yep. > > On the other hand, Rubens, you may want to file a bug against USB Mass > Storage collection that it doesn't update the tracks if changes are made to > them. (from an external program?) This is perhaps simply not implemented. Ok. I will include the automatic update of Mass Storage collection in the "wish list". Thank you all for the effort to fix the bug in the standard collection. Happens with 2.7.0 quite regularly - when I move a folder from one collection folder to another, Amarok detects that the files are removed, but they are detected from another folder only when hitting Update Collection. (In reply to comment #54) > Happens with 2.7.0 quite regularly - when I move a folder from one > collection folder to another, Amarok detects that the files are removed, but > they are detected from another folder only when hitting Update Collection. And is this other folder part of the collection and do you have the option "Watch folders for changes" activated? Please also make sure you check with version 2.7.1 which is the latest release. Yes, both folders are part of collection. One of them is mounted from another drive though - I hope it's not a problem. Watching folders for changes is checked and it happens also with Amarok 2.7.1. Reopening based on latest findings. I think this may as well be the famous caching bug with Collection View, i.e. bug 262504. There is an easy test for it: if you see collection browser not being consistent with your expectation, clear the playlist and drag the whole collection to the playlist. Study the tracks in the playlist - are they correctly updated? Removed files removed and added files added? If a) yes (when dragged to playlist, the files look up-to-date) -> then this is a definitely another symptom of bug 262504. b) no, tracks aren't updated even when dragged to playlist -> then this is a bug in particular collections not updating themselves correctly. Someone who can reproduce this bug please perform the test. In case of a), please mark this as a duplicate of bug 262504. I renamed a folder within collection folder and then added the whole collection. The renamed folder is in there indeed, but there are also lots of grayed out albums, including the folder I had just renamed (I had also updated this folder's tracks' album name, but grayed out tracks include this album with the original album name). When I now renamed the folder back to the original name and added the whole collection to playlist, this tracks from that folder showed up with the original album name. *** This bug has been marked as a duplicate of bug 262504 *** |