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

copy stats from one track to an other track?

Tags: amarok, statistics, stats, mysql amarok, statistics, stats, mysql amarok, statistics, stats, mysql
(comma "," separated)
User avatar
multimedia
Registered Member
Posts
38
Karma
0
OS
I've very old low quality mp3 files that I've ripped maybe more than 10 years ago because in those days my computer had very low specs. Now I have a much better computer and want to rip the same tracks again with better quality settings, but I don't want to loose the stats.

Is there an application that can make it easy to copy the stats from one track to an other track? If not, I'm willing to log in to mysql and execute some commands, can some one tell me which commands I should execute?

Thanks.
User avatar
Dieter Schroeder
Registered Member
Posts
714
Karma
7
OS
If you name it the same and the tags are the same, Amarok should keep the stats, because the statistics tables only contain references to the tracks.
You should try it with one and see what happens.

m0nk


If men could get pregnant, abortion would be a sacrament.
User avatar
multimedia
Registered Member
Posts
38
Karma
0
OS
Dieter Schroeder wrote:If you name it the same and the tags are the same, Amarok should keep the stats, because the statistics tables only contain references to the tracks.


You mean also keep the filename the same? I was thinking of ripping the tracks to flac instead of mp3.

This is what I'm going to try:
1. dump the amarok database with mysqldump;
2. make copy of the dumpfile;
3. change old filenames to new with: sed "s:/path/to/old.mp3:/path/to/new.flac:g" dumpfile;
4. import the altered dumpfile in to mysql.
User avatar
Dieter Schroeder
Registered Member
Posts
714
Karma
7
OS
Should work. You can use this script for creating a dump:
Code: Select all
#!/bin/sh
/usr/sbin/mysqld --defaults-file=`pwd`/my.cnf --default-storage-engine=MyISAM --datadir=`pwd`/mysqle --socket=`pwd`/sock --skip-grant-tables --skip-innodb --skip-networking &
sleep 5
mysqldump -S `pwd`/sock amarok > amarok-`date +%d-%m-%Y-%k:%M`.sql

Stop and close Amarok before and run it from within your $KDEHOME/share/apps/amarok folder.
And then happy seding :-)
Or type:
Code: Select all
mysql -S `pwd/sock`
mysql>use amarok;

and then use UPDATE statements to change the extensions.

m0nk


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


Bookmarks



Who is online

Registered users: Baidu [Spider], Bing [Bot], Google [Bot], rblackwell