Browse Source

Fixed seekerbar bug.

KrisVos130 9 years ago
parent
commit
b599281086
1 changed files with 2 additions and 4 deletions
  1. 2 4
      app/app.js

+ 2 - 4
app/app.js

@@ -806,7 +806,7 @@ if (Meteor.isClient) {
                         //var playlist = Playlists.findOne({type: type});
                         currentSongR = room.currentSong;
                         currentSong = room.currentSong.song;
-                        currentSong.startedAt = room.currentSong.startedAt;
+                        currentSong.started = room.currentSong.started;
                         //var songArray = playlist.songs;
                         //songArray.forEach(function(song) {
                         //    if (song.id === currentSongR.song.id) {
@@ -888,9 +888,7 @@ if (Meteor.isServer) {
         var currentSong = playlist.lastSong;
         var currentTitle = songs[currentSong].title;
 
-        if (Rooms.findOne({type: type}).currentSong === undefined) {
-            Rooms.update({type: type}, {$set: {currentSong: {song: songs[currentSong], started: startedAt}}});
-        }
+        Rooms.update({type: type}, {$set: {currentSong: {song: songs[currentSong], started: startedAt}}});
 
         this.skipSong = function() {
             songs = Playlists.findOne({type: type}).songs;