Update to 2.2.2nb3 from wip, packaged by myself.
This is the KDE4 version of amarok, lots of changes. Try it out!
This commit is contained in:
parent
777266b089
commit
f2fb550aed
9 changed files with 1000 additions and 1189 deletions
|
@ -4,3 +4,5 @@ interface, that doesn't get in the way of the user. How many buttons
|
|||
do you have to press for simply adding some new tracks to the
|
||||
playlist? amaroK tries to be a little different, providing a simple
|
||||
drag and drop interface, that really makes playlist handling easy.
|
||||
|
||||
This package contains the KDE4 version of amarok.
|
||||
|
|
|
@ -1,87 +1,61 @@
|
|||
# $NetBSD: Makefile,v 1.78 2010/02/16 08:58:49 wiz Exp $
|
||||
# $NetBSD: Makefile,v 1.79 2010/02/16 09:01:46 wiz Exp $
|
||||
#
|
||||
|
||||
DISTNAME= amarok-${VERSION}
|
||||
VERSION= 1.4.10
|
||||
PKGREVISION= 9
|
||||
CATEGORIES= audio kde
|
||||
MASTER_SITES= ${MASTER_SITE_KDE:=amarok/${VERSION}/src/}
|
||||
EXTRACT_SUFX= .tar.bz2
|
||||
DISTNAME= amarok-${VERS}
|
||||
VERS= 2.2.2
|
||||
PKGREVISION= 3
|
||||
CATEGORIES= audio multimedia
|
||||
#MASTER_SITES= http://download.kde.org/unstable/amarok/${VERS}/src/ \
|
||||
# ftp://gd.tuwien.ac.at/kde/unstable/amarok/${VERS}/src/
|
||||
MASTER_SITES= http://download.kde.org/stable/amarok/${VERS}/src/ \
|
||||
ftp://gd.tuwien.ac.at/kde/stable/amarok/${VERS}/src/
|
||||
EXTRACT_SUFX= .tar.bz2
|
||||
|
||||
MAINTAINER= wiz@NetBSD.org
|
||||
HOMEPAGE= http://amarok.kde.org/
|
||||
COMMENT= KDE audio player
|
||||
MAINTAINER= wiz@NetBSD.org
|
||||
HOMEPAGE= http://amarok.kde.org/
|
||||
COMMENT= KDE4 audio player
|
||||
LICENSE= gnu-gpl-v2 AND gnu-fdl-v1.2 AND gnu-lgpl-v2.1
|
||||
|
||||
BUILD_DEPENDS+= automoc4>=0.9.83:../../devel/automoc4
|
||||
DEPENDS+= moodbar-[0-9]*:../../audio/moodbar
|
||||
|
||||
PKG_DESTDIR_SUPPORT= user-destdir
|
||||
|
||||
DEPENDS+= unzip-[0-9]*:../../archivers/unzip
|
||||
USE_CMAKE= yes
|
||||
USE_LANGUAGES= c c++
|
||||
USE_TOOLS+= msgfmt pkg-config
|
||||
|
||||
USE_TOOLS+= gmake pkg-config msgfmt
|
||||
USE_LANGUAGES= c c++
|
||||
GNU_CONFIGURE= yes
|
||||
USE_LIBTOOL= yes
|
||||
CMAKE_ARGS+= -DMYSQL_INCLUDE_DIR:PATH=${BUILDLINK_PREFIX.mysql-embedded}/mysqld/include/mysql
|
||||
CMAKE_ARGS+= -DMYSQL_EMBEDDED_LIBRARIES:PATH=${BUILDLINK_PREFIX.mysql-embedded}/mysqld/lib/mysql/libmysqld.a
|
||||
CMAKE_ARGS+= -DMYSQL_EMBEDDED_FOUND:BOOL=TRUE
|
||||
CMAKE_ARGS+= -DHAVE_MYSQL_OPT_EMBEDDED_CONNECTION:BOOL=TRUE
|
||||
CMAKE_ARGS+= -DMYSQL_LIBRARIES:PATH=${BUILDLINK_PREFIX.mysql-embedded}/mysqld/lib/mysql/libmysqlclient.so
|
||||
|
||||
CONFIGURE_ARGS+= --without-nmm
|
||||
CONFIGURE_ARGS+= --without-mas
|
||||
CONFIGURE_ARGS+= --without-helix
|
||||
CONFIGURE_ARGS+= --with-mp4v2
|
||||
CONFIGURE_ARGS+= --with-mp4v2-dir=${BUILDLINK_PREFIX.libmp4v2}
|
||||
|
||||
LIBS+= ${LIBOSSAUDIO}
|
||||
|
||||
PYTHON_PATCH_SCRIPTS= \
|
||||
amarok/src/scripts/common/Publisher.py \
|
||||
amarok/src/scripts/common/Zeroconf.py \
|
||||
amarok/src/scripts/playlist2html/Playlist.py \
|
||||
amarok/src/scripts/webcontrol/Playlist.py \
|
||||
amarok/src/scripts/playlist2html/PlaylistServer.py \
|
||||
amarok/src/scripts/playlist2html/playlist2html.py \
|
||||
amarok/src/scripts/templates/python_qt_template.py \
|
||||
amarok/src/scripts/webcontrol/Globals.py \
|
||||
amarok/src/scripts/playlist2html/Playlist.py \
|
||||
amarok/src/scripts/webcontrol/Playlist.py \
|
||||
amarok/src/scripts/webcontrol/RequestHandler.py \
|
||||
amarok/src/scripts/webcontrol/WebControl.py \
|
||||
amarok/src/scripts/webcontrol/WebPublisher.py
|
||||
REPLACE_RUBY= \
|
||||
amarok/src/amarok_proxy.rb \
|
||||
amarok/src/mediadevice/daap/amarok_daapserver.rb \
|
||||
amarok/src/scripts/lyrics_astraweb/lyrics_astraweb.rb \
|
||||
amarok/src/scripts/lyrics_lyrc/lyrics_lyrc.rb \
|
||||
amarok/src/scripts/ruby_debug/debug.rb \
|
||||
amarok/src/scripts/score_default/score_default.rb \
|
||||
amarok/src/scripts/score_impulsive/score_impulsive.rb \
|
||||
amarok/src/scripts/templates/amarok.rb \
|
||||
amarok/src/scripts/templates/ruby_qt_template.rb
|
||||
|
||||
SUBST_CLASSES+= dotkdedir
|
||||
SUBST_STAGE.dotkdedir= post-patch
|
||||
SUBST_MESSAGE.dotkdedir=Replacing .kde/share with .kde/share/kde
|
||||
SUBST_FILES.dotkdedir= \
|
||||
amarok/src/scripts/playlist2html/Playlist.py \
|
||||
amarok/src/scripts/webcontrol/Playlist.py \
|
||||
doc/*/config.docbook doc/*/faq.docbook doc/*/advanced.docbook
|
||||
SUBST_SED.dotkdedir= -e 's,\.kde/share/,.kde/share/kde/,'
|
||||
|
||||
BUILDLINK_API_DEPENDS.kdebase+= kdebase>=3.3.0
|
||||
BUILDLINK_API_DEPENDS.kdelibs+= kdelibs>=3.3.0
|
||||
BUILDLINK_API_DEPENDS.taglib+= taglib>=1.4
|
||||
SUBST_CLASSES+= mysql
|
||||
SUBST_STAGE.mysql= post-patch
|
||||
SUBST_MESSAGE.mysql= Fixup paths for MySQL embedded
|
||||
SUBST_FILES.mysql= cmake/modules/FindMySQLAmarok.cmake
|
||||
SUBST_FILES.mysql+= src/collection/mysqlecollection/CMakeLists.txt
|
||||
SUBST_SED.mysql= -e s:/opt/mysqle/:${BUILDLINK_PREFIX.mysql-embedded}/mysqld:
|
||||
SUBST_SED.mysql+= -e s:@@WLR@@:${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.mysql-embedded}/mysqld/lib/mysql:
|
||||
|
||||
.include "options.mk"
|
||||
|
||||
.include "../../audio/libtunepimp/buildlink3.mk"
|
||||
.include "../../audio/libvisual/buildlink3.mk"
|
||||
.include "../../devel/SDL/buildlink3.mk"
|
||||
.include "../../audio/liblastfm/buildlink3.mk"
|
||||
BUILDLINK_API_DEPENDS.taglib+= taglib>=1.6nb1
|
||||
.include "../../audio/taglib/buildlink3.mk"
|
||||
.include "../../audio/taglib-extras/buildlink3.mk"
|
||||
.include "../../databases/mysql51-embedded/buildlink3.mk"
|
||||
.include "../../devel/qtscriptgenerator/buildlink3.mk"
|
||||
.include "../../graphics/hicolor-icon-theme/buildlink3.mk"
|
||||
.include "../../lang/python/application.mk"
|
||||
.include "../../lang/ruby/buildlink3.mk"
|
||||
.include "../../lang/ruby/replace.mk"
|
||||
.include "../../meta-pkgs/kde3/kde3.mk"
|
||||
.include "../../mk/oss.buildlink3.mk"
|
||||
.include "../../multimedia/kdemultimedia3/buildlink3.mk"
|
||||
.include "../../multimedia/libmp4v2/buildlink3.mk"
|
||||
.include "../../multimedia/xine-lib/buildlink3.mk"
|
||||
.include "../../meta-pkgs/kde4/kde4.mk"
|
||||
.include "../../multimedia/kdemultimedia4/buildlink3.mk"
|
||||
.include "../../security/qca2/buildlink3.mk"
|
||||
.include "../../sysutils/desktop-file-utils/desktopdb.mk"
|
||||
.include "../../x11/kdebase3/buildlink3.mk"
|
||||
.include "../../x11/kdelibs3/buildlink3.mk"
|
||||
# for plasma
|
||||
.include "../../x11/kdebase-workspace4/buildlink3.mk"
|
||||
BUILDLINK_API_DEPENDS.kdelibs+= kdelibs4>=4.3.0
|
||||
.include "../../x11/kdelibs4/buildlink3.mk"
|
||||
BUILDLINK_API_DEPENDS.qt4-libs+= qt4-libs>=4.5.0
|
||||
.include "../../x11/qt4-libs/buildlink3.mk"
|
||||
.include "../../mk/bsd.pkg.mk"
|
||||
|
|
1451
audio/amarok/PLIST
1451
audio/amarok/PLIST
File diff suppressed because it is too large
Load diff
|
@ -1,9 +1,8 @@
|
|||
$NetBSD: distinfo,v 1.37 2009/02/15 11:22:48 wiz Exp $
|
||||
$NetBSD: distinfo,v 1.38 2010/02/16 09:01:46 wiz Exp $
|
||||
|
||||
SHA1 (amarok-1.4.10.tar.bz2) = cb0bebe99c6f4dc1b01601f2f3aee3a86da08fbd
|
||||
RMD160 (amarok-1.4.10.tar.bz2) = f86c71dd0459e0cf1ff586cd6de240ca6501cf62
|
||||
Size (amarok-1.4.10.tar.bz2) = 12812583 bytes
|
||||
SHA1 (patch-aa) = 53316f334f45a8a4780ae71061d528374a75cb5a
|
||||
SHA1 (patch-ab) = 91097c1d901fb66c5c8e593005c462b1874f50bf
|
||||
SHA1 (patch-ac) = ea6900aafc3cd99069ac59929ae14296662d095f
|
||||
SHA1 (patch-ad) = eea8105897ce4cd9d4a086430ec0588125b3517b
|
||||
SHA1 (amarok-2.2.2.tar.bz2) = 2075299b856477cf55cba8ba983ea25a93dc139b
|
||||
RMD160 (amarok-2.2.2.tar.bz2) = 0782c4b032d318179bd8bb91353f8e33772d2912
|
||||
Size (amarok-2.2.2.tar.bz2) = 8788107 bytes
|
||||
SHA1 (patch-aa) = 524a9563db17cbf5e234f2ebe261820326e5d30d
|
||||
SHA1 (patch-ab) = 62beea32f17ce6e138702e740d089c6257ddfced
|
||||
SHA1 (patch-ac) = c8c111d0927efe56a07ce89b2ec788a6364257aa
|
||||
|
|
|
@ -1,30 +1,44 @@
|
|||
# $NetBSD: options.mk,v 1.6 2008/09/22 05:35:20 wiz Exp $
|
||||
# $NetBSD: options.mk,v 1.7 2010/02/16 09:01:46 wiz Exp $
|
||||
|
||||
PKG_OPTIONS_VAR= PKG_OPTIONS.amarok
|
||||
PKG_SUPPORTED_OPTIONS= libgpod libmtp mysql pgsql
|
||||
PKG_SUPPORTED_OPTIONS= libgpod libmp4v2 libmtp libvisual mp3tunes
|
||||
PKG_SUGGESTED_OPTIONS= libgpod libmp4v2 libmtp libvisual mp3tunes
|
||||
|
||||
.include "../../mk/bsd.options.mk"
|
||||
|
||||
PLIST_VARS+= ipod libmtp
|
||||
|
||||
.if !empty(PKG_OPTIONS:Mlibgpod)
|
||||
PLIST.ipod= yes
|
||||
CONFIGURE_ARGS+= --enable-libgpod
|
||||
BUILDLINK_API_DEPENDS.libgpod+= libgpod>=0.4.2
|
||||
. include "../../audio/libgpod/buildlink3.mk"
|
||||
BUILDLINK_API_DEPENDS.libgpod+= libgpod>=0.6.0nb1
|
||||
.include "../../audio/libgpod/buildlink3.mk"
|
||||
.include "../../x11/gtk2/buildlink3.mk"
|
||||
.endif
|
||||
|
||||
# libifp is currently not supported
|
||||
#.if !empty(PKG_OPTIONS:Mlibifp)
|
||||
#.include "../../audio/libifp/buildlink3.mk"
|
||||
#.endif
|
||||
|
||||
.if !empty(PKG_OPTIONS:Mlibmp4v2)
|
||||
.include "../../multimedia/libmp4v2/buildlink3.mk"
|
||||
.endif
|
||||
|
||||
.if !empty(PKG_OPTIONS:Mlibmtp)
|
||||
PLIST.libmtp= yes
|
||||
. include "../../devel/libmtp/buildlink3.mk"
|
||||
.include "../../devel/libmtp/buildlink3.mk"
|
||||
.endif
|
||||
|
||||
.if !empty(PKG_OPTIONS:Mmysql)
|
||||
CONFIGURE_ARGS+= --enable-mysql
|
||||
. include "../../mk/mysql.buildlink3.mk"
|
||||
# libnjb is currently not supported
|
||||
#.if !empty(PKG_OPTIONS:Mlibnjb)
|
||||
#.include "../../devel/libnjb/buildlink3.mk"
|
||||
#.endif
|
||||
|
||||
.if !empty(PKG_OPTIONS:Mlibvisual)
|
||||
.include "../../audio/libvisual/buildlink3.mk"
|
||||
.endif
|
||||
|
||||
.if !empty(PKG_OPTIONS:Mpgsql)
|
||||
CONFIGURE_ARGS+= --enable-postgresql
|
||||
. include "../../mk/pgsql.buildlink3.mk"
|
||||
.if !empty(PKG_OPTIONS:Mmp3tunes)
|
||||
.include "../../chat/loudmouth/buildlink3.mk"
|
||||
.include "../../devel/glib2/buildlink3.mk"
|
||||
.include "../../security/openssl/buildlink3.mk"
|
||||
.include "../../textproc/libxml2/buildlink3.mk"
|
||||
.include "../../www/curl/buildlink3.mk"
|
||||
# XXX: make sure qt4-libs have glib enabled
|
||||
.endif
|
||||
|
|
|
@ -1,46 +1,369 @@
|
|||
$NetBSD: patch-aa,v 1.14 2008/09/22 05:35:20 wiz Exp $
|
||||
$NetBSD: patch-aa,v 1.15 2010/02/16 09:01:46 wiz Exp $
|
||||
|
||||
--- amarok/src/mediadevice/mtp/mtpmediadevice.cpp.orig 2008-08-13 23:21:51.000000000 +0200
|
||||
+++ amarok/src/mediadevice/mtp/mtpmediadevice.cpp
|
||||
@@ -293,12 +293,13 @@ MediaItem
|
||||
parent_id = getDefaultParentId();
|
||||
}
|
||||
debug() << "Parent id : " << parent_id << endl;
|
||||
+ trackmeta->parent_id = parent_id;
|
||||
|
||||
m_critical_mutex.lock();
|
||||
debug() << "Sending track... " << bundle.url().path().utf8() << endl;
|
||||
int ret = LIBMTP_Send_Track_From_File(
|
||||
m_device, bundle.url().path().utf8(), trackmeta,
|
||||
- progressCallback, this, parent_id
|
||||
+ progressCallback, this
|
||||
);
|
||||
m_critical_mutex.unlock();
|
||||
|
||||
@@ -529,7 +530,7 @@ LIBMTP_album_t
|
||||
for( MtpMediaItem *it = dynamic_cast<MtpMediaItem*>(items->first()); it; it = dynamic_cast<MtpMediaItem*>(items->next()) )
|
||||
album_object->tracks[i++] = it->track()->id();
|
||||
album_object->no_tracks = items->count();
|
||||
- ret = LIBMTP_Create_New_Album( m_device, album_object, 0 );
|
||||
+ ret = LIBMTP_Create_New_Album( m_device, album_object );
|
||||
if( ret != 0 )
|
||||
{
|
||||
debug() << "creating album failed : " << ret << endl;
|
||||
@@ -608,7 +609,7 @@ MtpMediaDevice::createFolder( const char
|
||||
post-2.2.2 patch from upstream
|
||||
|
||||
--- src/collection/sqlcollection/ScanResultProcessor.cpp.orig 2010-01-06 22:19:46.000000000 +0000
|
||||
+++ src/collection/sqlcollection/ScanResultProcessor.cpp
|
||||
@@ -42,19 +42,59 @@ ScanResultProcessor::ScanResultProcessor
|
||||
ScanResultProcessor::~ScanResultProcessor()
|
||||
{
|
||||
debug() << "Creating new folder '" << name << "' as a child of "<< parent_id << endl;
|
||||
char *name_copy = qstrdup( name );
|
||||
- uint32_t new_folder_id = LIBMTP_Create_Folder( m_device, name_copy, parent_id );
|
||||
+ uint32_t new_folder_id = LIBMTP_Create_Folder( m_device, name_copy, parent_id, 0 );
|
||||
delete(name_copy);
|
||||
debug() << "New folder ID: " << new_folder_id << endl;
|
||||
if( new_folder_id == 0 )
|
||||
@@ -913,7 +914,7 @@ MtpMediaDevice::playlistFromItem( MtpMed
|
||||
if( item->playlist()->id() == 0 )
|
||||
//everything has a URL, so enough to just delete from here
|
||||
+ QSet<QStringList*> currSet; //prevent double deletes
|
||||
foreach( QStringList *list, m_urlsHashByUid )
|
||||
- delete list;
|
||||
+ {
|
||||
+ if( list )
|
||||
+ {
|
||||
+ if( !currSet.contains( list ) )
|
||||
+ {
|
||||
+ delete list;
|
||||
+ currSet.insert( list );
|
||||
+ }
|
||||
+ }
|
||||
+ else
|
||||
+ debug() << "GAAH! Tried to double-delete a value in m_urlsHashByUid";
|
||||
+ }
|
||||
foreach( QLinkedList<QStringList*> *list, m_albumsHashByName )
|
||||
{
|
||||
debug() << "creating new playlist : " << metadata->name << endl;
|
||||
- int ret = LIBMTP_Create_New_Playlist( m_device, metadata, 0 );
|
||||
+ int ret = LIBMTP_Create_New_Playlist( m_device, metadata );
|
||||
if( ret == 0 )
|
||||
- foreach( QStringList *slist, *list )
|
||||
- delete slist;
|
||||
- delete list;
|
||||
+ if( list )
|
||||
+ {
|
||||
+ foreach( QStringList *slist, *list )
|
||||
+ {
|
||||
+ if( slist )
|
||||
+ {
|
||||
+ if( !currSet.contains( slist ) )
|
||||
+ {
|
||||
+ delete slist;
|
||||
+ currSet.insert( slist );
|
||||
+ }
|
||||
+ else
|
||||
+ debug() << "GAAH! Tried to double-delete a value in m_albumsHashByName";
|
||||
+ }
|
||||
+ }
|
||||
+ delete list;
|
||||
+ }
|
||||
}
|
||||
foreach( QLinkedList<QStringList*> *list, m_tracksHashByAlbum )
|
||||
{
|
||||
- foreach( QStringList *slist, *list )
|
||||
- delete slist;
|
||||
- delete list;
|
||||
+ if( list )
|
||||
+ {
|
||||
+ foreach( QStringList *slist, *list )
|
||||
+ {
|
||||
+ if( slist )
|
||||
+ {
|
||||
+ if( !currSet.contains( slist ) )
|
||||
+ {
|
||||
+ delete slist;
|
||||
+ currSet.insert( slist );
|
||||
+ }
|
||||
+ else
|
||||
+ debug() << "GAAH! Tried to double-delete a value in m_tracksHashByAlbum";
|
||||
+ }
|
||||
+ }
|
||||
+ delete list;
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -67,11 +107,11 @@ ScanResultProcessor::setScanType( ScanTy
|
||||
void
|
||||
ScanResultProcessor::addDirectory( const QString &dir, uint mtime )
|
||||
{
|
||||
- DEBUG_BLOCK
|
||||
- debug() << "SRP::addDirectory on " << dir << " with mtime " << mtime;
|
||||
+ //DEBUG_BLOCK
|
||||
+ //debug() << "SRP::addDirectory on " << dir << " with mtime " << mtime;
|
||||
if( dir.isEmpty() )
|
||||
{
|
||||
- debug() << "got directory with no path from the scanner, not adding";
|
||||
+ //debug() << "got directory with no path from the scanner, not adding";
|
||||
return;
|
||||
}
|
||||
setupDatabase();
|
||||
@@ -254,7 +294,7 @@ ScanResultProcessor::rollback()
|
||||
void
|
||||
ScanResultProcessor::processDirectory( const QList<QVariantMap > &data )
|
||||
{
|
||||
-// DEBUG_BLOCK
|
||||
+ //DEBUG_BLOCK
|
||||
setupDatabase();
|
||||
//using the following heuristics:
|
||||
//if more than one album is in the dir, use the artist of each track as albumartist
|
||||
@@ -274,24 +314,54 @@ ScanResultProcessor::processDirectory( c
|
||||
if( row.value( Field::ALBUM ).toString() != album )
|
||||
multipleAlbums = true;
|
||||
}
|
||||
+
|
||||
if( multipleAlbums || album.isEmpty() || artists.size() == 1 )
|
||||
{
|
||||
foreach( const QVariantMap &row, data )
|
||||
{
|
||||
item->playlist()->setId( metadata->playlist_id );
|
||||
- int artist = genericId( &m_artists, row.value( Field::ARTIST ).toString(), &m_nextArtistNum );
|
||||
- addTrack( row, artist );
|
||||
+ QString uid = row.value( Field::UNIQUEID ).toString();
|
||||
+ if( m_uidsSeenThisScan.contains( uid ) )
|
||||
+ {
|
||||
+ QString originalLocation = ( ( m_urlsHashByUid.contains( uid ) &&
|
||||
+ m_urlsHashByUid[uid] != 0 ) ?
|
||||
+ MountPointManager::instance()->getAbsolutePath( m_urlsHashByUid[uid]->at( 1 ).toInt(), m_urlsHashByUid[uid]->at( 2 ) ) : "(unknown)" );
|
||||
+ debug() << "Skipping file with uniqueid " << uid << " as it was already seen this scan," <<
|
||||
+ "file is at " << row.value( Field::URL ).toString() << ", original file is at " << originalLocation;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ int artist = genericId( &m_artists, row.value( Field::ARTIST ).toString(), &m_nextArtistNum );
|
||||
+ //debug() << "artist found = " << artist;
|
||||
+ addTrack( row, artist );
|
||||
+ m_uidsSeenThisScan.insert( uid );
|
||||
+ }
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
QString albumArtist = findAlbumArtist( artists, data.count() );
|
||||
+ //debug() << "albumArtist found = " << albumArtist;
|
||||
//an empty string means that no albumartist was found
|
||||
int artist = albumArtist.isEmpty() ? 0 : genericId( &m_artists, albumArtist, &m_nextArtistNum );
|
||||
+ //debug() << "artist found = " << artist;
|
||||
|
||||
//debug() << "albumartist " << albumArtist << "for artists" << artists;
|
||||
foreach( const QVariantMap &row, data )
|
||||
{
|
||||
- addTrack( row, artist );
|
||||
+ QString uid = row.value( Field::UNIQUEID ).toString();
|
||||
+ if( m_uidsSeenThisScan.contains( uid ) )
|
||||
+ {
|
||||
+ QString originalLocation = ( ( m_urlsHashByUid.contains( uid ) &&
|
||||
+ m_urlsHashByUid[uid] != 0 ) ?
|
||||
+ MountPointManager::instance()->getAbsolutePath( m_urlsHashByUid[uid]->at( 1 ).toInt(), m_urlsHashByUid[uid]->at( 2 ) ) : "(unknown)" );
|
||||
+ debug() << "Skipping file with uniqueid " << uid << " as it was already seen this scan," <<
|
||||
+ "file is at " << row.value( Field::URL ).toString() << ", original file is at " << originalLocation;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ addTrack( row, artist );
|
||||
+ m_uidsSeenThisScan.insert( uid );
|
||||
+ }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -299,6 +369,7 @@ ScanResultProcessor::processDirectory( c
|
||||
QString
|
||||
ScanResultProcessor::findAlbumArtist( const QSet<QString> &artists, int trackCount ) const
|
||||
{
|
||||
+ //DEBUG_BLOCK
|
||||
QMap<QString, int> artistCount;
|
||||
bool featuring;
|
||||
QStringList trackArtists;
|
||||
@@ -371,6 +442,7 @@ void
|
||||
ScanResultProcessor::addTrack( const QVariantMap &trackData, int albumArtistId )
|
||||
{
|
||||
//DEBUG_BLOCK
|
||||
+ //debug() << "albumArtistId = " << albumArtistId;
|
||||
//amarok 1 stored all tracks of a compilation in different directories.
|
||||
//when using its "Organize Collection" feature
|
||||
//try to detect these cases
|
||||
@@ -419,7 +491,15 @@ ScanResultProcessor::addTrack( const QVa
|
||||
|
||||
//urlId will take care of the urls table part of AFT
|
||||
int url = urlId( path, uid );
|
||||
-
|
||||
+/*
|
||||
+ foreach( QString key, m_urlsHashByUid.keys() )
|
||||
+ debug() << "Key: " << key << ", list: " << *m_urlsHashByUid[key];
|
||||
+ foreach( int key, m_urlsHashById.keys() )
|
||||
+ debug() << "Key: " << key << ", list: " << *m_urlsHashById[key];
|
||||
+ typedef QPair<int, QString> blahType; //QFOREACH is stupid when it comes to QPairs
|
||||
+ foreach( blahType key, m_urlsHashByLocation.keys() )
|
||||
+ debug() << "Key: " << key << ", list: " << *m_urlsHashByLocation[key];
|
||||
+*/
|
||||
QStringList *trackList = new QStringList();
|
||||
int id = m_nextTrackNum;
|
||||
//debug() << "Appending new track number with tracknum: " << id;
|
||||
@@ -470,7 +550,7 @@ ScanResultProcessor::addTrack( const QVa
|
||||
//insert into hashes
|
||||
if( m_tracksHashByUrl.contains( url ) && m_tracksHashByUrl[url] != 0 )
|
||||
{
|
||||
- //debug() << "m_tracksHashByUrl contains the url!";
|
||||
+ //debug() << "m_tracksHashByUrl already contains url " << url;
|
||||
//need to replace, not overwrite/add a new one
|
||||
QStringList *oldValues = m_tracksHashByUrl[url];
|
||||
QString oldId = oldValues->at( 0 );
|
||||
@@ -490,8 +570,24 @@ ScanResultProcessor::addTrack( const QVa
|
||||
m_tracksHashById.insert( id, trackList );
|
||||
}
|
||||
|
||||
+ //debug() << "album = " << album;
|
||||
+
|
||||
if( m_tracksHashByAlbum.contains( album ) && m_tracksHashByAlbum[album] != 0 )
|
||||
- m_tracksHashByAlbum[album]->append( trackList );
|
||||
+ {
|
||||
+ //contains isn't the fastest on linked lists, but in reality this is on the order of maybe
|
||||
+ //ten quick pointer comparisons per track on average...probably lower
|
||||
+ //debug() << "trackList is " << trackList;
|
||||
+ if( !m_tracksHashByAlbum[album]->contains( trackList ) )
|
||||
+ {
|
||||
+ //debug() << "appending trackList to m_tracksHashByAlbum";
|
||||
+ m_tracksHashByAlbum[album]->append( trackList );
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ //debug() << "not appending trackList to m_tracksHashByAlbum";
|
||||
+ }
|
||||
+
|
||||
+ }
|
||||
else
|
||||
{
|
||||
QLinkedList<QStringList*> *list = new QLinkedList<QStringList*>();
|
||||
@@ -595,6 +691,8 @@ ScanResultProcessor::albumId( const QStr
|
||||
QLinkedList<QStringList*> *list = m_albumsHashByName[album];
|
||||
foreach( QStringList *slist, *list )
|
||||
{
|
||||
+ //debug() << "albumArtistId = " << albumArtistId;
|
||||
+ //debug() << "Checking list: " << *slist;
|
||||
if( slist->at( 2 ).isEmpty() && albumArtistId == 0 )
|
||||
{
|
||||
//debug() << "artist is empty and albumArtistId = 0, returning " << slist->at( 0 );
|
||||
@@ -631,7 +729,10 @@ ScanResultProcessor::albumInsert( const
|
||||
albumList->append( QString() );
|
||||
m_albumsHashById[returnedNum] = albumList;
|
||||
if( m_albumsHashByName.contains( album ) && m_albumsHashByName[album] != 0 )
|
||||
- m_albumsHashByName[album]->append( albumList );
|
||||
+ {
|
||||
+ if( !m_albumsHashByName[album]->contains( albumList ) )
|
||||
+ m_albumsHashByName[album]->append( albumList );
|
||||
+ }
|
||||
else
|
||||
{
|
||||
QLinkedList<QStringList*> *list = new QLinkedList<QStringList*>();
|
||||
@@ -645,7 +746,7 @@ ScanResultProcessor::albumInsert( const
|
||||
int
|
||||
ScanResultProcessor::urlId( const QString &url, const QString &uid )
|
||||
{
|
||||
- /*
|
||||
+/*
|
||||
DEBUG_BLOCK
|
||||
foreach( QString key, m_urlsHashByUid.keys() )
|
||||
debug() << "Key: " << key << ", list: " << *m_urlsHashByUid[key];
|
||||
@@ -654,8 +755,7 @@ ScanResultProcessor::urlId( const QStrin
|
||||
typedef QPair<int, QString> blahType; //QFOREACH is stupid when it comes to QPairs
|
||||
foreach( blahType key, m_urlsHashByLocation.keys() )
|
||||
debug() << "Key: " << key << ", list: " << *m_urlsHashByLocation[key];
|
||||
- */
|
||||
-
|
||||
+*/
|
||||
QFileInfo fileInfo( url );
|
||||
const QString dir = fileInfo.absoluteDir().absolutePath();
|
||||
int dirId = directoryId( dir );
|
||||
@@ -665,6 +765,7 @@ ScanResultProcessor::urlId( const QStrin
|
||||
QPair<int, QString> locationPair( deviceId, rpath );
|
||||
//debug() << "in urlId with url = " << url << " and uid = " << uid;
|
||||
//debug() << "checking locationPair " << locationPair;
|
||||
+/*
|
||||
if( m_urlsHashByLocation.contains( locationPair ) )
|
||||
{
|
||||
QStringList values;
|
||||
@@ -674,6 +775,7 @@ ScanResultProcessor::urlId( const QStrin
|
||||
values << "zero";
|
||||
//debug() << "m_urlsHashByLocation contains it! It is " << values;
|
||||
}
|
||||
+*/
|
||||
QStringList currUrlIdValues;
|
||||
if( m_urlsHashByUid.contains( uid ) && m_urlsHashByUid[uid] != 0 )
|
||||
currUrlIdValues = *m_urlsHashByUid[uid];
|
||||
@@ -717,6 +819,7 @@ ScanResultProcessor::urlId( const QStrin
|
||||
//debug() << "m_urlsHashByUid contains this UID, updating deviceId and path";
|
||||
QStringList *list = m_urlsHashByUid[uid];
|
||||
//debug() << "list from UID hash is " << list << " with values " << *list;
|
||||
+ QPair<int, QString> oldLocationPair( list->at( 1 ).toInt(), list->at( 2 ) );
|
||||
list->replace( 1, QString::number( deviceId ) );
|
||||
list->replace( 2, rpath );
|
||||
list->replace( 3, QString::number( dirId ) );
|
||||
@@ -737,6 +840,7 @@ ScanResultProcessor::urlId( const QStrin
|
||||
delete oldList;
|
||||
}
|
||||
m_urlsHashByLocation[locationPair] = list;
|
||||
+ m_urlsHashByLocation.remove( oldLocationPair );
|
||||
}
|
||||
m_permanentTablesUrlUpdates.insert( uid, url );
|
||||
m_changedUrls.insert( uid, QPair<QString, QString>( MountPointManager::instance()->getAbsolutePath( currUrlIdValues[1].toInt(), currUrlIdValues[2] ), url ) );
|
||||
@@ -751,6 +855,7 @@ ScanResultProcessor::urlId( const QStrin
|
||||
{
|
||||
QStringList *list = m_urlsHashByLocation[locationPair];
|
||||
//debug() << "Replacing hash " << list->at( 4 ) << " with " << uid;
|
||||
+ QString oldId = list->at( 4 );
|
||||
list->replace( 4, uid );
|
||||
if( m_urlsHashByUid.contains( uid )
|
||||
&& m_urlsHashByUid[uid] != 0
|
||||
@@ -762,6 +867,7 @@ ScanResultProcessor::urlId( const QStrin
|
||||
delete oldList;
|
||||
}
|
||||
m_urlsHashByUid[uid] = list;
|
||||
+ m_urlsHashByUid.remove( oldId );
|
||||
}
|
||||
m_permanentTablesUidUpdates.insert( url, uid );
|
||||
m_changedUids.insert( currUrlIdValues[4], uid );
|
||||
@@ -855,7 +961,8 @@ ScanResultProcessor::directoryId( const
|
||||
int
|
||||
ScanResultProcessor::checkExistingAlbums( const QString &album )
|
||||
{
|
||||
-// DEBUG_BLOCK
|
||||
+ //DEBUG_BLOCK
|
||||
+ //debug() << "looking for album " << album;
|
||||
// "Unknown" albums shouldn't be handled as compilations
|
||||
if( album.isEmpty() )
|
||||
return 0;
|
||||
@@ -865,7 +972,10 @@ ScanResultProcessor::checkExistingAlbums
|
||||
//it's probably a compilation.
|
||||
//this handles A1 compilations that were automatically organized by Amarok
|
||||
if( !m_albumsHashByName.contains( album ) || m_albumsHashByName[album] == 0 )
|
||||
+ {
|
||||
+ //debug() << "hashByName doesn't contain album, or it's zero";
|
||||
return 0;
|
||||
+ }
|
||||
|
||||
QStringList trackIds;
|
||||
QLinkedList<QStringList*> *llist = m_albumsHashByName[album];
|
||||
@@ -915,8 +1025,10 @@ ScanResultProcessor::checkExistingAlbums
|
||||
}
|
||||
}
|
||||
|
||||
+ //debug() << "trackIds = " << trackIds;
|
||||
if( trackIds.isEmpty() )
|
||||
{
|
||||
+ //debug() << "trackIds empty, returning zero";
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
@@ -933,6 +1045,7 @@ ScanResultProcessor::checkExistingAlbums
|
||||
list->replace( 3, compilationString );
|
||||
}
|
||||
}
|
||||
+ //debug() << "returning " << compilationId;
|
||||
return compilationId;
|
||||
}
|
||||
}
|
||||
@@ -1167,6 +1280,17 @@ ScanResultProcessor::copyHashesToTempTab
|
||||
foreach( blahType key, m_urlsHashByLocation.keys() )
|
||||
debug() << "Key: " << key << ", list: " << *m_urlsHashByLocation[key];
|
||||
debug() << "Next album num: " << m_nextAlbumNum;
|
||||
+
|
||||
+ foreach( int key, m_tracksHashById.keys() )
|
||||
+ debug() << "Key: " << key << ", list: " << *m_tracksHashById[key];
|
||||
+ foreach( int key, m_tracksHashByUrl.keys() )
|
||||
+ debug() << "Key: " << key << ", list: " << *m_tracksHashByUrl[key];
|
||||
+ foreach( int key, m_tracksHashByAlbum.keys() )
|
||||
+ {
|
||||
+ debug() << "Key: " << key;
|
||||
+ foreach( QStringList* item, *m_tracksHashByAlbum[key] )
|
||||
+ debug() << "list: " << item << " is " << *item;
|
||||
+ }
|
||||
*/
|
||||
|
||||
DEBUG_BLOCK
|
||||
|
|
|
@ -1,22 +1,12 @@
|
|||
$NetBSD: patch-ab,v 1.3 2007/07/01 00:33:53 wiz Exp $
|
||||
$NetBSD: patch-ab,v 1.4 2010/02/16 09:01:46 wiz Exp $
|
||||
|
||||
--- configure.orig 2007-06-17 19:52:02.000000000 +0000
|
||||
+++ configure
|
||||
@@ -37060,7 +37060,7 @@ if test "${ac_cv_lib_tunepimp_tr_GetPUID
|
||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
else
|
||||
ac_check_lib_save_LIBS=$LIBS
|
||||
-LIBS="-ltunepimp $LIBS"
|
||||
+LIBS="-ltunepimp $PTHREAD_LDFLAGS $PTHREAD_LIBS $LIBS"
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
/* confdefs.h. */
|
||||
_ACEOF
|
||||
@@ -37579,7 +37579,7 @@ if test "${ac_cv_lib_konqsidebarplugin__
|
||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
else
|
||||
ac_check_lib_save_LIBS=$LIBS
|
||||
-LIBS="-lkonqsidebarplugin $LIBS"
|
||||
+LIBS="-lkonqsidebarplugin ${PTHREAD_LIBS} ${PTHREAD_LDFLAGS} $LIBS"
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
/* confdefs.h. */
|
||||
_ACEOF
|
||||
--- src/collection/mysqlecollection/CMakeLists.txt.orig 2009-09-28 17:34:03.000000000 +0000
|
||||
+++ src/collection/mysqlecollection/CMakeLists.txt
|
||||
@@ -82,6 +82,7 @@ if(APPLE)
|
||||
SET_TARGET_PROPERTIES(amarok_collection-mysqlecollection PROPERTIES LINK_FLAGS "-undefined dynamic_lookup")
|
||||
endif(APPLE)
|
||||
|
||||
+SET_TARGET_PROPERTIES(amarok_collection-mysqlecollection PROPERTIES LINK_FLAGS "@@WLR@@")
|
||||
install(TARGETS amarok_collection-mysqlecollection DESTINATION ${PLUGIN_INSTALL_DIR} )
|
||||
|
||||
install(FILES ../sqlcollection/org.kde.amarok.SqlCollection.xml DESTINATION ${DBUS_INTERFACES_INSTALL_DIR})
|
||||
|
|
|
@ -1,19 +1,14 @@
|
|||
$NetBSD: patch-ac,v 1.3 2009/02/15 11:22:48 wiz Exp $
|
||||
$NetBSD: patch-ac,v 1.4 2010/02/16 09:01:46 wiz Exp $
|
||||
|
||||
SVN commit 917750 by nhnielsen:
|
||||
Fix for wikipedia tab not showing any info. Thanks to Helge Stenström
|
||||
and WarwickH at
|
||||
https://bugs.edge.launchpad.net/ubuntu/+source/amarok/+bug/316140 for
|
||||
the fix.
|
||||
post-2.2.2 patch from upstream
|
||||
|
||||
--- amarok/src/contextbrowser.cpp.orig 2008-08-13 21:21:51.000000000 +0000
|
||||
+++ amarok/src/contextbrowser.cpp
|
||||
@@ -4189,7 +4189,7 @@ ContextBrowser::wikiResult( KIO::Job* jo
|
||||
}
|
||||
--- src/collection/sqlcollection/ScanResultProcessor.h.orig 2010-01-06 22:19:46.000000000 +0000
|
||||
+++ src/collection/sqlcollection/ScanResultProcessor.h
|
||||
@@ -94,6 +94,7 @@ class ScanResultProcessor : public QObje
|
||||
QMap<QString, int> m_directories;
|
||||
QMap<QString, QList< QPair< QString, QString > > > m_imageMap;
|
||||
|
||||
// Ok lets remove the top and bottom parts of the page
|
||||
- m_wiki = m_wiki.mid( m_wiki.find( "<h1 class=\"firstHeading\">" ) );
|
||||
+ m_wiki = m_wiki.mid( m_wiki.find( "<h1 id=\"firstHeading\"" ) );
|
||||
m_wiki = m_wiki.mid( 0, m_wiki.find( "<div class=\"printfooter\">" ) );
|
||||
// Adding back license information
|
||||
m_wiki += copyright;
|
||||
+ QSet<QString> m_uidsSeenThisScan;
|
||||
QHash<QString, uint> m_filesInDirs;
|
||||
|
||||
TrackUrls m_changedUids; //not really track urls
|
||||
|
|
|
@ -1,89 +0,0 @@
|
|||
$NetBSD: patch-ad,v 1.1 2009/01/12 12:33:40 wiz Exp $
|
||||
|
||||
Security fix, SVN r908415 from upstream 1.4.x branch.
|
||||
|
||||
--- amarok/src/metadata/audible/audibletag.cpp.orig 2008-08-13 23:21:51.000000000 +0200
|
||||
+++ amarok/src/metadata/audible/audibletag.cpp
|
||||
@@ -71,7 +71,8 @@ void Audible::Tag::readTags( FILE *fp )
|
||||
{
|
||||
char buf[1023];
|
||||
fseek(fp, OFF_PRODUCT_ID, SEEK_SET);
|
||||
- fread(buf, strlen("product_id"), 1, fp);
|
||||
+ if (fread(buf, strlen("product_id"), 1, fp) != 1)
|
||||
+ return;
|
||||
if(memcmp(buf, "product_id", strlen("product_id")))
|
||||
{
|
||||
buf[20]='\0';
|
||||
@@ -130,24 +131,65 @@ void Audible::Tag::readTags( FILE *fp )
|
||||
|
||||
bool Audible::Tag::readTag( FILE *fp, char **name, char **value)
|
||||
{
|
||||
+ // arbitrary value that has to be smaller than 2^32-1 and that should be large enough for all tags
|
||||
+ const uint32_t maxtaglen = 100000;
|
||||
+
|
||||
uint32_t nlen;
|
||||
- fread(&nlen, sizeof(nlen), 1, fp);
|
||||
+ if (fread(&nlen, sizeof(nlen), 1, fp) != 1)
|
||||
+ return false;
|
||||
nlen = ntohl(nlen);
|
||||
//fprintf(stderr, "tagname len=%x\n", (unsigned)nlen);
|
||||
- *name = new char[nlen+1];
|
||||
- (*name)[nlen] = '\0';
|
||||
+ if (nlen > maxtaglen)
|
||||
+ return false;
|
||||
|
||||
uint32_t vlen;
|
||||
- fread(&vlen, sizeof(vlen), 1, fp);
|
||||
+ if (fread(&vlen, sizeof(vlen), 1, fp) != 1)
|
||||
+ return false;
|
||||
vlen = ntohl(vlen);
|
||||
//fprintf(stderr, "tag len=%x\n", (unsigned)vlen);
|
||||
+ if (vlen > maxtaglen)
|
||||
+ return false;
|
||||
+
|
||||
+ *name = new char[nlen+1];
|
||||
+ if (!*name)
|
||||
+ return false;
|
||||
+
|
||||
*value = new char[vlen+1];
|
||||
+ if (!*value)
|
||||
+ {
|
||||
+ delete[] *name;
|
||||
+ *name = 0;
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
+ (*name)[nlen] = '\0';
|
||||
(*value)[vlen] = '\0';
|
||||
|
||||
- fread(*name, nlen, 1, fp);
|
||||
- fread(*value, vlen, 1, fp);
|
||||
+ if (fread(*name, nlen, 1, fp) != 1)
|
||||
+ {
|
||||
+ delete[] *name;
|
||||
+ *name = 0;
|
||||
+ delete[] *value;
|
||||
+ *value = 0;
|
||||
+ return false;
|
||||
+ }
|
||||
+ if (fread(*value, vlen, 1, fp) != 1)
|
||||
+ {
|
||||
+ delete[] *name;
|
||||
+ *name = 0;
|
||||
+ delete[] *value;
|
||||
+ *value = 0;
|
||||
+ return false;
|
||||
+ }
|
||||
char lasttag;
|
||||
- fread(&lasttag, 1, 1, fp);
|
||||
+ if (fread(&lasttag, 1, 1, fp) != 1)
|
||||
+ {
|
||||
+ delete[] *name;
|
||||
+ *name = 0;
|
||||
+ delete[] *value;
|
||||
+ *value = 0;
|
||||
+ return false;
|
||||
+ }
|
||||
//fprintf(stderr, "%s: \"%s\"\n", *name, *value);
|
||||
|
||||
m_tagsEndOffset += 2 * 4 + nlen + vlen + 1;
|
Loading…
Reference in a new issue