fix字幕颜色不对问题

This commit is contained in:
zlzw 2024-11-30 17:38:38 +08:00
parent 23861a897f
commit b5c85409cf
2 changed files with 4 additions and 4 deletions

View File

@ -206,7 +206,7 @@ public class BiliLiveDatabase extends SQLiteManager {
public List<LiveWebDanmuBean.Danmu> getDanmu(Long startTime, Long endTime, int page, int pageSize) {
List<LiveWebDanmuBean.Danmu> list=new ArrayList<>();
List<LiveWebDanmuBean.Danmu> list = new ArrayList<>();
String query = "SELECT danmu AS text, fontSize, color, (sql_time - ?) AS `time`, "
+ "CASE WHEN model < 4 THEN 'scroll' "
@ -238,7 +238,7 @@ public class BiliLiveDatabase extends SQLiteManager {
LiveWebDanmuBean.Danmu danmu = new LiveWebDanmuBean.Danmu();
danmu.setText(text);
danmu.setFontSize(fontSize);
danmu.setColor(color);
danmu.setColor("#" + color);
danmu.setTime(time);
danmu.setBarrageType(model);
list.add(danmu);

View File

@ -19,7 +19,7 @@ import java.util.concurrent.TimeUnit;
public class LiveDatabasesService {
private static final Cache<String, BiliLiveDatabase> liveDatabases = CacheBuilder.newBuilder()
.maximumSize(1000)
.expireAfterAccess(30, TimeUnit.MINUTES)
.expireAfterAccess(2, TimeUnit.MINUTES)
.removalListener(it -> {
if (it.wasEvicted()) {
if (it.getValue() != null) {
@ -34,7 +34,7 @@ public class LiveDatabasesService {
configDatabase = new BiliLiveConfigDatabase();
}
public String getCacheInfo() {
return "总数:"+liveDatabases.size()+","+ Arrays.toString(liveDatabases.asMap().keySet().toArray());
return "总数:"+liveDatabases.size()+","+ Arrays.toString(liveDatabases.asMap().keySet().toArray())+","+ Arrays.toString(liveDatabases.asMap().values().toArray());
}
public BiliLiveDatabase getLiveDatabase(String roomId) {