forked from Qortal/qortal
Added new ArbitraryResourceStatus "NOT_PUBLISHED" - for when a non-existent resource is attempted to be loaded.
This commit is contained in:
parent
4a42dc2d00
commit
5e750b4283
@ -63,6 +63,11 @@ public class ArbitraryDataResource {
|
||||
this.calculateChunkCounts();
|
||||
}
|
||||
|
||||
if (this.totalChunkCount == 0) {
|
||||
// Assume not published
|
||||
return new ArbitraryResourceStatus(Status.NOT_PUBLISHED, this.localChunkCount, this.totalChunkCount);
|
||||
}
|
||||
|
||||
if (resourceIdType != ResourceIdType.NAME) {
|
||||
// We only support statuses for resources with a name
|
||||
return new ArbitraryResourceStatus(Status.UNSUPPORTED, this.localChunkCount, this.totalChunkCount);
|
||||
|
@ -8,6 +8,7 @@ public class ArbitraryResourceStatus {
|
||||
|
||||
public enum Status {
|
||||
PUBLISHED("Published", "Published but not yet downloaded"),
|
||||
NOT_PUBLISHED("Not published", "Resource does not exist"),
|
||||
DOWNLOADING("Downloading", "Locating and downloading files..."),
|
||||
DOWNLOADED("Downloaded", "Files downloaded"),
|
||||
BUILDING("Building", "Building..."),
|
||||
|
Loading…
Reference in New Issue
Block a user