mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Added duration to songs
This commit is contained in:
@@ -154,6 +154,13 @@ var Helper = {
|
||||
return Math.floor(Math.random() * (max - min)) + min;
|
||||
},
|
||||
|
||||
secondsToOther: function(seconds){
|
||||
var time = seconds;
|
||||
var minutes = Math.floor(time/60);
|
||||
time = time - (minutes * 60);
|
||||
return [minutes, time];
|
||||
},
|
||||
|
||||
rgbToHsl: function(arr, light){
|
||||
r = arr[0];
|
||||
g = arr[1];
|
||||
|
||||
@@ -843,6 +843,9 @@ var List = {
|
||||
}
|
||||
attr = ".vote-container";
|
||||
del_attr = "del";
|
||||
|
||||
var _temp_duration = Helper.secondsToOther(_song_info.duration);
|
||||
song.find(".card-duration").text(Helper.pad(_temp_duration[0]) + ":" + Helper.pad(_temp_duration[1]));
|
||||
}else if(!list){
|
||||
song.find(".vote-text").text(_song_info.duration);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user