add uid42, fixes #2886

This commit is contained in:
j 2016-02-20 15:53:35 +00:00
parent 11924fcb0d
commit 6f7b57fc37
2 changed files with 8 additions and 4 deletions

View File

@ -251,11 +251,13 @@ Ox.load('UI', {
} }
function getVideoURL(id, resolution, part) { function getVideoURL(id, resolution, part) {
var prefix = pandora.site.site.videoprefix var uid = Ox.uid(),
prefix = pandora.site.site.videoprefix
.replace('{id}', id) .replace('{id}', id)
.replace('{part}', part) .replace('{part}', part)
.replace('{resolution}', resolution) .replace('{resolution}', resolution)
.replace('{uid}', Ox.uid()); .replace('{uid}', uid)
.replace('{uid42}', uid % 42);
return prefix + '/' + id + '/' + resolution + 'p' + part + '.' + pandora.user.videoFormat; return prefix + '/' + id + '/' + resolution + 'p' + part + '.' + pandora.user.videoFormat;
} }

View File

@ -1943,11 +1943,13 @@ pandora.getVideoURLName = function(id, resolution, part, track) {
}; };
pandora.getVideoURL = function(id, resolution, part, track) { pandora.getVideoURL = function(id, resolution, part, track) {
var prefix = pandora.site.site.videoprefix var uid = Ox.uid(),
prefix = pandora.site.site.videoprefix
.replace('{id}', id) .replace('{id}', id)
.replace('{part}', part) .replace('{part}', part)
.replace('{resolution}', resolution) .replace('{resolution}', resolution)
.replace('{uid}', Ox.uid()), .replace('{uid}', uid),
.replace('{uid42}', uid % 42),
local = pandora.fs && pandora.fs.getVideoURL(id, resolution, part, track); local = pandora.fs && pandora.fs.getVideoURL(id, resolution, part, track);
return local || prefix + '/' return local || prefix + '/'
+ pandora.getVideoURLName(id, resolution, part, track); + pandora.getVideoURLName(id, resolution, part, track);