Add a new client id & token for Ardour 7, and update to Freesound's API
v2.
Implement OAuth authentication for Freesound downloads, as described at:
https://freesound.org/docs/api/authentication.html#oauth-authentication
Open the Freesound login page in the default browser, so that the user
can log in and get an authorization code, to copy-&-paste from the
browser. Exchange this authorization code for an access token, and use
it in a custom 'Authorization: Bearer $TOKEN' http header.
If logging in to Freesound to download a file fails or is cancelled,
clear the 'downloading' flag for that file in the list so that a
subsequent click on it will try to log in again.
Show login progress in download progress bar, and disable preview if
file hasn't yet been downloaded.
If a download fails for any reason (except the user cancelling it),
report an error in the Log window.
Use curl_free() for pointers returned by curl_easy_escape(), as per the
curl documentation, rather than plain free().
Also, don't use the www. sub-domain of freesound.org: although it
appears to work for most things, it returns an empty document from
https://freesound.org/apiv2/oauth2/access_token/
Remove default empty token value from Mootcher constructor, to make it
explicit when we construct a Mootcher that doesn't require
authorisation, by requiring an empty token parameter in that case.
Copyright-holder and year information is extracted from git log.
git history begins in 2005. So (C) from 1998..2005 is lost. Also some
(C) assignment of commits where the committer didn't use --author.
Make download of sound files multi-threaded. Each sound file download takes
place in its own thread, and has its own progress bar and cancel button,
which stack up from the bottom of the list of results.
Sound files download into a file with a '.part' suffix, which is then
renamed to the intended name on success.
Add a 'Similar' button, which searches Freesound for sounds similar to the
currently-selected sound in the results list.
Use the new freesound-download-dir config variable to decide the location
of sound files downloaded from Freesound.
Move the Windows-specific logic to replace '/'s with '\'s from
Mootcher::changeWorkingDir() to Mootcher::ensureWorkingDir(), and remove
the now unused Mootcher::changeWorkingDir().
Use Glib::build_filename to construct the path.
Add a 'More' button to load the next page of results without clearing the already-found list.
Don't allow cancellation of searches, and don't update progress bar around searches, since we only get one page at a time now.
Show number of pages of results remaining to download in the tooltip of the 'More' button.
Use a new Mootcher object for each request, to avoid bad things happening when clicking in the Freesound search results list while a search or file download is already in progress.
Make the 'Stop' button insensitive except when it will actually stop the download of a sound file.
Only retrieve one page worth of data per search, rather than looping to get all pages.
Don't show an error in the log window if the user cancelled download.
Request 100 items per page, rather than the default 30.
Fix DOS line endings.
that a Freesound directory doesn't appear in /home/carl
without ever using Freesound.
git-svn-id: svn://localhost/ardour2/branches/3.0@11090 d708f5d6-7413-0410-9779-e7cbd77b26cf