mirror of
https://github.com/ikun0014/lx-music-mobile.git
synced 2025-07-05 20:18:55 +08:00
修复潜在的桌面歌词导致应用崩溃问题
This commit is contained in:
parent
5772c1216d
commit
2ad8364ca6
@ -18,8 +18,8 @@ public class LyricPlayer {
|
|||||||
|
|
||||||
String lyric = "";
|
String lyric = "";
|
||||||
String translationLyric = "";
|
String translationLyric = "";
|
||||||
List<HashMap> lines;
|
List<HashMap> lines = new ArrayList<HashMap>();
|
||||||
HashMap tags;
|
HashMap tags = new HashMap();
|
||||||
boolean isPlay = false;
|
boolean isPlay = false;
|
||||||
int curLineNum = 0;
|
int curLineNum = 0;
|
||||||
int maxLine = 0;
|
int maxLine = 0;
|
||||||
@ -99,10 +99,12 @@ public class LyricPlayer {
|
|||||||
if (offsetStr == null || offsetStr.equals("")) {
|
if (offsetStr == null || offsetStr.equals("")) {
|
||||||
tags.put("offset", 0);
|
tags.put("offset", 0);
|
||||||
} else {
|
} else {
|
||||||
int offset = 0;
|
int offset;
|
||||||
try {
|
try {
|
||||||
offset = Integer.parseInt(offsetStr);
|
offset = Integer.parseInt(offsetStr);
|
||||||
} catch (Exception err) {}
|
} catch (Exception err) {
|
||||||
|
offset = 0;
|
||||||
|
}
|
||||||
tags.put("offset", offset);
|
tags.put("offset", offset);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -183,7 +185,7 @@ public class LyricPlayer {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
lines = new ArrayList<HashMap>(list.size());
|
// lines = new ArrayList<HashMap>(list.size());
|
||||||
for (Entry<String, Integer> entry : list) {
|
for (Entry<String, Integer> entry : list) {
|
||||||
lines.add((HashMap) linesMap.get(entry.getKey()));
|
lines.add((HashMap) linesMap.get(entry.getKey()));
|
||||||
}
|
}
|
||||||
@ -217,7 +219,9 @@ public class LyricPlayer {
|
|||||||
pause();
|
pause();
|
||||||
isPlay = true;
|
isPlay = true;
|
||||||
|
|
||||||
performanceTime = getNow() - (int) tags.get("offset") - offset;
|
Object tagOffset = tags.get("offset");
|
||||||
|
if (tagOffset == null) tagOffset = 0;
|
||||||
|
performanceTime = getNow() - (int) tagOffset - offset;
|
||||||
startPlayTime = curTime;
|
startPlayTime = curTime;
|
||||||
|
|
||||||
curLineNum = findCurLineNum(getCurrentTime()) - 1;
|
curLineNum = findCurLineNum(getCurrentTime()) - 1;
|
||||||
|
@ -1,30 +1,3 @@
|
|||||||
### 新增
|
|
||||||
|
|
||||||
- 为搜索、歌单、排行榜的歌曲菜单添加分享“分享歌曲”按钮
|
|
||||||
- 新增设置-基本设置-分享设置,它用于控制歌曲菜单的分享行为,默认使用系统分享
|
|
||||||
- 新增是否在通知栏显示歌曲图片设置,默认开启(原来的行为)
|
|
||||||
- 新增黑色皮肤“黑灯瞎火”
|
|
||||||
- 新增设置-基本设置-主题颜色-跟随系统亮、暗模式切换主题设置,注:此设置需要android 10或ios 13及以上的版本才支持
|
|
||||||
|
|
||||||
### 优化
|
|
||||||
|
|
||||||
- 现在即使切歌模式处于单曲循环、顺序播放、禁用时,手动切歌将会按照列表循环的规则处理(#69)
|
|
||||||
- 添加定时退出计时结束后的提示
|
|
||||||
|
|
||||||
### 修复
|
### 修复
|
||||||
|
|
||||||
- 修复wy源搜索某些歌曲时第一页之后的歌曲无法加载的问题
|
- 修复潜在的桌面歌词导致应用崩溃问题
|
||||||
- 每次启动时过滤无效的歌曲
|
|
||||||
- 修复换源失败时的处理问题
|
|
||||||
- 修复非循环模式下播放结束后的状态显示问题及无法重新播放的问题(#104)
|
|
||||||
- 修复定时退出可能导致崩溃的问题
|
|
||||||
- 修复播放详情页歌词界面在把应用切到后台再切回来会导致屏幕常亮失效的问题
|
|
||||||
|
|
||||||
### 变更
|
|
||||||
|
|
||||||
- 歌曲菜单的“复制歌曲名”改为“分享歌曲”,点击后可以选择第三方应用分享歌曲详情页链接
|
|
||||||
- 已存在目录列表的歌曲再次添加时将不会变成移除
|
|
||||||
|
|
||||||
### 其他
|
|
||||||
|
|
||||||
- 升级react-native到 v0.68.1
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user