2
0
Эх сурвалжийг харах

Possibly fixed some more issues in official stations.

KrisVos130 8 жил өмнө
parent
commit
971406ba1e

+ 2 - 0
app/client/scripts/onCreated.js

@@ -553,6 +553,8 @@ Template.communityStation.onCreated(function () {
                         var song_duration = currentSong.duration;
                         if (song_duration <= duration) {
                             Session.set("pauseVideo", true);
+                        } else if (Session.get("pauseVideo") === true) {
+                            Session.set("pauseVideo", false);
                         }
                         var d = moment.duration(duration, 'seconds');
                         if (Session.get("state") === "playing") {

+ 2 - 2
app/server/server.js

@@ -277,7 +277,7 @@ function Station(type) {
             Playlists.update({type: type}, {$set: {lastSong: currentSong}});
             Rooms.update({type: type}, {$set: {timePaused: 0}});
             this.songTimer();
-            Rooms.update({type: type}, {$set: {currentSong: {song: Songs.findOne({mid: songs[currentSong]}), started: startedAt}}});
+            Rooms.update({type: type}, {$set: {currentSong: {song: Songs.findOne({mid: songs[currentSong]}), started: Date.now()}}});
         }
     };
 
@@ -296,7 +296,7 @@ function Station(type) {
         Playlists.update({type: type}, {$set: {lastSong: currentSong}});
         Rooms.update({type: type}, {$set: {timePaused: 0}});
         this.songTimer();
-        Rooms.update({type: type}, {$set: {currentSong: {song: Songs.findOne({mid: songs[currentSong]}), started: startedAt}}});
+        Rooms.update({type: type}, {$set: {currentSong: {song: Songs.findOne({mid: songs[currentSong]}), started: Date.now()}}});
     };
 
     Rooms.update({type: type}, {$set: {timePaused: 0}});