<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Import ratings from other players esp Clementine]]></title><description><![CDATA[<p dir="auto">Now we have smart playlists, this will be bound to attract more users from Clementine to swap, but if like me they have spent decades building up Play counts and ratings on which the Smart playlists are based, it would be a dreadful chore to try to recreate.</p>
<p dir="auto">Therefore an imprt from the Clementine app or at least from the Id3 of the music during the initial full scan.</p>
]]></description><link>https://forum.strawberrymusicplayer.org/topic/113/import-ratings-from-other-players-esp-clementine</link><generator>RSS for Node</generator><lastBuildDate>Sat, 07 Mar 2026 11:59:58 GMT</lastBuildDate><atom:link href="https://forum.strawberrymusicplayer.org/topic/113.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 26 Oct 2020 14:13:49 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Import ratings from other players esp Clementine on Mon, 12 Dec 2022 20:53:19 GMT]]></title><description><![CDATA[<p dir="auto">Hello,</p>
<p dir="auto">I don't know if it's a related script branch but i imported my itunes metadata (playcount, lastplayed, .. first into clementine) and then used the <a href="https://musconv.com/itunes-to-clementine/" rel="nofollow ugc">https://musconv.com/itunes-to-clementine/</a> script which suited me fine!<br />
I have ALL my data in strawberry ...</p>
]]></description><link>https://forum.strawberrymusicplayer.org/post/2112</link><guid isPermaLink="true">https://forum.strawberrymusicplayer.org/post/2112</guid><dc:creator><![CDATA[Timpie]]></dc:creator><pubDate>Mon, 12 Dec 2022 20:53:19 GMT</pubDate></item><item><title><![CDATA[Reply to Import ratings from other players esp Clementine on Thu, 15 Jul 2021 22:10:01 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://forum.strawberrymusicplayer.org/uid/125">@rolf</a> great work! Moved to <a href="https://gist.github.com/pabloab/f677046b796c22b99bf48c8dd61c286a" rel="nofollow ugc">this Github gist</a>. People could suggest changes there.<br />
Now getting "Error: no such column: rating" (Clementine 1.4 rc1, Strawberry 0.9.3).</p>
<p dir="auto">BTW, just to make it easier for others, default locations are</p>
<pre><code>./clementine2strawberry.sh ~/.config/Clementine/clementine.db ~/.local/share/strawberry/strawberry/strawberry.db
</code></pre>
]]></description><link>https://forum.strawberrymusicplayer.org/post/944</link><guid isPermaLink="true">https://forum.strawberrymusicplayer.org/post/944</guid><dc:creator><![CDATA[PabloAB]]></dc:creator><pubDate>Thu, 15 Jul 2021 22:10:01 GMT</pubDate></item><item><title><![CDATA[Reply to Import ratings from other players esp Clementine on Tue, 10 Nov 2020 23:38:10 GMT]]></title><description><![CDATA[<p dir="auto">Nice job.<br />
I made a guide now to import most data from Clementine:</p>
<p dir="auto"><a href="https://github.com/strawberrymusicplayer/strawberry/wiki/Import-collection-library-and-playlists-data-from-Clementine" rel="nofollow ugc">https://github.com/strawberrymusicplayer/strawberry/wiki/Import-collection-library-and-playlists-data-from-Clementine</a></p>
<p dir="auto">This is useful for users who want to import all their playlists from Clementine, since playlists are based on ROWID's from the collection library, it is necessary to import the collection too.</p>
<p dir="auto">It would be great if you want to make a script.</p>
]]></description><link>https://forum.strawberrymusicplayer.org/post/356</link><guid isPermaLink="true">https://forum.strawberrymusicplayer.org/post/356</guid><dc:creator><![CDATA[jonas]]></dc:creator><pubDate>Tue, 10 Nov 2020 23:38:10 GMT</pubDate></item><item><title><![CDATA[Reply to Import ratings from other players esp Clementine on Mon, 09 Nov 2020 11:22:17 GMT]]></title><description><![CDATA[<p dir="auto"><strong>For those running Linux, here's an experimental, quick-and-dirty bash script that updates a Strawberry database with rating, playcount, skipcount, lastplayed values taken from an existing Clementine database file.</strong> Save it e.g. as <a href="http://clementine2strawberry.sh" rel="nofollow ugc">clementine2strawberry.sh</a> and make it executable.</p>
<p dir="auto"><strong>Never work on the original database files</strong> (~.config/Clementine/clementine.db and ~/.local/share/strawberry/strawberry/strawberry.db) - rather copy both to a working directory and store an additional backup in a safe place.</p>
<p dir="auto">Usage of the script, in your working directory:</p>
<pre><code>/path/to/clementine2strawberry.sh clementine.db strawberry.db
</code></pre>
<p dir="auto">If the update is successful, you can try to replace ~/.local/share/strawberry/strawberry/strawberry.db with its updated version, fire up Strawberry, and see whether your Clementine data has been correctly imported.</p>
<p dir="auto">A few technical notes:</p>
<ul>
<li>The fields are simply overwritten with what is found in Clementine's DB - there is, e.g., no summing up of Clementine &amp; Strawberry playcounts.</li>
<li>If you're reading this post in the "distant future", chances are that database schemata might have changed and you need to update the script to cope with that.</li>
<li>I had expected Clementine's songs.filename and Strawberry's songs.url to match, but oddly, without a TRIM(), they don't. Since a TRIM in the update statement makes that run for ages, I TRIM both columns upfront. That is, both .db files will be changed!</li>
<li>To cope with slightly different database schemes, it's necessary to use COALESCE() to supply suitable default values where clementine.db does not contain real values.</li>
</ul>
<pre><code>#!/bin/bash

