فهرست منبع

Fixed a bug where song timer wouldn't get cancelled.

KrisVos130 9 سال پیش
والد
کامیت
c4fe58fe18
1فایلهای تغییر یافته به همراه3 افزوده شده و 1 حذف شده
  1. 3 1
      app/app.js

+ 3 - 1
app/app.js

@@ -1015,7 +1015,6 @@ if (Meteor.isServer) {
         }
 
         if (Playlists.find({"songs.mid": code}).count() > 0) {
-            console.log("Code already exists!");
             return createUniqueSongId();
         } else {
             return code;
@@ -1125,6 +1124,9 @@ if (Meteor.isServer) {
         this.songTimer = function() {
             startedAt = Date.now();
 
+            if (timer !== undefined) {
+                timer.pause();
+            }
             timer = new Timer(function() {
                 _this.skipSong();
             }, songs[currentSong].duration * 1000);