update jukebox to play if not running

This commit is contained in:
2022-02-10 12:01:30 +01:00
parent bf0f280985
commit 4536357642
5 changed files with 153 additions and 38 deletions
@@ -74,9 +74,9 @@ public class JitsiRoomManager implements SmartInitializingSingleton, UserDataPro
@Value("${jitsi.urlFormat:%s/jwt?%s}")
private String urlFormat;
/*
* @see org.springframework.beans.factory.SmartInitializingSingleton#afterSingletonsInstantiated()
* @see org.springframework.beans.factory.SmartInitializingSingleton#
* afterSingletonsInstantiated()
*/
@Override
public void afterSingletonsInstantiated() {
@@ -110,9 +110,9 @@ public class JitsiRoomManager implements SmartInitializingSingleton, UserDataPro
/**
* Gets the.
*
* @param page the page
* @param size the size
* @param sortBy the sort by
* @param page the page
* @param size the size
* @param sortBy the sort by
* @param descending the descending
* @return the page
*/
@@ -124,10 +124,10 @@ public class JitsiRoomManager implements SmartInitializingSingleton, UserDataPro
/**
* Gets the for user id.
*
* @param userId the user id
* @param page the page
* @param size the size
* @param sortBy the sort by
* @param userId the user id
* @param page the page
* @param size the size
* @param sortBy the sort by
* @param descending the descending
* @return the for user id
*/
@@ -144,11 +144,11 @@ public class JitsiRoomManager implements SmartInitializingSingleton, UserDataPro
/**
* Creates the.
*
* @param owner the owner
* @param room the room
* @param starts the starts
* @param owner the owner
* @param room the room
* @param starts the starts
* @param moderationStarts the moderation starts
* @param expires the expires
* @param expires the expires
* @return the jitsi room
* @throws JOSEException the JOSE exception
*/
@@ -213,7 +213,8 @@ public class JitsiRoomManager implements SmartInitializingSingleton, UserDataPro
ShortenedUrl shortenedUrl = shortenedUrlManager.get(jitsiRoom.getCode());
if (shortenedUrl != null) {
shortenedUrl.setUrl(jitsiRoom.getUrl());
shortenedUrl.setNote("JitsiRoom: " + jitsiRoom.getRoom());
shortenedUrl.setNote("JitsiRoom: "
+ jitsiRoom.getRoom());
shortenedUrl.setExpires(jitsiRoom.getExpires());
shortenedUrlManager.save(shortenedUrl);
jitsiRoom.setOrgUrl(jitsiRoom.getUrl());
@@ -234,8 +235,9 @@ public class JitsiRoomManager implements SmartInitializingSingleton, UserDataPro
*/
public JitsiRoom createShortenedUrl(JitsiRoom jitsiRoom) {
ShortenedUrl shortenedUrl = shortenedUrlManager.create(jitsiRoom.getOwner(),
jitsiRoom.getUrl(), "JitsiRoom: " + jitsiRoom.getRoom(), null,
jitsiRoom.getExpires(), null, false, true);
jitsiRoom.getUrl(), "JitsiRoom: "
+ jitsiRoom.getRoom(),
null, jitsiRoom.getExpires(), null, false, true);
jitsiRoom.setOrgUrl(jitsiRoom.getUrl());
jitsiRoom.setCode(shortenedUrl.getCode());
jitsiRoom.setUrl(shortenedUrl.getLink());
@@ -246,7 +248,7 @@ public class JitsiRoomManager implements SmartInitializingSingleton, UserDataPro
* Delete.
*
* @param jitsiRoom the jitsi room
* @param quota the quota
* @param quota the quota
*/
public void delete(JitsiRoom jitsiRoom, boolean quota) {
if (quota) {
@@ -299,7 +301,6 @@ public class JitsiRoomManager implements SmartInitializingSingleton, UserDataPro
}
}
/*
* @see de.bstly.we.businesslogic.UserDataProvider#getId()
*/
@@ -308,7 +309,6 @@ public class JitsiRoomManager implements SmartInitializingSingleton, UserDataPro
return "jitsiRooms";
}
/*
* @see de.bstly.we.businesslogic.UserDataProvider#getUserData(java.lang.Long)
*/
@@ -321,7 +321,6 @@ public class JitsiRoomManager implements SmartInitializingSingleton, UserDataPro
return result;
}
/*
* @see de.bstly.we.businesslogic.UserDataProvider#purgeUserData(java.lang.Long)
*/
@@ -67,9 +67,9 @@ public class JitsiRoomValidator implements Validator {
/**
* Validate.
*
* @param owner the owner
* @param owner the owner
* @param roomName the room name
* @param errors the errors
* @param errors the errors
*/
public void validate(Long owner, String roomName, Errors errors) {
if (owner == null) {
@@ -97,7 +97,7 @@ public class JitsiRoomValidator implements Validator {
* Validate room.
*
* @param roomName the room name
* @param errors the errors
* @param errors the errors
*/
public void validateRoom(String roomName, Errors errors) {
for (String systemRoomName : systemPropertyManager.get(RESERVED_JITSI_ROOMS, "")
@@ -115,7 +115,7 @@ public class JitsiRoomValidator implements Validator {
* Validate expiry.
*
* @param jitsiRoom the jitsi room
* @param errors the errors
* @param errors the errors
*/
public void validateExpiry(JitsiRoom jitsiRoom, Errors errors) {