Comment 2 for bug 1215399

Revision history for this message
Michael Nelson (michael.nelson) wrote :

The video is indeed present in the feed, and from the screenshot, USC is finding the video_embedded_html_url [1], but software-center-agent doesn't think the url is correct and instead renders a 404 with "The requested video is not available".

The reason is that SCA doesn't think the sha1 is a hash of the URL, and indeed it's not [2]. Manually constructing the url which should be published with the correct hash does indeed work [3].

So, why is the video url not matching the hash... from a quick look at the code, it looks to be fallout from a recent-ish change we made to only update the approved changes (Application.request_changes and Application._apply_immediate_changes). This would mean that the published video_urls attribute was updated from a previous value, but without updating the published video_embedded_html_urls. Indeed, I can verify this is the case because checking for older videos for zeegaree on vimeo, you can see that one from 4 months ago matches the hash [4].

[1] https://myapps.developer.ubuntu.com/dev/apps/1623/video/6d6550441e87c8c43b69e9eaeedaf49e9dce610c/
[2] hashlib.sha1('http://vimeo.com/65380474').hexdigest()
'd3b70b4008f035bf4d8cd4a35be72f071a8e8228'
[3] https://myapps.developer.ubuntu.com/dev/apps/1623/video/d3b70b4008f035bf4d8cd4a35be72f071a8e8228/
[4] hashlib.sha1('http://vimeo.com/62694828').hexdigest()
 '6d6550441e87c8c43b69e9eaeedaf49e9dce610c'