Merge branch 'master' into devel

This commit is contained in:
Sebastien 2018-11-22 13:50:48 +02:00
commit 40a4efe714

View File

@ -109,7 +109,7 @@ public class YoutubeTools {
} }
ArrayList<net.Broken.audio.Youtube.SearchResult> finalResult = new ArrayList<>(); ArrayList<net.Broken.audio.Youtube.SearchResult> finalResult = new ArrayList<>();
for(SearchResult item : response.getItems()){ for(SearchResult item : response.getItems()){
logger.debug(item.getSnippet().getTitle()); logger.trace(item.getSnippet().getTitle());
finalResult.add(new net.Broken.audio.Youtube.SearchResult(item, videoHashMap.get(item.getId().getVideoId()).getContentDetails().getDuration())); finalResult.add(new net.Broken.audio.Youtube.SearchResult(item, videoHashMap.get(item.getId().getVideoId()).getContentDetails().getDuration()));
} }
@ -138,7 +138,7 @@ public class YoutubeTools {
} }
else else
hours = 0; hours = 0;
logger.debug(time); logger.trace(time);
if(time.contains("M")) { if(time.contains("M")) {
@ -148,7 +148,7 @@ public class YoutubeTools {
} }
else else
minutes = 0; minutes = 0;
logger.debug(time); logger.trace(time);
if(time.contains("S")) { if(time.contains("S")) {
String matched = time.substring(0, time.indexOf("S")+1); String matched = time.substring(0, time.indexOf("S")+1);
@ -157,7 +157,7 @@ public class YoutubeTools {
} }
else else
seconds = 0; seconds = 0;
logger.debug(time); logger.trace(time);
String hoursStr = (hours < 10) ? "0" + hours : String.valueOf(hours); String hoursStr = (hours < 10) ? "0" + hours : String.valueOf(hours);
String minutesStr = (minutes < 10) ? "0" + minutes : String.valueOf(minutes); String minutesStr = (minutes < 10) ? "0" + minutes : String.valueOf(minutes);