extragear/multimedia/amarok/src

Maximilian Kossick maximilian.kossick at googlemail.com
Tue Jan 13 08:40:27 CET 2009


Why was this committed without proper support for database updates in
SqlCollection? I nearly freaked out when I saw the upgradeVersion1to2
method in DatabaseUpdater. Does anybody here remember the mess that is
A1's database update code? Do we really want to start down the same
path again?

On Mon, Jan 12, 2009 at 8:57 PM, Alex Merry <kde at randomguy3.me.uk> wrote:
> SVN commit 910170 by alexmerry:
>
> Replay Gain support, stage 1: getting the metadata into the database.
>
> BIG FAT WARNING: this will change the database schema, and force a complete rescan of your collection.  You won't lose statistics data, unless this change gets reverted or you try to go back to an older version of Amarok, in which case your database won't work (older versions of Amarok will, in fact, wipe and refuse to recreate the database in this case).
>
> Outline:
> * Make amarokcollectionscanner get replay gain data (not for all files yet) from metadata tags
> * Add four new entries to Meta::Field, containing the Xesam tags for albumGain, albumPeakGain, trackGain and trackPeakGain
> * Add four new columns (albumgain, albumpeakgain, trackgain and trackpeakgain) to the tracks table
> * Spruce up the database upgrade path
> * Make both ScanManager/ScanResultProcessor and the Xesam importer for sqlcollection get the above data
> * Put the new data in the database
>
> Changes from the patch I posted on amarok-devel:
> * include peak data, which is needed to prevent clipping (so there are four new fields, not two)
> * scan for replay gain tags in ID3v2 metadata of MP3 files (such as created by Foobar2000).
>  Other formats will follow.  Only Ogg Vorbis files have been tested.
> * Amarok will complain and exit if you try to run it with a newer version of the database
>  (ie: version 3 or later, which has not been made yet)
>
> I suggest you back up $KDEHOME/share/apps/amarok before running this version if you care about your collection data.  If you care about your stats and you are running trunk, you should be doing this regularly anyway.
>
>
>
>  M  +42 -6     collection/sqlcollection/DatabaseUpdater.cpp
>  M  +1 -0      collection/sqlcollection/DatabaseUpdater.h
>  M  +14 -0     collection/sqlcollection/ScanManager.cpp
>  M  +29 -4     collection/sqlcollection/ScanResultProcessor.cpp
>  M  +16 -7     collection/sqlcollection/XesamCollectionBuilder.cpp
>  M  +98 -3     collectionscanner/CollectionScanner.cpp
>  M  +4 -0      meta/MetaUtility.h
>
>
>


More information about the Amarok-devel mailing list