Browse Source

Fixed issue with skipDuration being undefined for simple songs.

KrisVos130 8 years ago
parent
commit
7b3e93a108
1 changed files with 6 additions and 0 deletions
  1. 6 0
      frontend/components/Station/Station.vue

+ 6 - 0
frontend/components/Station/Station.vue

@@ -330,6 +330,9 @@
 							if (res.data.currentSong) {
 								_this.noSong = false;
 								_this.simpleSong = (res.data.currentSong.likes === -1 && res.data.currentSong.dislikes === -1);
+								if (_this.simpleSong) {
+									_this.currentSong.skipDuration = 0;
+								}
 								console.log(12334);
 								_this.youtubeReady();
 								_this.playVideo();
@@ -365,6 +368,9 @@
 						if (data.currentSong) {
 							_this.noSong = false;
 							_this.simpleSong = (data.currentSong.likes === -1 && data.currentSong.dislikes === -1);
+							if (_this.simpleSong) {
+								_this.currentSong.skipDuration = 0;
+							}
 							console.log(1233, _this.stationId);
 							if (!_this.playerReady) _this.youtubeReady();
 							else _this.playVideo();