|
@@ -56,7 +56,7 @@ public class MediaConnection {
|
|
|
if (authedAccount != null) {
|
|
if (authedAccount != null) {
|
|
|
String loginId = authedAccount.getLoginId();
|
|
String loginId = authedAccount.getLoginId();
|
|
|
long userId = authedAccount.getUserId();
|
|
long userId = authedAccount.getUserId();
|
|
|
- String redisKey = RedisKeys.getVideoUsersKey(videoId);
|
|
|
|
|
|
|
+ String redisKey = RedisKeys.getVideoUsersKey();
|
|
|
HashSet<Long> userIds = redisHash.get(redisKey, videoId);
|
|
HashSet<Long> userIds = redisHash.get(redisKey, videoId);
|
|
|
if (userIds == null) {
|
|
if (userIds == null) {
|
|
|
userIds = new HashSet<>();
|
|
userIds = new HashSet<>();
|
|
@@ -86,7 +86,7 @@ public class MediaConnection {
|
|
|
sessionUsers.remove(userId);
|
|
sessionUsers.remove(userId);
|
|
|
|
|
|
|
|
String videoId = (String) webSocketSession.getAttributes().get("videoId");
|
|
String videoId = (String) webSocketSession.getAttributes().get("videoId");
|
|
|
- String redisKey = RedisKeys.getVideoUsersKey(videoId);
|
|
|
|
|
|
|
+ String redisKey = RedisKeys.getVideoUsersKey();
|
|
|
HashSet<Long> userIds = redisHash.get(redisKey, videoId);
|
|
HashSet<Long> userIds = redisHash.get(redisKey, videoId);
|
|
|
if (userIds != null) {
|
|
if (userIds != null) {
|
|
|
userIds.remove(userId);
|
|
userIds.remove(userId);
|
|
@@ -159,7 +159,7 @@ public class MediaConnection {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public void sendViewCount(String videoId) {
|
|
public void sendViewCount(String videoId) {
|
|
|
- String redisKey = RedisKeys.getVideoUsersKey(videoId);
|
|
|
|
|
|
|
+ String redisKey = RedisKeys.getVideoUsersKey();
|
|
|
Set<Long> userIds = redisHash.get(redisKey, videoId);
|
|
Set<Long> userIds = redisHash.get(redisKey, videoId);
|
|
|
if (userIds == null) {
|
|
if (userIds == null) {
|
|
|
return;
|
|
return;
|