CLEMENTINE_DB="$1"
STRAWBERRY_DB="$2"

UNIQUE_KEY_CLEMENTINE=filename
UNIQUE_KEY_STRAWBERRY=url

validate_db() {
    if &lsqb;&lsqb; ! -f "${1}" &rsqb;&rsqb;; then
        echo $2 database file $1 does not exist
        exit 1
    fi

    if sqlite3 "$1"  "pragma integrity_check;" &gt; /dev/null
    then
        echo $2 database file $1 integrity check OK.
    else
        echo $2 database file $1 integrity check FAILED.
        exit 1
    fi
}

echo Validating database existence and integrity...
validate_db "$CLEMENTINE_DB" "Clementine"
validate_db "$STRAWBERRY_DB" "Strawberry"

# Columns to transfer, respective sequences must match:
# (COALESCE Clementine values to conform to Strawberry schema and default values.)
CLEMENTINE_COLUMNS="COALESCE(rating,-1),COALESCE(playcount,0),COALESCE(skipcount,0),COALESCE(lastplayed,-1)"
STRAWBERRY_COLUMNS="rating,playcount,skipcount,lastplayed"


# Trim unique key columns (rows won't match without):
sqlite3 "$1" "UPDATE songs SET $UNIQUE_KEY_CLEMENTINE = trim($UNIQUE_KEY_CLEMENTINE);"
sqlite3 "$2" "UPDATE songs SET $UNIQUE_KEY_STRAWBERRY = trim($UNIQUE_KEY_STRAWBERRY);"


echo
echo Updating database $STRAWBERRY_DB using this SQL statement:

if sqlite3 -echo "$2" "ATTACH '$1' AS clementine; UPDATE main.songs SET ($STRAWBERRY_COLUMNS)=(SELECT $CLEMENTINE_COLUMNS FROM clementine.songs WHERE main.songs.$UNIQUE_KEY_STRAWBERRY=clementine.songs.$UNIQUE_KEY_CLEMENTINE) WHERE EXISTS (SELECT * FROM clementine.songs WHERE main.songs.$UNIQUE_KEY_STRAWBERRY=clementine.songs.$UNIQUE_KEY_CLEMENTINE);"
then
    echo Database update successful. MAKE A BACKUP OF THE ORIGINAL, before you use the updated one.
else
    echo Database update FAILED.
fi
</code></pre>
]]></description><link>https://forum.strawberrymusicplayer.org/post/335</link><guid isPermaLink="true">https://forum.strawberrymusicplayer.org/post/335</guid><dc:creator><![CDATA[Rolf]]></dc:creator><pubDate>Mon, 09 Nov 2020 11:22:17 GMT</pubDate></item></channel></rss>