remove length check fix source string

This commit is contained in:
Jonathan Baecker 2019-08-16 16:52:10 +02:00
parent f8c0eb1225
commit 23c2d95c55
2 changed files with 7 additions and 4 deletions

View File

@ -520,11 +520,13 @@ $(document).ready(function() {
var last_out = parseFloat($('.list-item').last().attr('out'));
var over_length = last_start - start_time + last_out - last_in - 86400;
/* TODO: no length check for now
if (over_length > 0) {
modal(true, null, null, "Save Playlist", "Playtime from Playlist is to long!<br/><b>Difference:</b> " + over_length, 'auto', 'auto', function(result) {});
} else if (over_length < -6) {
modal(true, null, null, "Save Playlist", "Playtime from Playlist is to short!<br/><b>Difference:</b> " + over_length, 'auto', 'auto', function(result) {});
} else {
*/
var save_list = [];
$('#playlistBody li.list-item').each(function(){
save_list.push({
@ -546,7 +548,7 @@ $(document).ready(function() {
modal(true, null, null, "Save Playlist", result, 'auto', 'auto', function(result) {});
}
});
}
//}
});
// fill end of playlist to get full 24 hours

View File

@ -182,15 +182,16 @@ if(!empty($_POST['save'])) {
"in" => floatval($rawline->in),
"out" => floatval($rawline->out),
"duration" => floatval($rawline->dur),
"source" => intval($rawline->src)
"source" => "/" . $rawline->src
);
$list["program"][] = $clipItem;
$length += round($rawline->out - $rawline->in);
// TODO: add real length?
//$length += round($rawline->out - $rawline->in);
}
$list["program"]["length"] = sprintf('%02d:%02d:%02d', ($length/3600),($length/60%60), $length%60);
//$list["length"] = sprintf('%02d:%02d:%02d', ($length/3600),($length/60%60), $length%60);
if (!is_dir($json_path)) {
mkdir($json_path, 0777, true);