Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

修复ed2k 和 magnet 磁力链接剧集反复切换可能会引起 playUrl 为null的异常 #101

Merged
merged 3 commits into from
Aug 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ public void onSuccess(final SubtitleLoadSuccessResult subtitleLoadSuccessResult)
String subtitleFile = subtitleFileCacheDir + subtitleLoadSuccessResult.fileName;
File cacheSubtitleFile = new File(subtitleFile);
boolean writeResult = FileUtils.writeSimple(subtitleLoadSuccessResult.content.getBytes(), cacheSubtitleFile);
if (writeResult) {
if (writeResult && playSubtitleCacheKey != null) {
CacheManager.save(MD5.string2MD5(getPlaySubtitleCacheKey()), subtitleFile);
}
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ public void onItemClick(TvRecyclerView parent, View itemView, int position) {
@Override
public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
FastClickCheckUtil.check(view);
if (position == -1) return;
VodInfo vodInfo = historyAdapter.getData().get(position);

// HistoryDialog historyDialog = new HistoryDialog().build(mContext, vodInfo).setOnHistoryListener(new HistoryDialog.OnHistoryListener() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,7 @@ public void run() {
return true;
}
if (url.startsWith("tvbox-oth:")) {
stop(false);
int idx = Integer.parseInt(url.substring(10));
task_url=ed2kList.get(idx);
name = XLTaskHelper.instance().getFileName(task_url);
Expand All @@ -282,7 +283,7 @@ public void run() {
break;
}
String playUrl=getPlayUrl();
if(!playUrl.isEmpty()){
if(playUrl != null && !playUrl.isEmpty()){
callback.play(playUrl);
return;
}
Expand Down