Bug 355350 - Online Resources/Freesound Download No Results
Summary: Online Resources/Freesound Download No Results
Status: RESOLVED FIXED
Alias: None
Product: kdenlive
Classification: Applications
Component: User Interface (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR minor
Target Milestone: ---
Assignee: Roger Morton
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-11-14 20:10 UTC by qubodup
Modified: 2015-12-17 13:43 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description qubodup 2015-11-14 20:10:26 UTC
catalyst-hook 15.9-6
catalyst-libgl 15.9-2
catalyst-utils 15.9-2
mlt-git r4132.v0.9.2.354.g4f22f28-1
kdenlive 15.12 branch commit 7b44fa4bc294484127f5805970b382f136b89537

Freesound download is broken. Probably because of recent APIv2 upgrade http://blog.freesound.org/?p=511 .

Steps to reproduce:
1. Start Kdenlive
2. Right-click in project bin, pick Online Resources
3. Enter search term "meow" and search
...
4. (optional) To confirm that the interface works in general, try Archive and OCAL searches.

Expected result:
1. Sounds appear as results

Actual result:
1. No search results appear

Suggested solution options:
a. Remove Freesound as a search for the time being.
b. Display an error message when using Freesound search.
c. Adopt Freesound API 2.0

Freesound is up at the time of testing (if it wasn't, one would expect an error message).

Demo video:
https://youtu.be/yymcIiDa_u4

Issue was originally reported on forums by jprim:
https://forum.kde.org/viewtopic.php?f=265&t=129307
Comment 1 Roger Morton 2015-11-15 07:27:00 UTC
utils/freesound.cpp  void FreeSound::slotStartSearch goes to 
http://www.freesound.org/api/sounds/search/?q=searchquery&api_key=a1772c8236e945a4bee30a64058dabf8

But this returns

 "status_code": 410, 
    "explanation": "Freesound APIv1 has reached its end of life and is no longer available. Please, upgrade to Freesound APIv2. More information: http://www.freesound.org/docs/api/", 
    "type": "Gone", 
    "error": true
Comment 2 Roger Morton 2015-11-15 21:40:47 UTC
I have started a bit of work on this. I have a new API key for kdenlive - and that is working.  Current problem is that the calls to the API are returning HTML instead of JSON. But I get JSON back if I use curl in a terminal.
Comment 3 Roger Morton 2015-11-16 21:40:49 UTC
I am making progress on this bug. Have got the ver 2 of the API to return JSON.  You could assign this to me.
Comment 4 Roger Morton 2015-11-28 11:44:51 UTC
Patch to fix this submitted to kde.reviewboard https://git.reviewboard.kde.org/r/126191/
However, the freesound changes should be considered an interim
measure.  The import button imports freesounds high quality preview
file rather than the actual sound file. This is because the acutal
sound file requires the user to log in to free sound and grab the
file. There is a method for developing applications to use this more
advanced OAuth2 authentication - and it is documented on freesound.
http://www.freesound.org/docs/api/authentication.html#oauth2-authentication
 And I am happy to give it a shot in coding for this OAuth2
authentication. But it looks like it will take a bit of work. So I
figured it might be good to get these changes that make freesound work
into Kdenlive
Comment 5 Vincent PINON 2015-12-03 22:23:32 UTC
Git commit e6cb9569ca11ab77c5e40636b64ff871353d3326 by Vincent Pinon, on behalf of Roger Morton.
Committed on 03/12/2015 at 22:22.
Pushed by vpinon into branch 'Applications/15.12'.

freesound interim fix and clipart fix

 Fixes download of clip art.
 Fixes license parsing of clip art.
 Interim fix for search on freesound
 Freesound downloads high quality mp3 preview instead of the high quality file.
 This is because new freesound API needs you authenticate as user to get the high quality.
 There is a way to do it but I have not implemented this yet.
 Default file extension to mp3 on all freesound disable the import button while download is running -
 don't start two download jobs
 Fixes Auto play of previews in freesound.
 Preview button toggels on of the playing of the preview
 sound Preview button goes to "Stop" when playing preview and automatically back to "preview" when preview finishes
 Warns if you are about to overwrite an imported file I note that duplicate clip in bin checking is commented out in the code
 in ClipCreationDialog::createClipsCommand. And duplicate clips get created if you choose overwrite.
 Confirms the file download has finished.

M  +5    -0    src/utils/archiveorg.h
M  +107  -38   src/utils/freesound.cpp
M  +7    -1    src/utils/freesound.h
M  +2    -1    src/utils/openclipart.cpp
M  +4    -1    src/utils/openclipart.h
M  +228  -53   src/utils/resourcewidget.cpp
M  +16   -0    src/utils/resourcewidget.h

http://commits.kde.org/kdenlive/e6cb9569ca11ab77c5e40636b64ff871353d3326
Comment 6 qubodup 2015-12-07 00:01:01 UTC
Freesound seems to work. Thanks!

However, pressing a link (license for example) in the online resource interface appears to freeze the window and kdenlive.

[6874:6874:1207/005841:ERROR:sandbox_linux.cc(338)] InitializeSandbox() called with multiple threads in process gpu-process

Video: https://youtu.be/UQhi0qEYeHk
Comment 7 Roger Morton 2015-12-17 12:37:53 UTC
(In reply to qubodup from comment #6)
> Freesound seems to work. Thanks!
> 
> However, pressing a link (license for example) in the online resource
> interface appears to freeze the window and kdenlive.
> 
> [6874:6874:1207/005841:ERROR:sandbox_linux.cc(338)] InitializeSandbox()
> called with multiple threads in process gpu-process
> 
> Video: https://youtu.be/UQhi0qEYeHk

Can not reproduce this issue. Links open in whatever the system is set up for reading html from.
Comment 8 qubodup 2015-12-17 13:43:21 UTC
you're right. my issue was unrelated to kdenlive. marking as fixed.