Added deployment
This commit is contained in:
parent
a88525269e
commit
65ef411116
3 changed files with 50 additions and 6 deletions
|
@ -84,10 +84,12 @@ public class Playlist {
|
|||
if (faultCounter > 4) {
|
||||
MCTPAudio.getPlugin(MCTPAudio.class).getLogger().severe("Detected to many IO errors! Stopping the radio...");
|
||||
stop(); //FALLBACK! 4 errors occured.
|
||||
return;
|
||||
}
|
||||
|
||||
if (playList.isEmpty()) {
|
||||
start();
|
||||
return;
|
||||
}
|
||||
|
||||
//Get song
|
||||
|
@ -97,7 +99,7 @@ public class Playlist {
|
|||
//Remove from PlayList
|
||||
try {
|
||||
playList.remove(nextURL);
|
||||
} catch (ArrayIndexOutOfBoundsException ignored) { }
|
||||
} catch (ArrayIndexOutOfBoundsException ignored) {}
|
||||
|
||||
//Get ticks of song
|
||||
int ticks;
|
||||
|
@ -109,7 +111,6 @@ public class Playlist {
|
|||
embed.setColor(Color.RED);
|
||||
embed.setDescription("A song in the radio does not have MPEG headers. A song without headers cannot be played in the radio because the length cannot be determined. Please fix as soon as possible.\n\nClick on the title to go to the song.");
|
||||
embed.setUrl(nextURL);
|
||||
|
||||
try {
|
||||
MainUtil.sendMessageDiscord(embed);
|
||||
} catch (IOException e) {
|
||||
|
@ -123,8 +124,17 @@ public class Playlist {
|
|||
return;
|
||||
}
|
||||
|
||||
if (ticks == 0) {
|
||||
Bukkit.getLogger().info("0 ticks");
|
||||
if (ticks <= 0) {
|
||||
WebhookMessage.EmbedObject embed = new WebhookMessage.EmbedObject();
|
||||
embed.setTitle("Radio song failure!");
|
||||
embed.setColor(Color.RED);
|
||||
embed.setDescription("A song in the radio does not have MPEG headers. A song without headers cannot be played in the radio because the length cannot be determined. Please fix as soon as possible.\n\nClick on the title to go to the song.");
|
||||
embed.setUrl(nextURL);
|
||||
try {
|
||||
MainUtil.sendMessageDiscord(embed);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
nextSong();
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue