mitodl / odl-video-service

building blocks for a basic video service for ODL
BSD 3-Clause "New" or "Revised" License
4 stars 1 forks source link

Make TechTV video URL's work without a slug at the end #494

Closed mbertrand closed 6 years ago

mbertrand commented 6 years ago

The slug at the end of TechTV URL's is not mandatory, so in OVS /videos/595 should work the same as /videos/595-chandelier

pdpinch commented 6 years ago

Do we know what the URL pattern is? Will something like /(\d+\)-\ give us id number?

On Mar 28, 2018, at 1:25 PM, Matt Bertrand notifications@github.com wrote:

The slug at the end of TechTV URL's is not mandatory, so in OVS /videos/595 should work the same as `videos/595-chandelier'

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/mitodl/odl-video-service/issues/494, or mute the thread https://github.com/notifications/unsubscribe-auth/AAaQLh49zcKzACV7rVx5HDXteRd8pMk5ks5ti8eggaJpZM4S_DAy.

emmello commented 6 years ago

all videos will be /videos (or /embeds) /video# anything after that number can be used in a link or truncated and it will still play.

For instance, the latest Blossoms is: http://techtv.mit.edu/videos/33570-los-inquilinos-que-necesita-mi-cuerpo-para-estar-sano-the-tenants-my-body-needs-to-be-healthy

A wee bit wordy to use as a link.

mbertrand commented 6 years ago

The pattern in urls.py should be(?P<video_key>\d+)(-.+)?/?$'

mbertrand commented 6 years ago

@pdpinch should I work on this yet? Just need to make that change to urls.py above and then modify the unit tests a bit.

pdpinch commented 6 years ago

Go for it. My goal is to have everything done for the public collection migration by the end of the sprint, except for waiting for YouTube.

mbertrand commented 6 years ago

@emmello do you think anyone might try to use embed URL's like /embeds/595-chandelier instead of just /embeds/595? I can tweak the url pattern for that one too, currently only /embeds/595 will work.

emmello commented 6 years ago

Yes, some people copy the text, others might add their own language for a new name after the /595, so really the only important thing is just the slug up to the number.