Hello community,

here is the log from the commit of package libechonest for openSUSE:Factory 
checked in at 2013-05-16 18:17:20
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libechonest (Old)
 and      /work/SRC/openSUSE:Factory/.libechonest.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libechonest"

Changes:
--------
--- /work/SRC/openSUSE:Factory/libechonest/libechonest.changes  2013-03-24 
21:59:01.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.libechonest.new/libechonest.changes     
2013-05-16 18:17:21.000000000 +0200
@@ -1,0 +2,12 @@
+Thu May 16 13:24:48 UTC 2013 - d...@dominik-schmidt.de
+
+- Version 2.1.0:
+  * soversion correctly bumped 
+
+-------------------------------------------------------------------
+Sun May  5 19:41:45 UTC 2013 - d...@dominik-schmidt.de
+
+- Version 2.0.3
+  * Genre Support 
+
+-------------------------------------------------------------------

Old:
----
  libechonest-2.0.1.tar.bz2

New:
----
  libechonest-2.1.0.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ libechonest.spec ++++++
--- /var/tmp/diff_new_pack.4Zn2h5/_old  2013-05-16 18:17:22.000000000 +0200
+++ /var/tmp/diff_new_pack.4Zn2h5/_new  2013-05-16 18:17:22.000000000 +0200
@@ -16,14 +16,18 @@
 #
 
 
-%define soname 2_0
+%define _major_version 2
+%define _minor_version 1
+%define _patch_version 0
+
+%define soname %{_major_version}_%{_minor_version}
 
 Name:           libechonest
 BuildRequires:  cmake
 BuildRequires:  gcc-c++
 BuildRequires:  libqjson-devel
 BuildRequires:  libqt4-devel
-Version:        2.0.1
+Version:        %{_major_version}.%{_minor_version}.%{_patch_version}
 Release:        0
 Source0:        libechonest-%{version}.tar.bz2
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build

++++++ libechonest-2.0.1.tar.bz2 -> libechonest-2.1.0.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libechonest-2.0.1/CMakeLists.txt 
new/libechonest-2.1.0/CMakeLists.txt
--- old/libechonest-2.0.1/CMakeLists.txt        2012-07-21 19:25:10.000000000 
+0200
+++ new/libechonest-2.1.0/CMakeLists.txt        2013-05-16 15:07:07.000000000 
+0200
@@ -17,8 +17,8 @@
 include( ${QT_USE_FILE} )
 
 set( ECHONEST_LIB_MAJOR_VERSION "2" )
-set( ECHONEST_LIB_MINOR_VERSION "0" )
-set( ECHONEST_LIB_PATCH_VERSION "1" )
+set( ECHONEST_LIB_MINOR_VERSION "1" )
+set( ECHONEST_LIB_PATCH_VERSION "0" )
 set( ECHONEST_LIB_VERSION 
"${ECHONEST_LIB_MAJOR_VERSION}.${ECHONEST_LIB_MINOR_VERSION}.${ECHONEST_LIB_PATCH_VERSION}"
 )
 
 set( ECHONEST_LIB_VERSION_SONAME 
"${ECHONEST_LIB_MAJOR_VERSION}.${ECHONEST_LIB_MINOR_VERSION}")
@@ -31,11 +31,6 @@
         add_definitions( -fvisibility=hidden )
     endif()
 
-    # disable -Werror on ARM since Qt containers cause a lot of alignment 
warnings
-    if ( NOT CMAKE_SYSTEM_PROCESSOR MATCHES "arm" )
-        add_definitions( -Werror )
-    endif()
-
 # to be added:
 #       -Wshadow
 # FIXME we might want this one back in, but Qt 4.4.3 spits gazillions of 
warnings with it on Linux-64:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libechonest-2.0.1/src/Artist.cpp 
new/libechonest-2.1.0/src/Artist.cpp
--- old/libechonest-2.0.1/src/Artist.cpp        2012-07-21 19:25:10.000000000 
+0200
+++ new/libechonest-2.1.0/src/Artist.cpp        2013-05-16 15:07:07.000000000 
+0200
@@ -397,6 +397,14 @@
     return Echonest::Config::instance()->nam()->get( QNetworkRequest( url ) );
 }
 
+QNetworkReply *Echonest::Artist::fetchGenres()
+{
+    QUrl url = baseGetQuery( "artist", "list_genres" );
+
+    return Echonest::Config::instance()->nam()->get( QNetworkRequest( url ) );
+}
+
+
 QNetworkReply* Echonest::Artist::search(const Echonest::Artist::SearchParams& 
params, Echonest::ArtistInformation information, bool limit)
 {
     QUrl url = Echonest::baseGetQuery( "artist", "search" );
@@ -534,6 +542,20 @@
     return terms;
 }
 
+QVector< QString > Echonest::Artist::parseGenreList( QNetworkReply* reply ) 
throw( Echonest::ParseError )
+{
+    Echonest::Parser::checkForErrors( reply );
+
+    QXmlStreamReader xml( reply->readAll() );
+
+    Echonest::Parser::readStatus( xml );
+
+    QVector< QString > genres = Echonest::Parser::parseGenreList( xml );
+
+    reply->deleteLater();
+    return genres;
+}
+
 QUrl Echonest::Artist::setupQuery( const QByteArray& methodName, int 
numResults, int start ) const
 {
     QUrl url = Echonest::baseGetQuery( "artist", methodName );
@@ -541,7 +563,7 @@
         url.addEncodedQueryItem( "id", d->id );
     else if( !d->name.isEmpty() ) {
         url.addEncodedQueryItem( "name", Echonest::escapeSpacesAndPluses( 
d->name ) );
-    } else {
+    } else if ( methodName != "terms" ) {
         qWarning() << "Artist method" << methodName << "called on an artist 
object without name or id!";
         return QUrl();
     }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libechonest-2.0.1/src/Artist.h 
new/libechonest-2.1.0/src/Artist.h
--- old/libechonest-2.0.1/src/Artist.h  2012-07-21 19:25:10.000000000 +0200
+++ new/libechonest-2.1.0/src/Artist.h  2013-05-16 15:07:07.000000000 +0200
@@ -277,7 +277,6 @@
          */
         QNetworkReply* fetchVideo( int numResults = 0, int offset = -1 ) const;
 
-
         /**
          * Parse a completed QNetworkReply* that has fetched more information 
about this artist.
          *  This will update the artist object with the new values that have 
been fetched.
@@ -343,6 +342,11 @@
         static QNetworkReply* listTerms( const QString& type = 
QLatin1String("style") );
 
         /**
+         * Fetch a list of genres supported by echonest
+         */
+        static QNetworkReply* fetchGenres();
+
+        /**
          * Parse the result of a fetchSimilar() call, which returns a list of 
artists similar to the
          *  original pair.
          */
@@ -371,10 +375,15 @@
         static Artists parseSuggest( QNetworkReply* ) throw( ParseError );
 
         /**
-         * Parse the result of a termList query. Returns the list of values 
returned.
+         * Parse the result of a termList query. Returns the list of terms 
delivered.
          */
         static QVector< QString > parseTermList( QNetworkReply* ) throw( 
ParseError );
 
+        /**
+         * Parse the result of a genres query. Returns the list of genres 
delivered.
+         */
+        static QVector< QString > parseGenreList( QNetworkReply* ) throw ( 
ParseError );
+
     private:
         QUrl setupQuery( const QByteArray& methodName, int numResults = 0, int 
start = -1 ) const;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libechonest-2.0.1/src/Parsing.cpp 
new/libechonest-2.1.0/src/Parsing.cpp
--- old/libechonest-2.0.1/src/Parsing.cpp       2012-07-21 19:25:10.000000000 
+0200
+++ new/libechonest-2.1.0/src/Parsing.cpp       2013-05-16 15:07:07.000000000 
+0200
@@ -119,6 +119,8 @@
             song.setArtistLocation( parseSongArtistLocation( xml ) );
         } else if( xml.name() == "audio_summary" && xml.isStartElement() ) {
             song.setAudioSummary( parseAudioSummary( xml ) );
+        } else if( xml.name() == "song_type" && xml.isStartElement() ) {
+            song.addSongType( xml.readElementText() );
         }
         xml.readNext();
     }
@@ -782,6 +784,21 @@
     return terms;
 }
 
+QVector< QString > Echonest::Parser::parseGenreList( QXmlStreamReader& xml ) 
throw( Echonest::ParseError )
+{
+    if( xml.atEnd() || xml.name() != "genres" || xml.tokenType() != 
QXmlStreamReader::StartElement )
+        throw Echonest::ParseError( Echonest::UnknownParseError );
+
+    QVector< QString > genres;
+    while( xml.name() != "response" || !xml.isEndElement() ) {
+        if( xml.name() == "name" && xml.isStartElement() )
+            genres.append( xml.readElementText() );
+        xml.readNextStartElement();
+    }
+
+    return genres;
+}
+
 void Echonest::Parser::parseForeignArtistIds( QXmlStreamReader& xml, 
Echonest::Artist& artist ) throw( Echonest::ParseError )
 {
     if( xml.atEnd() || xml.name() != "foreign_ids" || xml.tokenType() != 
QXmlStreamReader::StartElement )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libechonest-2.0.1/src/Parsing_p.h 
new/libechonest-2.1.0/src/Parsing_p.h
--- old/libechonest-2.0.1/src/Parsing_p.h       2012-07-21 19:25:10.000000000 
+0200
+++ new/libechonest-2.1.0/src/Parsing_p.h       2013-05-16 15:07:07.000000000 
+0200
@@ -89,6 +89,9 @@
     TermList parseTopTermList( QXmlStreamReader& xml ) throw( ParseError );
     QVector< QString > parseTermList( QXmlStreamReader& xml ) throw( 
ParseError );
 
+    //parse a list of genres
+    QVector< QString > parseGenreList( QXmlStreamReader& xml ) throw( 
ParseError );
+
     Artists parseArtistSuggestList( QXmlStreamReader& xml ) throw( ParseError 
);
 
     License parseLicense( QXmlStreamReader& xml ) throw( ParseError );
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libechonest-2.0.1/src/Playlist.cpp 
new/libechonest-2.1.0/src/Playlist.cpp
--- old/libechonest-2.0.1/src/Playlist.cpp      2012-07-21 19:25:10.000000000 
+0200
+++ new/libechonest-2.1.0/src/Playlist.cpp      2013-05-16 15:07:07.000000000 
+0200
@@ -311,6 +311,9 @@
             case SongRadioType:
                 url.addEncodedQueryItem(  playlistParamToString( iter->first 
), "song-radio" );
                 break;
+            case GenreRadioType:
+                url.addEncodedQueryItem( playlistParamToString( iter->first ), 
"genre-radio" );
+                break;
             }
 
         } else if( iter->first == Sort ) {
@@ -435,6 +438,10 @@
             return "target_artist_hotttnesss";
         case Echonest::DynamicPlaylist::TargetSongHotttnesss :
             return "target_song_hotttnesss";
+        case Echonest::DynamicPlaylist::SongType :
+            return "song_type";
+        case Echonest::DynamicPlaylist::Genre :
+            return "genre";
     }
     return QByteArray();
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libechonest-2.0.1/src/Playlist.h 
new/libechonest-2.1.0/src/Playlist.h
--- old/libechonest-2.0.1/src/Playlist.h        2012-07-21 19:25:10.000000000 
+0200
+++ new/libechonest-2.1.0/src/Playlist.h        2013-05-16 15:07:07.000000000 
+0200
@@ -66,7 +66,8 @@
             ArtistDescriptionType,
             CatalogType,
             CatalogRadioType,
