mirror of
https://github.com/jwdeveloper/TikTokLiveJava.git
synced 2026-02-27 08:49:40 -05:00
Add Paused state for live data due to false positive of returning HostNotFound when they were only paused!
This commit is contained in:
@@ -52,6 +52,7 @@ public class LiveData {
|
|||||||
public enum LiveStatus {
|
public enum LiveStatus {
|
||||||
HostNotFound,
|
HostNotFound,
|
||||||
HostOnline,
|
HostOnline,
|
||||||
|
HostPaused,
|
||||||
HostOffline,
|
HostOffline,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -61,6 +61,7 @@ public class LiveDataMapper {
|
|||||||
var statusId = status.getAsInt();
|
var statusId = status.getAsInt();
|
||||||
var statusValue = switch (statusId) {
|
var statusValue = switch (statusId) {
|
||||||
case 2 -> LiveData.LiveStatus.HostOnline;
|
case 2 -> LiveData.LiveStatus.HostOnline;
|
||||||
|
case 3 -> LiveData.LiveStatus.HostPaused;
|
||||||
case 4 -> LiveData.LiveStatus.HostOffline;
|
case 4 -> LiveData.LiveStatus.HostOffline;
|
||||||
default -> LiveData.LiveStatus.HostNotFound;
|
default -> LiveData.LiveStatus.HostNotFound;
|
||||||
};
|
};
|
||||||
|
|||||||
61
pom.xml
61
pom.xml
@@ -48,37 +48,36 @@
|
|||||||
<skip>true</skip>
|
<skip>true</skip>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<!-- <plugin>-->
|
||||||
<groupId>com.mycila</groupId>
|
<!-- <groupId>com.mycila</groupId>-->
|
||||||
<artifactId>license-maven-plugin</artifactId>
|
<!-- <artifactId>license-maven-plugin</artifactId>-->
|
||||||
<version>4.6</version>
|
<!-- <version>4.6</version>-->
|
||||||
<configuration>
|
<!-- <configuration>-->
|
||||||
<properties>
|
<!-- <properties>-->
|
||||||
<owner>jwdeveloper</owner>
|
<!-- <owner>jwdeveloper</owner>-->
|
||||||
<years>2023-2024</years>
|
<!-- <years>2023-2024</years>-->
|
||||||
<email>jacekwoln@gmail.com</email>
|
<!-- <email>jacekwoln@gmail.com</email>-->
|
||||||
</properties>
|
<!-- </properties>-->
|
||||||
<aggregate>true</aggregate>
|
<!-- <aggregate>true</aggregate>-->
|
||||||
<licenseSets>
|
<!-- <licenseSets>-->
|
||||||
<licenseSet>
|
<!-- <licenseSet>-->
|
||||||
<header>license.txt</header>
|
<!-- <header>license.txt</header>-->
|
||||||
<includes>
|
<!-- <includes>-->
|
||||||
<include>**/*.java</include>
|
<!-- <include>**/*.java</include>-->
|
||||||
</includes>
|
<!-- </includes>-->
|
||||||
</licenseSet>
|
<!-- </licenseSet>-->
|
||||||
</licenseSets>
|
<!-- </licenseSets>-->
|
||||||
</configuration>
|
<!-- </configuration>-->
|
||||||
<executions>
|
<!-- <executions>-->
|
||||||
<execution>
|
<!-- <execution>-->
|
||||||
<id>first</id>
|
<!-- <id>first</id>-->
|
||||||
<goals>
|
<!-- <goals>-->
|
||||||
<goal>format</goal>
|
<!-- <goal>format</goal>-->
|
||||||
</goals>
|
<!-- </goals>-->
|
||||||
<phase>process-sources</phase>
|
<!-- <phase>process-sources</phase>-->
|
||||||
</execution>
|
<!-- </execution>-->
|
||||||
</executions>
|
<!-- </executions>-->
|
||||||
</plugin>
|
<!-- </plugin>-->
|
||||||
|
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user