Update TorrentFileInfo.java

pull/183/head
FongMi 2 years ago
parent 178cf5e5e4
commit e28393517f
  1. 10
      thunder/src/main/java/com/xunlei/downloadlib/parameter/TorrentFileInfo.java

@ -2,6 +2,8 @@ package com.xunlei.downloadlib.parameter;
import android.text.TextUtils;
import com.github.catvod.utils.Util;
import java.io.File;
public class TorrentFileInfo {
@ -18,6 +20,10 @@ public class TorrentFileInfo {
return TextUtils.isEmpty(mFileName) ? "" : mFileName;
}
public long getFileSize() {
return mFileSize;
}
public int getFileIndex() {
return mFileIndex;
}
@ -31,6 +37,10 @@ public class TorrentFileInfo {
return this;
}
public String getSize() {
return Util.size(mFileSize);
}
public String getPlayUrl() {
return "magnet://" + getFile().getAbsolutePath() + "?name=" + getFileName() + "&index=" + getFileIndex();
}

Loading…
Cancel
Save