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

Where are ratings saved?

Tags: None
(comma "," separated)
banosd
Registered Member
Posts
2
Karma
0
OS

Where are ratings saved?

Mon Aug 02, 2010 9:30 pm
I was having problems with amarok hanging while updating my collection of over 50000 songs. Ubuntu Lucid, 64-bit, version 2.3.1. It started happening gradually, as it was smooth before. I backed up and deleted the amarok subfolder in /.kde/share/apps/amarok and it is running smooth again. However, I lost all my ratings which is a big reason I use amarok in the first place. Is there a way to transfer just the ratings part from what I backed up?
valoriez
KDE CWG
Posts
625
Karma
3
OS

Re: Where are ratings saved?

Mon Aug 02, 2010 10:01 pm
Did you try Settings > Configure Amarok > Collection > Import Statistics ?
banosd
Registered Member
Posts
2
Karma
0
OS

Re: Where are ratings saved?

Tue Aug 03, 2010 12:18 am
That won't work for me as the database I backed up was embedded. There was no username or password setup
User avatar
Dieter Schroeder
Registered Member
Posts
714
Karma
7
OS

Re: Where are ratings saved?

Fri Aug 06, 2010 6:33 pm
Just copying over the statistics tables won't help.
Assuming that you just copied the amarok db inside the mysqle folder

Code: Select all
cd directory_where_your_backup_lives
/usr/sbin/mysqld --default-storage-engine=MyISAM --datadir=`pwd` --socket=`pwd`/sock --skip-grant-tables --skip-innodb


open another console:
Code: Select all
cd directory_where_your_backup_lives
mysqldump --socket=`pwd`/sock --add-drop-table amarok statistics* >statistics.sql


If you're running into errors here, retry with
statistics statistics_tag statistics_permanent
instead of
statistics*


Find the correct mysqld to kill (there should be 2, one is from akonadi)
Code: Select all
ps aux|grep mysqld
kill -15 enter_correct_PID


cd into ~/.kde4/share/apps/amarok and start mysqld again

Code: Select all
/usr/sbin/mysqld --default-storage-engine=MyISAM --datadir=`pwd`/mysqle --socket=`pwd`/sock --skip-grant-tables --skip-innodb


Code: Select all
cd ~/.kde(4)/share/apps/amarok/
cp directory_where_your_backup_lives/statistics.sql .
mysql --socket=`pwd`/sock


on the mysql prompt do
Code: Select all
mysql>use amarok
mysql>.\ statistics.sql
mysql>quit


If you get an error here, that mysql can't find the file, copy statistics.sql over to current dir and retry.

Be aware that the relations between track and statistic may or may not be correct. I'm not sure, that mysql restore the correct relations.
Make a backup of the current db and give it a try.

m0nk


If men could get pregnant, abortion would be a sacrament.


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Google [Bot], Yahoo [Bot]