-            SongRadioType
+            SongRadioType,
+            GenreRadioType
         };
 
         /**
@@ -173,6 +174,8 @@
             TargetSongHotttnesss, /// When steering: 0.0 < song_hotttnesss < 
1.Target a desired song_hotttnesss for the songs in this dynamic playlist 
session
             TargetArtistHotttnesss, /// When steering: 0.0 < 
artist_hottttnesss < 1.Target a desired artist_hottttnesss for the songs in 
this dynamic playlist session
             TargetArtistFamiliarity, /// When steering: 0.0 < 
artist_familiarity < 1.Target a desired energy for the artist_familiarity in 
this dynamic playlist session
+            SongType, /// Type of Song (atm: Live, Studio, Christmas)
+            Genre, /// Genre Parameter needed for GenreRadio Playlist
         };
 
         /**
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libechonest-2.0.1/src/Song.cpp 
new/libechonest-2.1.0/src/Song.cpp
--- old/libechonest-2.0.1/src/Song.cpp  2012-07-21 19:25:10.000000000 +0200
+++ new/libechonest-2.1.0/src/Song.cpp  2013-05-16 15:07:07.000000000 +0200
@@ -180,6 +180,21 @@
     d->artistLocation = artistLocation;
 }
 
+QList< QString > Echonest::Song::songTypes() const
+{
+    return d->songTypes;
+}
+
+void Echonest::Song::setSongTypes(const QList< QString >& songTypes)
+{
+    d->songTypes = songTypes;
+}
+
+void Echonest::Song::addSongType(const QString& songType)
+{
+    d->songTypes.append( songType );
+}
+
 QNetworkReply* Echonest::Song::fetchInformation( Echonest::SongInformation 
information ) const
 {
     QUrl url = Echonest::baseGetQuery( "song", "profile" );
@@ -371,6 +386,8 @@
             return "key";
         case Echonest::Song::Sort:
             return "sort";
+        case Echonest::Song::SongType:
+            return "song_type";
     }
     return QByteArray();
 }
@@ -410,6 +427,8 @@
         url.addEncodedQueryItem( "bucket", "artist_familiarity" );
     if( information.flags().testFlag( 
Echonest::SongInformation::ArtistLocation ) )
         url.addEncodedQueryItem( "bucket", "artist_location" );
+    if( information.flags().testFlag( Echonest::SongInformation::SongType ) )
+        url.addEncodedQueryItem( "bucket", "song_type" );
 
     if( !information.idSpaces().isEmpty() ) {
         foreach( const QString& idSpace, information.idSpaces() )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libechonest-2.0.1/src/Song.h 
new/libechonest-2.1.0/src/Song.h
--- old/libechonest-2.0.1/src/Song.h    2012-07-21 19:25:10.000000000 +0200
+++ new/libechonest-2.1.0/src/Song.h    2013-05-16 15:07:07.000000000 +0200
@@ -77,7 +77,8 @@
       MinEnergy,
       Mode,
       Key,
-      Sort
+      Sort,
+      SongType
   };
   typedef QPair< Echonest::Song::SearchParam, QVariant > SearchParamData;
   typedef QVector< SearchParamData > SearchParams;
@@ -168,6 +169,13 @@
    */
   ArtistLocation artistLocation() const;
   void setArtistLocation( const ArtistLocation& artistLocation );
+  
+  /**
+   * The type of the song (atm: christmas, studio, live)
+   */
+  QList< QString > songTypes() const;
+  void setSongTypes( const QList< QString >& songTypes );
+  void addSongType( const QString& songType );
 
   /**
    *  This fetches the data from The Echo Nest for the requested data, so it
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libechonest-2.0.1/src/Song_p.h 
new/libechonest-2.1.0/src/Song_p.h
--- old/libechonest-2.0.1/src/Song_p.h  2012-07-21 19:25:10.000000000 +0200
+++ new/libechonest-2.1.0/src/Song_p.h  2013-05-16 15:07:07.000000000 +0200
@@ -43,6 +43,7 @@
         artistHotttnesss = other.artistHotttnesss;
         artistFamiliarity = other.artistFamiliarity;
         artistLocation = other.artistLocation;
+        songTypes = other.songTypes;
     }
     
     ~SongData() {}
@@ -60,7 +61,7 @@
     qreal artistHotttnesss;
     qreal artistFamiliarity;
     Echonest::ArtistLocation artistLocation;
-    
+    QList<QString> songTypes;
     
 };
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libechonest-2.0.1/src/TypeInformation.h 
new/libechonest-2.1.0/src/TypeInformation.h
--- old/libechonest-2.0.1/src/TypeInformation.h 2012-07-21 19:25:10.000000000 
+0200
+++ new/libechonest-2.1.0/src/TypeInformation.h 2013-05-16 15:07:07.000000000 
+0200
@@ -95,6 +95,7 @@
             ArtistHotttnesss = 0x008,
             ArtistFamiliarity = 0x010,
             ArtistLocation = 0x020,
+            SongType = 0x40,
             
             NoInformation = 0x800
         };
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libechonest-2.0.1/src/echonest_export.h 
new/libechonest-2.1.0/src/echonest_export.h
--- old/libechonest-2.0.1/src/echonest_export.h 2012-07-21 19:25:10.000000000 
+0200
+++ new/libechonest-2.1.0/src/echonest_export.h 2013-05-16 15:07:07.000000000 
+0200
@@ -17,8 +17,12 @@
 #ifndef ECHONEST_EXPORT_H
 #define ECHONEST_EXPORT_H
 
-#ifdef _WIN32
-  #define ECHONEST_EXPORT __declspec(dllexport)
+#if defined _WIN32
+    #if defined ( echonest_EXPORTS )
+        #define ECHONEST_EXPORT __declspec(dllexport)
+    #else
+        #define ECHONEST_EXPORT __declspec(dllimport)
+    #endif
 #elif __GNUC__ >= 4
   #define ECHONEST_EXPORT __attribute__ ((visibility("default")))
 #else
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libechonest-2.0.1/tests/ArtistTest.cpp 
new/libechonest-2.1.0/tests/ArtistTest.cpp
--- old/libechonest-2.0.1/tests/ArtistTest.cpp  2012-07-21 19:25:10.000000000 
+0200
+++ new/libechonest-2.1.0/tests/ArtistTest.cpp  2013-05-16 15:07:07.000000000 
+0200
@@ -805,6 +805,17 @@
     qDebug() << testArtist.videos();
 }
 
+void ArtistTest::testGenres()
+{
+    QNetworkReply* reply = Artist::fetchGenres();
+    QEventLoop loop;
+    loop.connect( reply, SIGNAL(finished()), SLOT(quit()) );
+    loop.exec();
+
+    QVector< QString > genres = Artist::parseGenreList( reply );
+    QVERIFY( genres.size() > 0 );
+    QVERIFY( genres.contains( QLatin1String( "dub" ) ) );
+}
 
 QTEST_MAIN(ArtistTest)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libechonest-2.0.1/tests/ArtistTest.h 
new/libechonest-2.1.0/tests/ArtistTest.h
--- old/libechonest-2.0.1/tests/ArtistTest.h    2012-07-21 19:25:10.000000000 
+0200
+++ new/libechonest-2.1.0/tests/ArtistTest.h    2013-05-16 15:07:07.000000000 
+0200
@@ -61,6 +61,7 @@
     void testUrls();
     void testVideosUrl();
     void testVideos();
+    void testGenres();
 };
 
 #endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libechonest-2.0.1/tests/PlaylistTest.cpp 
new/libechonest-2.1.0/tests/PlaylistTest.cpp
--- old/libechonest-2.0.1/tests/PlaylistTest.cpp        2012-07-21 
19:25:10.000000000 +0200
+++ new/libechonest-2.1.0/tests/PlaylistTest.cpp        2013-05-16 
15:07:07.000000000 +0200
@@ -116,6 +116,28 @@
 
 }
 
+void PlaylistTest::testStaticWithSongType()
+{
+    DynamicPlaylist::PlaylistParams p;
+    p.append( DynamicPlaylist::PlaylistParamData( DynamicPlaylist::Artist, 
QLatin1String( "Dean Martin" ) ) );
+    p.append( DynamicPlaylist::PlaylistParamData( DynamicPlaylist::SongType, 
QLatin1String( "christmas" ) ) );
+    p.append( DynamicPlaylist::PlaylistParamData( 
DynamicPlaylist::SongInformation, QVariant::fromValue( 
Echonest::SongInformation( Echonest::SongInformation::AudioSummaryInformation | 
Echonest::SongInformation::Hotttnesss | 
Echonest::SongInformation::ArtistHotttnesss | 
Echonest::SongInformation::ArtistFamiliarity | 
Echonest::SongInformation::SongType ) ) ) );
+    p.append( DynamicPlaylist::PlaylistParamData( DynamicPlaylist::Results, 20 
) );
+
+    QNetworkReply* reply = DynamicPlaylist::staticPlaylist( p );
+
+    qDebug() << reply->url().toEncoded();
+
+    QEventLoop loop;
+    loop.connect( reply, SIGNAL(finished()), SLOT(quit()) );
+    loop.exec();
+    SongList songs = DynamicPlaylist::parseStaticPlaylist( reply );
+
+    Q_FOREACH( const Song& song, songs ) {
+        QVERIFY( song.songTypes().contains( QLatin1String("christmas" ) ) );
+    }
+}
+
 void PlaylistTest::testStaticXSPF()
 {
     DynamicPlaylist::PlaylistParams p;
@@ -500,6 +522,30 @@
 
 }
 
+void PlaylistTest::testGenreRadio()
+{
+    DynamicPlaylist::PlaylistParams p;
+    p.append( DynamicPlaylist::PlaylistParamData( DynamicPlaylist::Genre, 
QLatin1String( "dance pop" ) ) );
+    p.append( DynamicPlaylist::PlaylistParamData( 
Echonest::DynamicPlaylist::Type, Echonest::DynamicPlaylist::GenreRadioType ) );
+    p.append( DynamicPlaylist::PlaylistParamData( 
DynamicPlaylist::SongInformation, QVariant::fromValue( 
Echonest::SongInformation( Echonest::SongInformation::AudioSummaryInformation | 
Echonest::SongInformation::Hotttnesss | 
Echonest::SongInformation::ArtistHotttnesss | 
Echonest::SongInformation::ArtistFamiliarity | 
Echonest::SongInformation::SongType ) ) ) );
+    p.append( DynamicPlaylist::PlaylistParamData( DynamicPlaylist::Results, 20 
) );
+
+    QNetworkReply* reply = DynamicPlaylist::staticPlaylist( p );
+
+    qDebug() << reply->url().toEncoded();
+
+    QEventLoop loop;
+    loop.connect( reply, SIGNAL(finished()), SLOT(quit()) );
+    loop.exec();
+    SongList songs = DynamicPlaylist::parseStaticPlaylist( reply );
+    QVERIFY( songs.size() == 20 ); 
+
+    /*Q_FOREACH( const Song& song, songs ) {
+        //no usefull test code can be inserted here, because genres are not 
(yet?) supported in songs (e.g. to check via SongInformation if a song is genre 
"dance pop")
+        qDebug() << song;
+    }*/
+}
+
 
 QTEST_MAIN( PlaylistTest )
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libechonest-2.0.1/tests/PlaylistTest.h 
new/libechonest-2.1.0/tests/PlaylistTest.h
--- old/libechonest-2.0.1/tests/PlaylistTest.h  2012-07-21 19:25:10.000000000 
+0200
+++ new/libechonest-2.1.0/tests/PlaylistTest.h  2013-05-16 15:07:07.000000000 
+0200
@@ -27,11 +27,14 @@
 
     void testStatic1();
     void testStatic2();
+    void testStaticWithSongType();
     void testStaticXSPF();
     void testDynamic1();
     void testDynamic2();
     void testNewDynamicAPI();
     void testDynamicChainXSPF();
+
+    void testGenreRadio();
 };
 
 #endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libechonest-2.0.1/tests/SongTest.cpp 
new/libechonest-2.1.0/tests/SongTest.cpp
--- old/libechonest-2.0.1/tests/SongTest.cpp    2012-07-21 19:25:10.000000000 
+0200
+++ new/libechonest-2.1.0/tests/SongTest.cpp    2013-05-16 15:07:07.000000000 
+0200
@@ -157,6 +157,29 @@
 
 }
 
+void SongTest::testSearchSongType()
+{
+    Echonest::Song::SearchParams params;
+    params.append( Echonest::Song::SearchParamData( Echonest::Song::SongType, 
QLatin1String("christmas") ) );
+    params.append( Echonest::Song::SearchParamData( Echonest::Song::SongType, 
QLatin1String("live") ) );
+    params.append( Echonest::Song::SearchParamData( Echonest::Song::Results, 
30 ) );
+
+    QNetworkReply* reply = Echonest::Song::search( params, 
Echonest::SongInformation( Echonest::SongInformation::ArtistHotttnesss  | 
Echonest::SongInformation::ArtistLocation | 
Echonest::SongInformation::ArtistFamiliarity | 
Echonest::SongInformation::SongType ) );
+
+    qDebug() << "Test search:" << reply->url().toString();
+    QEventLoop loop;
+    loop.connect( reply, SIGNAL(finished()), SLOT(quit()) );
+    loop.exec();
+
+    QVector< Echonest::Song > songs = Echonest::Song::parseSearch( reply );
+    qDebug() << songs << songs.size();
+    foreach( const Echonest::Song& s, songs) {
+      QVERIFY( s.songTypes().size() > 0 );
+      QVERIFY( s.songTypes().contains( QLatin1String("christmas" ) ) );
+      QVERIFY( s.songTypes().contains( QLatin1String("live" ) ) );
+    }
+}
+
 QTEST_MAIN(SongTest)
 
 #include "SongTest.moc"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libechonest-2.0.1/tests/SongTest.h 
