only open selected files
This commit is contained in:
parent
307852c0c6
commit
5354b52193
1 changed files with 6 additions and 6 deletions
|
@ -594,7 +594,6 @@ pandora.ui.mediaView = function(options) {
|
||||||
|
|
||||||
function openVideo(data) {
|
function openVideo(data) {
|
||||||
if (data.ids.length == 1) {
|
if (data.ids.length == 1) {
|
||||||
// fixme only selected videos!
|
|
||||||
var stream = data.ids[0];
|
var stream = data.ids[0];
|
||||||
pandora.api.get({id: pandora.user.ui.item, keys: ['streams', 'durations']}, function(result) {
|
pandora.api.get({id: pandora.user.ui.item, keys: ['streams', 'durations']}, function(result) {
|
||||||
var offset = result.data.streams.indexOf(stream),
|
var offset = result.data.streams.indexOf(stream),
|
||||||
|
@ -602,11 +601,12 @@ pandora.ui.mediaView = function(options) {
|
||||||
itemView: pandora.user.ui.videoView
|
itemView: pandora.user.ui.videoView
|
||||||
},
|
},
|
||||||
videoPoints = {};
|
videoPoints = {};
|
||||||
Ox.print(offset, result.data.streams);
|
if (offset > -1) {
|
||||||
videoPoints['position'] = videoPoints['in'] = Ox.sum(result.data.durations.slice(0, offset));
|
videoPoints['position'] = videoPoints['in'] = Ox.sum(result.data.durations.slice(0, offset));
|
||||||
videoPoints['out'] = videoPoints['in'] + result.data.durations[offset];
|
videoPoints['out'] = videoPoints['in'] + result.data.durations[offset];
|
||||||
set['videoPoints.' + pandora.user.ui.item] = videoPoints;
|
set['videoPoints.' + pandora.user.ui.item] = videoPoints;
|
||||||
pandora.UI.set(set);
|
pandora.UI.set(set);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue