Registered Member
|
I'm trying to merge scores from Amarok at work into my home Amarok. Both are similar KDE versions so I though this would be easy enough.
All I need to do is grab the stats from one instances sqlite database and insert them into the other. Export from 'work' # cd /tmp # sqlite3 collection.db .dump > work-collection.sql # cat work-collection.sql | grep 'INSERT INTO "statistics"'|perl -pe 's!./home/workuser/mp3!./falken/smb4k/server-mp3!' | perl -pe 's!INSERT INTO!INSERT OR IGNORE INTO!' > work-collection-trim.sql # grep Babu work-collection-trim.sql INSERT OR IGNORE INTO "statistics" VALUES('./falken/smb4k/server-mp3/Babushka.mp3',1,1152891638,1222854768,40.8889,8,9,'b82b09481ba522440308ca2701c44557',0); Import to 'home' # cd ~/.kde/share/apps/amarok # sqlite3 collection.db ".read /tmp/work-collection-trim.sql" However, this doesn't seem to work in that I don't see the scores when I start the 'home' Amarok. In fact, if I compare a .dump of collection.db before and after scoring a track, I see no difference. Where does Amarok (v2.3.1) store the scores for tracks ? If the answer is collection.db, why does this not show up when I 'diff' .dump's before and after scoring ? |
Manager
|
Why are you going through hoops? Please check the Settings -> Collection, there is an Import Statistics button that allows you to import statistics and ratings from Amarok 1.4.x
Amarok 2.x uses MySQL only, either the embedded default version or allows the use of an external MySQL server.
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 ... |
Registered Member
|
Oh, right, eek. I was looking in the wrong place.
I want the files in /home/falken/.kde/share/apps/amarok/ Do you know if anyone has done this before ?
Last edited by tomchiverton on Tue Jul 20, 2010 11:40 am, edited 1 time in total.
|
Manager
|
Then both are MySQL, not SQLite anyway, as I wrote above, Amarok 2.x only uses MySQL, default is mysqle (see $HOME/.kde/share/apps/amarok/mysqle/amarok)
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 ... |
Registered Member
|
I'm amazed no one seems to have tried doing this before...
|
Manager
|
Simply because people don't use different databases on different 2.x versions, and there is absolutely no need to. Making a regular backup of the database is enough.
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 ... |
Registered Member
|
I would have though having one Amarok at work, and one at home (or one on the media centre and one on the laptop) would be fairly common.
Must just be me... |
Registered Member
|
In case anyone else does need to do this : http://rachaelandtom.info/merge-amarok-collections
|
Registered Member
|
Hello Tom,
why don't you dump the db on the source pc, instead of archiving the whole amarok db? And why won't you connect through the socket, if you create one? But the idea itself is nice, although a bit rough until now. I'll take a look at your script. Regards m0nk
If men could get pregnant, abortion would be a sacrament.
|
Registered Member
|
You certainly could do the source-to-SQL conversion in situ, rather than bringing the DB across if you wanted too.
I couldn't get Perl's DBI database connector to talk over a socket. It's very rough But it's something I'll only need to do once in a blue moon. |
Registered Member
|
I still use amarok 1.4.x (under Trinity, a KDE3.5 fork). I'd like to merge counts and votes from 3 or 4 sqlite dbs to a single one, it would also ease a possible upgrade to amarok2.
Have you ever heard of any tool like this around there? Thank you. |
Registered Member
|
Yeah, it'd be doable, just use my script more than once
|
Registered Member
|
But your script is for amarok2, right? Does the SQL scheme remain the same? It would be surprizing since a custom option have been made available in amarok2 to import sqlite DB from amarok1.4.x. |
Registered Member
|
I thought you said you were migrating to Amarok2?
|
Registered Member
|
Not exactly:
I still use amarok 1.4.x and I don't plan to upgrade shortly. What I meant was that after merging various 1.4.x DBs, it would be straightforward to jump in amarok2 and use a single MySQL DB. So, the scheme might have changed a lot, isn't it? |
Registered users: Bing [Bot], gfielding, Google [Bot], markhm, sethaaaa, Sogou [Bot], Yahoo [Bot]