[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    Re: branches/stable/extragear/multimedia/amarok
From:       Ian Monroe <ian () monroe ! nu>
Date:       2006-01-17 17:24:45
Message-ID: f680fec50601170924l1fb842e9v7ebc76ec7fb3c40 () mail ! gmail ! com
[Download RAW message or body]

Couldn't we just drop support for musicbrainz 0.2? Musicbrainz is a
buggy enough library without supporting multiple versions.

This evening I'll compile musicbrainz 0.4 without MP3 support to make
sure the hang bug isn't a problem.

Ian

On 1/17/06, Dirk Mueller <mueller@kde.org> wrote:
> SVN commit 499350 by mueller:
> 
> support musicbrainz 0.4.x
> BUG:94988
> 
> 
> M  +3 -1      configure.in.in
> M  +26 -3     src/ktrm.cpp
> 
> 
> --- branches/stable/extragear/multimedia/amarok/configure.in.in #499349:499350
> @@ -591,7 +591,9 @@
> fi
> 
> if test "$build_musicbrainz" = "yes"; then
> -    AC_DEFINE(HAVE_TUNEPIMP, 1, [have TunePimp])
> +    AC_CHECK_LIB(tunepimp, tp_SetFileNameEncoding,
> +      AC_DEFINE(HAVE_TUNEPIMP, 4, [have MusicBrainz 0.4.x]),
> +      AC_DEFINE(HAVE_TUNEPIMP, 1, [have MusicBrainz]))
> LIB_TUNEPIMP="-ltunepimp"
> have_tunepimp=yes
> else
> --- branches/stable/extragear/multimedia/amarok/src/ktrm.cpp #499349:499350
> @@ -42,7 +42,11 @@
> 
> extern "C"
> {
> +#if HAVE_TUNEPIMP >= 4
> +    static void TRMNotifyCallback(tunepimp_t pimp, void *data, TPCallbackEnum \
> type, int fileId, TPFileStatus status); +#else
> static void TRMNotifyCallback(tunepimp_t pimp, void *data, TPCallbackEnum type, int \
> fileId); +#endif
> }
> 
> /**
> @@ -66,7 +70,11 @@
> int id;
> 
> if(!m_fileMap.contains(lookup->file())) {
> +#if HAVE_TUNEPIMP >= 4
> +            id = tp_AddFile(m_pimp, QFile::encodeName(lookup->file()), 0);
> +#else
> id = tp_AddFile(m_pimp, QFile::encodeName(lookup->file()));
> +#endif
> m_fileMap.insert(lookup->file(), id);
> }
> else {
> @@ -121,7 +129,11 @@
> tp_SetAutoSaveThreshold(m_pimp, -1);
> tp_SetMoveFiles(m_pimp, false);
> tp_SetRenameFiles(m_pimp, false);
> +#if HAVE_TUNEPIMP >= 4
> +        tp_SetFileNameEncoding(m_pimp, "UTF-8");
> +#else
> tp_SetUseUTF8(m_pimp, true);
> +#endif
> tp_SetNotifyCallback(m_pimp, TRMNotifyCallback, 0);
> 
> if(KProtocolManager::useProxy()) {
> @@ -244,14 +256,19 @@
> /**
> * Callback fuction for TunePimp lookup events.
> */
> -
> -static void TRMNotifyCallback(tunepimp_t pimp, void *, TPCallbackEnum type, int \
> fileId) +#if HAVE_TUNEPIMP >= 4
> +static void TRMNotifyCallback(tunepimp_t pimp, void *data, TPCallbackEnum type, \
> int fileId, TPFileStatus status) +#else
> +static void TRMNotifyCallback(tunepimp_t pimp, void *data, TPCallbackEnum type, \
> int fileId) +#endif
> {
> if(type != tpFileChanged)
> return;
> 
> track_t track = tp_GetTrack(pimp, fileId);
> +#if HAVE_TUNEPIMP < 4
> TPFileStatus status = tr_GetStatus(track);
> +#endif
> 
> switch(status) {
> case eRecognized:
> @@ -556,10 +573,16 @@
> KTRMResult result;
> 
> result.d->title = QString::fromUtf8(tracks[i]->name);
> +#if HAVE_TUNEPIMP >= 4
> +               result.d->artist = QString::fromUtf8(tracks[i]->artist.name);
> +                result.d->album = QString::fromUtf8(tracks[i]->album.name);
> +                result.d->year = tracks[i]->album.releaseYear;
> +#else
> result.d->artist = QString::fromUtf8(tracks[i]->artist->name);
> result.d->album = QString::fromUtf8(tracks[i]->album->name);
> +                result.d->year = tracks[i]->album->releaseYear;
> +#endif
> result.d->track = tracks[i]->trackNum;
> -                result.d->year = tracks[i]->album->releaseYear;
> result.d->relevance =
> 4 * stringSimilarity(strList,result.d->title) +
> 2 * stringSimilarity(strList,result.d->artist) +
> 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic