View Single Post
kazuki's Avatar
Posts: 115 | Thanked: 18 times | Joined on Jan 2010
#303
Originally Posted by marxian View Post
There was an error in 0.3.4, which meant that the filepath was not set for downloads. If you update using HAM/FapMan, you should be able to delete the downloads. If the problem persists, you can delete the download database table by inserting a DROP TABLE command in the settings initialisation:

Code:
function initialize() {
    var db = getDatabase();
    db.transaction(
                function(tx) {
                    // Create the settings table if it doesn't already exist
                    // If the table exists, this is skipped
                    tx.executeSql('CREATE TABLE IF NOT EXISTS accounts(username TEXT UNIQUE, password TEXT, isDefault INTEGER)');
                    tx.executeSql('CREATE TABLE IF NOT EXISTS settings(setting TEXT UNIQUE, value TEXT)');
                    tx.executeSql('CREATE TABLE IF NOT EXISTS searches(searchterm TEXT UNIQUE)');
                    tx.executeSql('DROP TABLE downloads');
                    tx.executeSql('CREATE TABLE IF NOT EXISTS downloads (filePath TEXT UNIQUE, playerUrl TEXT, title TEXT, thumbnail TEXT)');
                    tx.executeSql('CREATE TABLE IF NOT EXISTS archive (filePath TEXT UNIQUE, title TEXT, thumbnail TEXT, quality TEXT, isNew INTEGER)');
                    setDefaultSettings();
                });
}
This will delete the old table and replace it with a clean one. You will then need to remove the inserted line.
hi, i appreciate your help, thanks first of all. but how do insert the drop table command? sorry i'm not very experienced.