torrent priority and piece state fix

This commit is contained in:
royalcat 2024-07-07 23:09:13 +03:00
parent 13ce2aa07f
commit 199a82ff0c
33 changed files with 2227 additions and 959 deletions

View file

@ -0,0 +1,31 @@
input Pagination {
offset: Int!
limit: Int!
}
input StringFilter @oneOf {
eq: String
substr: String
in: [String!]
}
input IntFilter @oneOf {
eq: Int
gt: Int
lt: Int
gte: Int
lte: Int
in: [Int!]
}
input DateTimeFilter @oneOf {
eq: DateTime
gt: DateTime
lt: DateTime
gte: DateTime
lte: DateTime
}
input BooleanFilter @oneOf {
eq: Boolean
}

View file

@ -14,7 +14,7 @@ interface File implements FsEntry {
type SimpleDir implements Dir & FsEntry {
name: String!
entries: [FsEntry!]!
entries: [FsEntry!]! @resolver
}
type SimpleFile implements File & FsEntry {
@ -24,12 +24,12 @@ type SimpleFile implements File & FsEntry {
type ResolverFS implements Dir & FsEntry {
name: String!
entries: [FsEntry!]!
entries: [FsEntry!]! @resolver
}
type ArchiveFS implements Dir & FsEntry {
name: String!
entries: [FsEntry!]!
entries: [FsEntry!]! @resolver
size: Int!
}
@ -37,7 +37,7 @@ type ArchiveFS implements Dir & FsEntry {
type TorrentFS implements Dir & FsEntry {
name: String!
torrent: Torrent!
entries: [FsEntry!]!
entries: [FsEntry!]! @resolver
}
type TorrentFileEntry implements File & FsEntry {

View file

@ -1,27 +0,0 @@
type Torrent {
name: String!
infohash: String!
bytesCompleted: Int!
torrentFilePath: String!
bytesMissing: Int!
files: [TorrentFile!]!
excludedFiles: [TorrentFile!]!
peers: [TorrentPeer!]!
# if at least one piece of the torrent is request to download and not already downloaded
downloading: Boolean!
}
type TorrentFile {
filename: String!
size: Int!
bytesCompleted: Int!
}
type TorrentPeer {
ip: String!
downloadRate: Float!
discovery: String!
port: Int!
clientName: String!
}