Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mediathread replace #496

Merged
merged 5 commits into from
Oct 17, 2016
Merged

Mediathread replace #496

merged 5 commits into from
Oct 17, 2016

Conversation

thraxil
Copy link
Contributor

@thraxil thraxil commented Oct 13, 2016

After performing an FLV -> MP4 conversion, if the video has an associated Mediathread asset, we send a POST over there to inform it of the new URL.

The update logic does not yet exist on the Mediathread side, so it will need to be implemented before we can turn this feature on (it's behind a waffle switch).

The new bits in wardenclyffe/mediathread/tasks.py will be useful for looking at to implement that.

As it is currently implemented:

  • it gets the mediathread asset URL, eg https://mediathread.ccnmtl.columbia.edu/asset/1234/, sticks update/ on the end and makes a POST request there
  • the parameters in that request roughly mirror the params that are sent to /save/ when a new video is created, but stripped down to only the fields that would change as a result of the conversion (ie, we expect all the metadata and size info to stay the same)

Any of that we can definitely change if we think a different endpoint or parameter setup would make implementation of the Meth side simpler.

similar to the `mediathreadsubmit`, abuse the `File` model to mark that
a Video has begun an operation that will require updating the
mediathread entry once a later operation has finished.

When the banzai stuff lands, we should be able to stop doing this, but
for now, it's the best way we have to carry state across multiple
operations :(
when the video is being converted from FLV to MP4, if there is a known
Mediathread asset, create the flag file so a later stage will know to
pass along the new URL to mediathread.
after the conversion, if the video that was converted had an associated
mediathread asset, we make a POST request to it with the new mp4 URL so
it can use that instead of the FLV.
@sdreher sdreher merged commit e845d3a into master Oct 17, 2016
@sdreher sdreher deleted the mediathread-replace branch October 17, 2016 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants