[jellyfin] fix multiple sessions for device and update deps (#12794)
Signed-off-by: Miguel Álvarez Díez <miguelwork92@gmail.com>
This commit is contained in:
parent
3ee741e63b
commit
2ee6f8493e
@ -36,82 +36,86 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>io.ktor</groupId>
|
<groupId>io.ktor</groupId>
|
||||||
<artifactId>ktor-client-core-jvm</artifactId>
|
<artifactId>ktor-client-core-jvm</artifactId>
|
||||||
<version>1.6.7</version>
|
<version>1.6.8</version>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>io.ktor</groupId>
|
<groupId>io.ktor</groupId>
|
||||||
<artifactId>ktor-client-cio-jvm</artifactId>
|
<artifactId>ktor-client-cio-jvm</artifactId>
|
||||||
<version>1.6.7</version>
|
<version>1.6.8</version>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>io.ktor</groupId>
|
<groupId>io.ktor</groupId>
|
||||||
<artifactId>ktor-http-jvm</artifactId>
|
<artifactId>ktor-http-jvm</artifactId>
|
||||||
<version>1.6.7</version>
|
<version>1.6.8</version>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>io.ktor</groupId>
|
<groupId>io.ktor</groupId>
|
||||||
<artifactId>ktor-http-cio-jvm</artifactId>
|
<artifactId>ktor-http-cio-jvm</artifactId>
|
||||||
<version>1.6.7</version>
|
<version>1.6.8</version>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>io.ktor</groupId>
|
<groupId>io.ktor</groupId>
|
||||||
<artifactId>ktor-network-jvm</artifactId>
|
<artifactId>ktor-network-jvm</artifactId>
|
||||||
<version>1.6.7</version>
|
<version>1.6.8</version>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>io.ktor</groupId>
|
<groupId>io.ktor</groupId>
|
||||||
<artifactId>ktor-utils-jvm</artifactId>
|
<artifactId>ktor-utils-jvm</artifactId>
|
||||||
<version>1.6.7</version>
|
<version>1.6.8</version>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>io.ktor</groupId>
|
<groupId>io.ktor</groupId>
|
||||||
<artifactId>ktor-io-jvm</artifactId>
|
<artifactId>ktor-io-jvm</artifactId>
|
||||||
<version>1.6.7</version>
|
<version>1.6.8</version>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>io.ktor</groupId>
|
<groupId>io.ktor</groupId>
|
||||||
<artifactId>ktor-network-tls-jvm</artifactId>
|
<artifactId>ktor-network-tls-jvm</artifactId>
|
||||||
<version>1.6.7</version>
|
<version>1.6.8</version>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.jetbrains.kotlin</groupId>
|
<groupId>org.jetbrains.kotlin</groupId>
|
||||||
<artifactId>kotlin-stdlib</artifactId>
|
<artifactId>kotlin-stdlib</artifactId>
|
||||||
<version>1.6.10</version>
|
<version>1.6.21</version>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.jetbrains.kotlinx</groupId>
|
<groupId>org.jetbrains.kotlinx</groupId>
|
||||||
<artifactId>kotlinx-coroutines-core-jvm</artifactId>
|
<artifactId>kotlinx-coroutines-core-jvm</artifactId>
|
||||||
<version>1.5.2</version>
|
<version>1.6.1</version>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.jetbrains.kotlinx</groupId>
|
<groupId>org.jetbrains.kotlinx</groupId>
|
||||||
<artifactId>kotlinx-coroutines-jdk8</artifactId>
|
<artifactId>kotlinx-coroutines-jdk8</artifactId>
|
||||||
<version>1.5.2</version>
|
<version>1.6.1</version>
|
||||||
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.jetbrains.kotlinx</groupId>
|
<groupId>org.jetbrains.kotlinx</groupId>
|
||||||
<artifactId>kotlinx-serialization-core-jvm</artifactId>
|
<artifactId>kotlinx-serialization-core-jvm</artifactId>
|
||||||
<version>1.3.1</version>
|
<version>1.3.3</version>
|
||||||
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.jetbrains.kotlinx</groupId>
|
<groupId>org.jetbrains.kotlinx</groupId>
|
||||||
<artifactId>kotlinx-serialization-json-jvm</artifactId>
|
<artifactId>kotlinx-serialization-json-jvm</artifactId>
|
||||||
<version>1.3.1</version>
|
<version>1.3.3</version>
|
||||||
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>io.github.microutils</groupId>
|
<groupId>io.github.microutils</groupId>
|
||||||
<artifactId>kotlin-logging-jvm</artifactId>
|
<artifactId>kotlin-logging-jvm</artifactId>
|
||||||
<version>2.1.16</version>
|
<version>2.1.23</version>
|
||||||
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</project>
|
</project>
|
||||||
|
|||||||
@ -383,7 +383,7 @@ public class JellyfinServerHandler extends BaseBridgeHandler {
|
|||||||
@Nullable
|
@Nullable
|
||||||
SessionInfo clientSession = sessions.stream()
|
SessionInfo clientSession = sessions.stream()
|
||||||
.filter(session -> Objects.equals(session.getDeviceId(), handler.getThing().getUID().getId()))
|
.filter(session -> Objects.equals(session.getDeviceId(), handler.getThing().getUID().getId()))
|
||||||
.findFirst().orElse(null);
|
.sorted((a, b) -> b.getLastActivityDate().compareTo(a.getLastActivityDate())).findFirst().orElse(null);
|
||||||
handler.updateStateFromSession(clientSession);
|
handler.updateStateFromSession(clientSession);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user