mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Fixed issue with duration not being added
This commit is contained in:
2
public/dist/main.min.js
vendored
2
public/dist/main.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -1415,7 +1415,6 @@ $(document).on( "click", ".add-suggested", function(e){
|
|||||||
var title = $(this).attr("data-video-title");
|
var title = $(this).attr("data-video-title");
|
||||||
var length = $(this).attr("data-video-length");
|
var length = $(this).attr("data-video-length");
|
||||||
|
|
||||||
|
|
||||||
Search.submit(id, title, length);
|
Search.submit(id, title, length);
|
||||||
$("#suggested-" + id).remove();
|
$("#suggested-" + id).remove();
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ var Suggestions = {
|
|||||||
|
|
||||||
duration = Helper.pad(minutes) + ":" + Helper.pad(seconds);*/
|
duration = Helper.pad(minutes) + ":" + Helper.pad(seconds);*/
|
||||||
|
|
||||||
var song = List.generateSong({id: video_id, title: video_title, duration: duration}, false, false, false, true);
|
var song = List.generateSong({id: video_id, title: video_title, length: params.duration, duration: duration}, false, false, false, true);
|
||||||
$("#user-suggest-html").append(song);
|
$("#user-suggest-html").append(song);
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -50,13 +50,13 @@ var Suggestions = {
|
|||||||
$.each(response.items, function(i,song)
|
$.each(response.items, function(i,song)
|
||||||
{
|
{
|
||||||
var duration = song.contentDetails.duration;
|
var duration = song.contentDetails.duration;
|
||||||
|
var length = Search.durationToSeconds(duration);
|
||||||
duration = Helper.secondsToOther(Search.durationToSeconds(duration));
|
duration = Helper.secondsToOther(Search.durationToSeconds(duration));
|
||||||
var video_id = song.id;
|
var video_id = song.id;
|
||||||
var video_title = song.snippet.title;
|
var video_title = song.snippet.title;
|
||||||
|
|
||||||
//duration = duration.replace("PT","").replace("H","h ").replace("M","m ").replace("S","s");
|
//duration = duration.replace("PT","").replace("H","h ").replace("M","m ").replace("S","s");
|
||||||
|
$("#suggest-song-html").append(List.generateSong({id: video_id, title: video_title, length: length, duration: duration}, false, false, false));
|
||||||
$("#suggest-song-html").append(List.generateSong({id: video_id, title: video_title, duration: duration}, false, false, false));
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user