freesound mootcher patch from donf (#2686)
authorPaul Davis <paul@linuxaudiosystems.com>
Thu, 1 Oct 2009 15:36:34 +0000 (15:36 +0000)
committerPaul Davis <paul@linuxaudiosystems.com>
Thu, 1 Oct 2009 15:36:34 +0000 (15:36 +0000)
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@5696 d708f5d6-7413-0410-9779-e7cbd77b26cf

gtk2_ardour/sfdb_freesound_mootcher.cc

index d88f5fac95681c2a1362601934819a39026cc332..f23698b4bfdb2f73ef4eabacd840304dca10d1c7 100644 (file)
@@ -221,6 +221,28 @@ std::string        Mootcher::searchText(std::string word)
                postMessage += tempPointer;\r
                sprintf( tempPointer, "&searchtags=1");\r
                postMessage += tempPointer;\r
+\r
+               // Ref: http://www.freesound.org/forum/viewtopic.php?p=19081\r
+               // const ORDER_DEFAULT = 0;\r
+               // const ORDER_DOWNLOADS_DESC = 1;\r
+               // const ORDER_DOWNLOADS_ASC = 2;\r
+               // const ORDER_USERNAME_DESC = 3;\r
+               // const ORDER_USERNAME_ASC = 4;\r
+               // const ORDER_DATE_DESC = 5;\r
+               // const ORDER_DATE_ASC = 6;\r
+               // const ORDER_DURATION_DESC = 7;\r
+               // const ORDER_DURATION_ASC = 8;\r
+               // const ORDER_FILEFORMAT_DESC = 9;\r
+               // const ORDER_FILEFORMAT_ASC = 10;\r
+               sprintf( tempPointer, "&order=1");\r
+               postMessage += tempPointer;\r
+               sprintf( tempPointer, "&start=0");\r
+               postMessage += tempPointer;\r
+               sprintf( tempPointer, "&limit=10");\r
+               postMessage += tempPointer;\r
+               // The limit of 10 samples is arbitrary, but seems\r
+               // reasonable in light of the fact that all of the returned\r
+               // samples get downloaded, and downloads are s-l-o-w.\r
                \r
                if(curl)\r
                {\r