Closed Bug 1057354 Opened 10 years ago Closed 10 years ago

Popcorn Maker imports random Soundcloud track instead of audio at link location

Categories

(Webmaker Graveyard :: Popcorn Maker, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: doug, Assigned: thecount)

Details

Attachments

(1 file)

I'm making a video to show people how to apply for the Web Literacy Skill Sharer badge: https://dajbelshaw.makes.org/popcorn/28e2

I've recorded the screencast video in multiple sections, uploaded to YouTube, and arranged it in Popcorn Maker. No problems.

I've done the same for the audio, but using Soundcloud. When I enter the URL for the audio, I get a random bit of audio instead of mine: http://g.recordit.co/WXLnlvN3rd.gif
Obviously something is up on the mediasync end. I'll take a look at this tonight unless someone can get to it before me.
Assignee: nobody → schranz.m
Status: NEW → ASSIGNED
On a less serious note, you mean this wasn't your intended song Doug?
Ha, no. Thanks Matthew! Will have to resort to Plan B (iMovie - ugh) for this one...
Media sync not looking up user names and just audio names? That has happened before but I thought I fixed it...

Anyway, you can use YouTube for audio too.
Could also change the name to be something more unique, until this is fixed.
Best I can tell soundcloud is simply ignoring user_id in the query https://api.soundcloud.com/tracks/01-1.json?callback=?&client_id=PRaNFlda6Bhf5utPjUsptg&user_id=dajbelshaw

This broke before, and this was the fix: https://github.com/mozilla/popcorn.webmaker.org/commit/7b31e72432a26cabec81c7b323d10f29fff4c9d2

It looks new and I cannot find a fix as to why user_id simply doesn't work.
Assignee: schranz.m → scott
So it looks like you just reversed the code to what it was previously. Any chance you remember the case it was fixing before?
Flags: needinfo?(scott)
They are not the same.

Old old way was:

"https://api.soundcloud.com/tracks.json?callback=?&client_id=PRaNFlda6Bhf5utPjUsptg&title=" + id + "&user_id=" + userId

This was their track.json endpoint, passing in a user_id and track id.

Current way (what's on prod now):

"https://api.soundcloud.com/tracks/" + id + ".json?callback=?&client_id=PRaNFlda6Bhf5utPjUsptg&user_id=" + userId

tracks/id.json and user_id again. Now track id is the filename, but user_id is still a query string.

My patch it is:

"https://api.soundcloud.com/resolve.json?callback=?&client_id=PRaNFlda6Bhf5utPjUsptg&url=" + decodeURIComponent( baseUrl )

Docs: https://developers.soundcloud.com/docs/api/reference#resolve

resolve.json with track url instead of user_id.

What I like about this is it gets the data based on the track's url. To me this seems less likely to fail, because it has one less variables, user_id, a variable that has failed for us twice.
Flags: needinfo?(scott)
Comment on attachment 8477481 [details] [review]
https://github.com/mozilla/popcorn.webmaker.org/pull/561

Must be a recent addition.

R+
Attachment #8477481 - Flags: review?(schranz.m) → review+
Landed this, closing.
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: