extragear/multimedia/amarok

Dan Meltzer parallelgrapefruit at gmail.com
Tue Sep 23 16:23:50 CEST 2008


On Tue, Sep 23, 2008 at 10:09 AM, Ian Monroe <ian.monroe at gmail.com> wrote:
> SVN commit 863921 by ianmonroe:
>
> Enable MySQL Embedded support. So now Amarok 2 requires the libmysqld.a library.
> On OpenSUSE, this is installed with libmysqlclient-devel, YMMV.
>
> We're pretty close to the beta2 tag, so if something is commonly not working
> ping me and I'll revert. It'd be really nice to have this tested in the beta2
> though.
>
> The reason for the 'FindMySQLAmarok' file is that the default FindMySQL couldn't
> find mysql embedded on my system. I figure there might be some more corrections
> needed, then we can submit our changes upstream in ~1 month.

As recently blogged about by the kde-windows team, mysqle is a no go
on windows due to mysql being pretty horrible upstream.

Dan,
>
> CCMAIL: amarok at kde.org
> CCMAIL: amarok-devel at kde.org
>
>  M  +3 -0      CMakeLists.txt
>  M  +2 -0      ChangeLog
>  A             cmake/modules/FindMySQLAmarok.cmake
>  M  +6 -19     src/browsers/servicebrowser/magnatunestore/MagnatuneDatabaseHandler.cpp
>  M  +4 -4      src/collection/sqlcollection/CMakeLists.txt
>  M  +3 -3      src/collection/sqlcollection/SqlCollection.cpp
>
>
> --- trunk/extragear/multimedia/amarok/CMakeLists.txt #863920:863921
> @@ -33,6 +33,9 @@
>  find_package(Strigi REQUIRED)
>  macro_log_feature( STRIGI_FOUND "strigi" "Index metadata of files" "http://strigi.sourceforge.net" TRUE "" "" )
>
> +find_package(MySQLAmarok REQUIRED)
> +macro_log_feature( MYSQL_EMBEDDED_FOUND "mysqld" "Embedded MySQL" "http://www.mysql.com" TRUE "" "" )
> +
>  include_directories (${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${KDE4_INCLUDES} ${TAGLIB_INCLUDES})
>  include(CheckTagLibFileName)
>
> --- trunk/extragear/multimedia/amarok/ChangeLog #863920:863921
> @@ -25,6 +25,8 @@
>     * Add option to enable/disable automatic cover fetching.
>
>   CHANGES:
> +    * Switch from Sqlite to MySQL Embedded (libmysqld), resulting in faster
> +      scanning and collection filtering times.
>     * When saving a new user playlist, the playlist browser immediately shows
>       the newly saved playlist and starts an edit operation on it.
>     * Many small visual and layout tweaks.
> --- trunk/extragear/multimedia/amarok/src/browsers/servicebrowser/magnatunestore/MagnatuneDatabaseHandler.cpp #863920:863921
> @@ -39,24 +39,11 @@
>     //Get database instance
>     SqlStorage *sqlDb = CollectionManager::instance()->sqlStorage();
>
> -    QString tracksAutoIncrement = "";
> -    QString albumsAutoIncrement = "";
> -    QString artistAutoIncrement = "";
> -    QString genreAutoIncrement = "";
> -    QString moodsAutoIncrement = "";
> +    QString autoIncrement = "AUTO_INCREMENT";
>
> -    /*
> -    if ( sqlDb->type() == DbConnection::mysql )
> -    {
> -        tracksAutoIncrement = "AUTO_INCREMENT";
> -        albumsAutoIncrement = "AUTO_INCREMENT";
> -        artistAutoIncrement = "AUTO_INCREMENT";
> -        moodsAutoIncrement = "AUTO_INCREMENT";
> -    }*/
> -
>     // create table containing tracks
>     QString queryString = "CREATE TABLE magnatune_tracks ("
> -                          "id INTEGER PRIMARY KEY " + tracksAutoIncrement + ',' +
> +                          "id INTEGER PRIMARY KEY " + autoIncrement + ',' +
>                           "name " + sqlDb->textColumnType() + ',' +
>                           "track_number INTEGER,"
>                           "length INTEGER,"
> @@ -76,7 +63,7 @@
>
>     //Create album table
>     queryString = "CREATE TABLE magnatune_albums ("
> -                  "id INTEGER PRIMARY KEY " + albumsAutoIncrement + ',' +
> +                  "id INTEGER PRIMARY KEY " + autoIncrement + ',' +
>                   "name " + sqlDb->textColumnType() + ',' +
>                   "year INTEGER,"
>                   "artist_id INTEGER,"
> @@ -94,7 +81,7 @@
>
>     //Create artist table
>     queryString = "CREATE TABLE magnatune_artists ("
> -                  "id INTEGER PRIMARY KEY " + artistAutoIncrement + ',' +
> +                  "id INTEGER PRIMARY KEY " + autoIncrement + ',' +
>                   "name " + sqlDb->textColumnType() + ',' +
>                   "artist_page " + sqlDb->exactTextColumnType() + ',' +
>                   "description " + sqlDb->textColumnType() + ',' +
> @@ -108,7 +95,7 @@
>
>     //create genre table
>     queryString = "CREATE TABLE magnatune_genre ("
> -                  "id INTEGER PRIMARY KEY " + genreAutoIncrement + ',' +
> +                  "id INTEGER PRIMARY KEY " + autoIncrement + ',' +
>                   "name " + sqlDb->textColumnType() + ',' +
>                   "album_id INTEGER" + ");";
>
> @@ -120,7 +107,7 @@
>
>     //create moods table
>      queryString = "CREATE TABLE magnatune_moods ("
> -                  "id INTEGER PRIMARY KEY " + moodsAutoIncrement + ',' +
> +                  "id INTEGER PRIMARY KEY " + autoIncrement + ',' +
>                   "track_id INTEGER," +
>                   "mood " + sqlDb->textColumnType() + ");";
>
> --- trunk/extragear/multimedia/amarok/src/collection/sqlcollection/CMakeLists.txt #863920:863921
> @@ -16,7 +16,7 @@
>         ${KDE4_INCLUDE_DIR}
>         ${STRIGI_INCLUDE_DIR}
>         ${QT_INCLUDES}
> -       #       ${MYSQL_INCLUDE_DIR}
> +        ${MYSQL_INCLUDE_DIR}
>         )
>
>  ########### next target ###############
> @@ -45,7 +45,7 @@
>     SqlMeta.cpp
>     SqliteCollection.cpp
>     ../../sqlite/sqlite3.c
> -    #    MySqlEmbeddedCollection.cpp
> +    MySqlEmbeddedCollection.cpp
>    ${extra_src}
>  )
>
> @@ -64,7 +64,7 @@
>     ${KDE4_KIO_LIBS}
>     ${KDE4_THREADWEAVER_LIBRARIES}
>     ${sqlite_deps}
> -    #    ${MYSQL_EMBEDDED_LIBRARIES} crypt ssl crypto z
> +    ${MYSQL_EMBEDDED_LIBRARIES} crypt ssl crypto z
>  )
>
>  if(APPLE)
> @@ -77,7 +77,7 @@
>  #        MySqlQueryMaker.cpp)
>  #
>  #    kde4_add_plugin(amarok_collection-mysql WITH_PREFIX ${amarok_mysql_SRCS})
> -#    target_link_libraries(amarok_collection-mysql amaroklib ${MYSQL_LIBS} ${KDE4_KDECORE_LIBS} )
> +#    target_link_libraries(amarok_collection-mysql amaroklib ${MYSQL_LIBS} ${KDE4_KDECORE_LIBS} ssl )
>  #    install(TARGETS amarok_collection-mysql DESTINATION ${PLUGIN_INSTALL_DIR})
>  #    install(FILES amarok_collection-mysql.desktop DESTINATION ${SERVICES_INSTALL_DIR})
>  #endif(MYSQL_FOUND)
> --- trunk/extragear/multimedia/amarok/src/collection/sqlcollection/SqlCollection.cpp #863920:863921
> @@ -25,7 +25,7 @@
>  #include "SqlCollectionLocation.h"
>  #include "SqlQueryMaker.h"
>  #include "SqliteCollection.h"
> -//#include "MySqlEmbeddedCollection.h"
> +#include "MySqlEmbeddedCollection.h"
>  //#include "mysqlcollection.h"
>
>  #ifdef Q_OS_WIN32
> @@ -62,8 +62,8 @@
>             break;
>     }*/
>  // uncomment next to test MySQLe (and comment the next to next)
> -//    collection = new MySqlEmbeddedCollection( "localCollection", i18n( "Local Collection" ) );
> -    collection = new SqliteCollection( "localCollection", i18n( "Local Collection" ) );
> +    collection = new MySqlEmbeddedCollection( "localCollection", i18n( "Local Collection" ) );
> +//    collection = new SqliteCollection( "localCollection", i18n( "Local Collection" ) );
>     emit newCollection( collection );
>  }
>
> _______________________________________________
> Amarok-devel mailing list
> Amarok-devel at kde.org
> https://mail.kde.org/mailman/listinfo/amarok-devel
>


More information about the Amarok-devel mailing list