forked from 0x2620/pandora
add uid42, fixes #2886
This commit is contained in:
parent
11924fcb0d
commit
6f7b57fc37
2 changed files with 8 additions and 4 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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);
|
||||||
|
|
Loading…
Reference in a new issue