-
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[feature|fix] Support for torrent seeding; fix player seek bug
- Loading branch information
Showing
19 changed files
with
549 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
app/src/main/java/com/skyd/anivu/model/bean/PeerInfoBean.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
package com.skyd.anivu.model.bean | ||
|
||
import android.os.Parcelable | ||
import com.skyd.anivu.base.BaseBean | ||
import kotlinx.parcelize.Parcelize | ||
import kotlinx.serialization.Serializable | ||
import org.libtorrent4j.PeerInfo.ConnectionType | ||
|
||
@Parcelize | ||
@Serializable | ||
data class PeerInfoBean( | ||
var client: String? = null, | ||
var totalDownload: Long = 0, | ||
var totalUpload: Long = 0, | ||
var flags: Int = 0, | ||
var source: Byte = 0, | ||
var upSpeed: Int = 0, | ||
var downSpeed: Int = 0, | ||
var connectionType: ConnectionType? = null, | ||
var progress: Float = 0f, | ||
var progressPpm: Int = 0, | ||
var ip: String? = null, | ||
) : BaseBean, Parcelable { | ||
companion object { | ||
fun from(peerInfo: org.libtorrent4j.PeerInfo): PeerInfoBean { | ||
return PeerInfoBean( | ||
client = peerInfo.client(), | ||
totalDownload = peerInfo.totalDownload(), | ||
totalUpload = peerInfo.totalUpload(), | ||
flags = peerInfo.flags(), | ||
source = peerInfo.source(), | ||
upSpeed = peerInfo.upSpeed(), | ||
downSpeed = peerInfo.downSpeed(), | ||
connectionType = peerInfo.connectionType(), | ||
progress = peerInfo.progress(), | ||
progressPpm = peerInfo.progressPpm(), | ||
ip = peerInfo.ip() | ||
) | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.