This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Music collection rescans every time Amarok is opened

Tags: None
(comma "," separated)
jarednorris
Registered Member
Posts
5
Karma
0
OS
A long time ago Amarok started playing up. I didn't have time to fix it then so just ignored the problem.

Essentially I have an issue where every time Amarok loads it appears to rescan the files in the known locations. This appears to "touch" the files somehow so requires dropbox (where I store the files) to re-index all those files again which can be a lengthy process on thousands of files.

I found a bug (Bug #317805) that I think perfectly explains my situation but doesn't appear to offer an easy to follow way of resolving it. All it does is push the user to this forum for further help. When I search this forum I can't find where the user followed up for further instructions.

So, based on the details of that bug report, what should I do to stop Amarok rescanning the collection every time?
molecule-eye
Registered Member
Posts
402
Karma
0
OS
I had this happen to me once when the music collection I pointed to was a symlinked folder. The problem went away when I pointed the actual location. Are you pointing Amarok to a symlink?
jarednorris
Registered Member
Posts
5
Karma
0
OS
Good thought, I don't think there are any though.

I haven't set any up for them specifically and I don't think Dropbox uses symlinks, it just sets up in the folder where you point it to.

It looks like a database issue but wasn't sure how best to troubleshoot that as the linked article in the bug listed above looks very old.
User avatar
google01103
Manager
Posts
6668
Karma
25
Just to clarify, since I don't use Dropbox. You collection resides on Dropbox, not locally ?

If your collection resides locally and Dropbox senses a change and the does its own scan maybe it uses the atime file attribute (time file/folder last accessed) to trigger this. You can use the noatime option in /etc/fstab to disable this.

It might be useful if you can find out what specific things cause Dropbox to reindex


OpenSuse Leap 42.1 x64, Plasma 5.x

molecule-eye
Registered Member
Posts
402
Karma
0
OS
Does Amarok modify extended attributes? Because dropbox will sync files whose xattrs change.
jarednorris
Registered Member
Posts
5
Karma
0
OS
I honestly have no idea about the attributes.

However I also have issues with Amarok when it opens, it sits there for about a minute scanning the files (with all the error messages almost identical to those in the bug post).

So I'm getting the impression whatever Amarok is doing for the first minute or two of loading is causing the Dropbox thing so was hoping to try and resolve the Amarok thing first to make sure.

Essentially it loads up about 3000 songs whenever it opens and the song titles are all double height until they're "scanned" when they return to being correct height and sorted into albums. When I run Amarok from console with debug I get a line like the one copied below for every song in the list when this happens:

amarok: [ERROR__] [MySqlStorage] "GREPME MySQLe query failed! (130) Incorrect file format 'podcastepisodes' on SELECT id FROM podcastepisodes WHERE guid='file:///home/jared/Dropbox/JandL/Music/FLAC/Andrew%20WK/2003%20-%20The%20Wolf/Andrew%20W.K.%20-%2009%20-%20Totally%20Stupid.flac' OR url='file:///home/jared/Dropbox/JandL/Music/FLAC/Andrew%20WK/2003%20-%20The%20Wolf/Andrew%20W.K.%20-%2009%20-%20Totally%20Stupid.flac' OR localurl='file:///home/jared/Dropbox/JandL/Music/FLAC/Andrew%20WK/2003%20-%20The%20Wolf/Andrew%20W.K.%20-%2009%20-%20Totally%20Stupid.flac';"
User avatar
Mamarok
Manager
Posts
6071
Karma
16
OS
How large is your playlist when you start Amarok? Be aware that all non-local files in the playlist need to be scanned for playability, so depending on the location, connection speed and number of files in the playlist this can cause a rather long delay ...


Running Kubuntu 22.10 with Plasma 5.26.3, Frameworks 5.100.0, Qt 5.15.6, kernel 5.19.0-23 on Ryzen 5 4600H, AMD Renoir, X11
FWIW: it's always useful to state the exact Plasma version (+ distribution) when asking questions, makes it easier to help ...
jarednorris
Registered Member
Posts
5
Karma
0
OS
Hi all, thanks for the suggestions.

I believe the files are actually stored locally in my home folder as indicated in the error message. The dropbox thing is a symptom of whatever is going on with Amarok as it doesn't happen if I use other media players (e.g. exaile).

I believe there to be 2500-3000 songs in the playlist and I understand it can take a while to load. However it's the errors I'm concerned about as it appears to be trying to load local songs as podcasts. I get a message like the one below for every song in the list:

amarok: [ERROR__] [MySqlStorage] "GREPME MySQLe query failed! (130) Incorrect file format 'podcastepisodes' on SELECT id FROM podcastepisodes WHERE guid='file:///home/jared/Dropbox/JandL/Music/FLAC/Andrew%20WK/2003%20-%20The%20Wolf/Andrew%20W.K.%20-%2009%20-%20Totally%20Stupid.flac' OR url='file:///home/jared/Dropbox/JandL/Music/FLAC/Andrew%20WK/2003%20-%20The%20Wolf/Andrew%20W.K.%20-%2009%20-%20Totally%20Stupid.flac' OR localurl='file:///home/jared/Dropbox/JandL/Music/FLAC/Andrew%20WK/2003%20-%20The%20Wolf/Andrew%20W.K.%20-%2009%20-%20Totally%20Stupid.flac';"
User avatar
Mamarok
Manager
Posts
6071
Karma
16
OS
That error suggests a file format error in your database tables. Did you try fixing your tables? Please see here on how to proceed: http://www.thegeekstuff.com/2008/09/how ... myisamchk/


Running Kubuntu 22.10 with Plasma 5.26.3, Frameworks 5.100.0, Qt 5.15.6, kernel 5.19.0-23 on Ryzen 5 4600H, AMD Renoir, X11
FWIW: it's always useful to state the exact Plasma version (+ distribution) when asking questions, makes it easier to help ...
jarednorris
Registered Member
Posts
5
Karma
0
OS
The first error I get following that page is:

Code: Select all
The program 'myisamchk' can be found in the following packages:
 * mysql-server-5.7
 * mariadb-server-10.0
 * mysql-server-5.6
 * percona-server-server-5.6
 * percona-xtradb-cluster-server-5.6


So I assume that means I'm missing something. I have a default Ubuntu install and have recently re-installed Amarok trying to get it working so I've got everything installed that is automatically pulled in at install time. Is there something else that needs installing that will stop this issue?
User avatar
Mamarok
Manager
Posts
6071
Karma
16
OS
Of course, MySQL service tools are part of the server packages, which you do not need to run Amarok's internal database, only to repair it when it is broken. Since breaking the database should not happen (I had to repair my database once or twice in over 7 years of using the development branch), it still can happen, mostly when Amarok is not shut down in a regular fashion (power shortage for example can happen in the worst possible moment, when something is written to the database and end up in corruption, just to mention one possible source of the problem).


Running Kubuntu 22.10 with Plasma 5.26.3, Frameworks 5.100.0, Qt 5.15.6, kernel 5.19.0-23 on Ryzen 5 4600H, AMD Renoir, X11
FWIW: it's always useful to state the exact Plasma version (+ distribution) when asking questions, makes it easier to help ...


Bookmarks



Who is online

Registered users: Bing [Bot], gfielding, Google [Bot], markhm, sethaaaa, Sogou [Bot], Yahoo [Bot]