new/libechonest-2.1.0/tests/SongTest.h
--- old/libechonest-2.0.1/tests/SongTest.h      2012-07-21 19:25:10.000000000 
+0200
+++ new/libechonest-2.1.0/tests/SongTest.h      2013-05-16 15:07:07.000000000 
+0200
@@ -30,6 +30,8 @@
 
     void testIdentify();
     void testIdentifyWithData();
+
+    void testSearchSongType();
 };
 
 #endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libechonest-2.0.1/tests/test_data/License.txt 
new/libechonest-2.1.0/tests/test_data/License.txt
--- old/libechonest-2.0.1/tests/test_data/License.txt   2012-07-21 
19:25:10.000000000 +0200
+++ new/libechonest-2.1.0/tests/test_data/License.txt   1970-01-01 
01:00:00.000000000 +0100
@@ -1,13 +0,0 @@
-
-Track      |   License URL
-----------------------------------------------
- 01        |   http://artlibre.org/licence.php/lal.html
- 02        |   http://artlibre.org/licence.php/lal.html
- 03        |   http://artlibre.org/licence.php/lal.html
- 04        |   http://artlibre.org/licence.php/lal.html
- 05        |   http://artlibre.org/licence.php/lal.html
- 06        |   http://artlibre.org/licence.php/lal.html
- 07        |   http://artlibre.org/licence.php/lal.html
- 08        |   http://artlibre.org/licence.php/lal.html
- 09        |   http://artlibre.org/licence.php/lal.html
- artwork   |   http://artlibre.org/licence.php/lal.html
\ No newline at end of file

-- 
To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org
For additional commands, e-mail: opensuse-commit+h...@opensuse.org

Reply via email to