Skip to content

Commit 4443fbe

Browse files
authored
Add Paused state for live data due to false positive of returning HostNotFound when they were only paused! (#135)
* Add Paused state for live data due to false positive of returning HostNotFound when they were only paused! * Fix accidental pom.xml comment!
1 parent a6188d8 commit 4443fbe

File tree

3 files changed

+2
-1
lines changed

3 files changed

+2
-1
lines changed

API/src/main/java/io/github/jwdeveloper/tiktok/data/requests/LiveData.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ public Response() {}
5252
public enum LiveStatus {
5353
HostNotFound,
5454
HostOnline,
55+
HostPaused,
5556
HostOffline,
5657
}
5758

Client/src/main/java/io/github/jwdeveloper/tiktok/http/mappers/LiveDataMapper.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ public LiveData.Response map(String json) {
6161
var statusId = status.getAsInt();
6262
var statusValue = switch (statusId) {
6363
case 2 -> LiveData.LiveStatus.HostOnline;
64+
case 3 -> LiveData.LiveStatus.HostPaused;
6465
case 4 -> LiveData.LiveStatus.HostOffline;
6566
default -> LiveData.LiveStatus.HostNotFound;
6667
};

pom.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@
7878
</execution>
7979
</executions>
8080
</plugin>
81-
8281
</plugins>
8382
</build>
8483

0 commit comments

Comments
 (0)