Bug 105127

Summary: amaroK drops the images and directories tables when all collection folders are unchecked
Product: [Applications] amarok Reporter: Greg Meyer <greg>
Component: generalAssignee: Amarok Developers <amarok-bugs-dist>
Status: RESOLVED WORKSFORME    
Severity: normal    
Priority: NOR    
Version: 1.3-CVS   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Greg Meyer 2005-05-05 03:04:46 UTC
Version:           1.3-CVS (using KDE KDE 3.4.0)
Installed from:    Compiled From Sources
Compiler:          GCC 3.4.3 
OS:                Linux

While chasing another bug, I removed (unchecked) all of my folders being watched by amaroK, and then re-added a few, immediately following re-adding them, I received a bunch of sqlite errors in the console complaining that the directories and images tables did not exist.

What must have happened is that when I cleared all the directories, those two tables were empty of records and were dropped from the database.  When directories were added back, the tables were not re-created.  Only an error that they did not exist.

This could be the reason for all the complaints of the collection not updating when a new folder is added, because when amaroK is in this state, with no directories table, the auto update function does not run.
Comment 1 Greg Meyer 2005-05-06 23:14:33 UTC
The workaround, if you confirm that this is occurring, is to use the sqlite3 command line tool to re-add the database tables.

These are the sql commands for creating the two tables

CREATE TABLE directories (dir VARCHAR(255) UNIQUE,changedate INTEGER );
CREATE INDEX directories_dir ON directories( dir );

CREATE TABLE images (path VARCHAR(255),artist VARCHAR(255),album VARCHAR(255));
CREATE INDEX images_album ON images( album );
CREATE INDEX images_artist ON images( artist );
Comment 2 Alexandre Oliveira 2006-02-16 22:49:45 UTC
I couldn't reproduce this, Greg, could you test again?
Comment 3 Alexandre Oliveira 2006-04-24 05:40:24 UTC
Closing for lack of feedback.
Please reopen if it still happens with amaroK 1.3.9.