forked from 0x2620/pandora
subtitles in edits
This commit is contained in:
parent
6949cab8c6
commit
09f30b3c5a
2 changed files with 16 additions and 12 deletions
|
|
@ -1734,6 +1734,14 @@ pandora.getStatusText = function(data) {
|
|||
return parts.join(', ');
|
||||
};
|
||||
|
||||
pandora.getSubtitlesLayer = function() {
|
||||
return pandora.site.layers.filter(function(layer) {
|
||||
return layer.isSubtitles;
|
||||
}).map(function(layer) {
|
||||
return layer.id;
|
||||
})[0];
|
||||
}
|
||||
|
||||
pandora.getMediaURL = function(url) {
|
||||
return pandora.site.site.mediaprefix + url;
|
||||
};
|
||||
|
|
@ -1753,11 +1761,7 @@ pandora.getVideoOptions = function(data) {
|
|||
var canPlayClips = data.editable || pandora.site.capabilities.canPlayClips[pandora.user.level] >= data.rightslevel,
|
||||
canPlayVideo = data.editable || pandora.site.capabilities.canPlayVideo[pandora.user.level] >= data.rightslevel,
|
||||
options = {};
|
||||
options.subtitlesLayer = pandora.site.layers.filter(function(layer) {
|
||||
return layer.isSubtitles;
|
||||
}).map(function(layer) {
|
||||
return layer.id;
|
||||
})[0];
|
||||
options.subtitlesLayer = pandora.getSubtitlesLayer();
|
||||
|
||||
options.censored = canPlayVideo ? []
|
||||
: canPlayClips ? (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue