mirror of
https://github.com/Coloryr/AllMusic.git
synced 2026-11-28 04:25:39 +00:00
错误自动停止
This commit is contained in:
1 parent
58fe4ba812
commit
53592bbfd4
2 files changed
+8
No files matched your search
@@ -13,6 +13,7 @@ import coloryr.allmusic.music.api.obj.music.trialinfo.TrialInfoObj;
|
||||
import coloryr.allmusic.music.api.obj.program.info.PrInfoOBJ;
|
||||
import coloryr.allmusic.music.lyric.LyricDo;
|
||||
import coloryr.allmusic.music.lyric.LyricSave;
|
||||
import coloryr.allmusic.music.play.PlayMusic;
|
||||
import coloryr.allmusic.music.search.SearchOBJ;
|
||||
import coloryr.allmusic.music.search.SearchPage;
|
||||
import coloryr.allmusic.utils.logs;
|
||||
@@ -244,6 +245,8 @@ public class APIMain {
|
||||
}
|
||||
|
||||
public String getListMusic() {
|
||||
if (PlayMusic.error >= 10)
|
||||
return null;
|
||||
if (!isUpdata && AllMusic.getConfig().getPlayList().size() != 0) {
|
||||
String ID;
|
||||
if (AllMusic.getConfig().isPlayListRandom()) {
|
||||
|
||||
@@ -28,6 +28,7 @@ public class PlayMusic {
|
||||
|
||||
public static LyricSave lyric;
|
||||
public static ShowOBJ nowLyric;
|
||||
public static int error;
|
||||
|
||||
private static boolean isRun;
|
||||
private static final Queue<MusicObj> tasks = new ConcurrentLinkedQueue<>();
|
||||
@@ -94,7 +95,11 @@ public class PlayMusic {
|
||||
if (!isList)
|
||||
AllMusic.side.bqt(AllMusic.getMessage().getMusicPlay().getSwitch());
|
||||
}
|
||||
error = 0;
|
||||
} catch (Exception e) {
|
||||
if (isList) {
|
||||
error++;
|
||||
}
|
||||
AllMusic.log.warning("§d[AllMusic]§c歌曲信息解析错误");
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user