|
@@ -96,7 +96,7 @@
|
|
<input
|
|
<input
|
|
class="input"
|
|
class="input"
|
|
type="text"
|
|
type="text"
|
|
- v-model="editing.song.duration"
|
|
|
|
|
|
+ v-model.number="editing.song.duration"
|
|
/>
|
|
/>
|
|
</p>
|
|
</p>
|
|
</div>
|
|
</div>
|
|
@@ -106,7 +106,9 @@
|
|
<input
|
|
<input
|
|
class="input"
|
|
class="input"
|
|
type="text"
|
|
type="text"
|
|
- v-model="editing.song.skipDuration"
|
|
|
|
|
|
+ v-model.number="
|
|
|
|
+ editing.song.skipDuration
|
|
|
|
+ "
|
|
/>
|
|
/>
|
|
</p>
|
|
</p>
|
|
</div>
|
|
</div>
|
|
@@ -618,6 +620,16 @@ export default {
|
|
modals: state => state.modals.admin
|
|
modals: state => state.modals.admin
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
+ watch: {
|
|
|
|
+ /* eslint-disable */
|
|
|
|
+ "editing.song.duration": function() {
|
|
|
|
+ this.drawCanvas();
|
|
|
|
+ },
|
|
|
|
+ "editing.song.skipDuration": function() {
|
|
|
|
+ this.drawCanvas();
|
|
|
|
+ }
|
|
|
|
+ /* eslint-enable */
|
|
|
|
+ },
|
|
methods: {
|
|
methods: {
|
|
save(songToCopy, close) {
|
|
save(songToCopy, close) {
|
|
const song = JSON.parse(JSON.stringify(songToCopy));
|
|
const song = JSON.parse(JSON.stringify(songToCopy));
|
|
@@ -761,7 +773,7 @@ export default {
|
|
.then(data => {
|
|
.then(data => {
|
|
apiResult.album.artists = [];
|
|
apiResult.album.artists = [];
|
|
apiResult.album.artistIds = [];
|
|
apiResult.album.artistIds = [];
|
|
- const artistRegex = new RegExp(" \\([0-9]\\)$");
|
|
|
|
|
|
+ const artistRegex = new RegExp(" \\([0-9]+\\)$");
|
|
|
|
|
|
apiResult.dataQuality = data.data_quality;
|
|
apiResult.dataQuality = data.data_quality;
|
|
data.artists.forEach(artist => {
|
|
data.artists.forEach(artist => {
|
|
@@ -796,12 +808,16 @@ export default {
|
|
if (type === "genres")
|
|
if (type === "genres")
|
|
this.updateSongField({
|
|
this.updateSongField({
|
|
field: "genres",
|
|
field: "genres",
|
|
- value: this.editing.song.discogs.album.genres
|
|
|
|
|
|
+ value: JSON.parse(
|
|
|
|
+ JSON.stringify(this.editing.song.discogs.album.genres)
|
|
|
|
+ )
|
|
});
|
|
});
|
|
if (type === "artists")
|
|
if (type === "artists")
|
|
this.updateSongField({
|
|
this.updateSongField({
|
|
field: "artists",
|
|
field: "artists",
|
|
- value: this.editing.song.discogs.album.artists
|
|
|
|
|
|
+ value: JSON.parse(
|
|
|
|
+ JSON.stringify(this.editing.song.discogs.album.artists)
|
|
|
|
+ )
|
|
});
|
|
});
|
|
},
|
|
},
|
|
searchDiscogsForPage(page) {
|
|
searchDiscogsForPage(page) {
|
|
@@ -937,6 +953,7 @@ export default {
|
|
this.pauseVideo(false);
|
|
this.pauseVideo(false);
|
|
break;
|
|
break;
|
|
case "skipToLast10Secs":
|
|
case "skipToLast10Secs":
|
|
|
|
+ if (this.video.paused) this.pauseVideo(false);
|
|
this.video.player.seekTo(
|
|
this.video.player.seekTo(
|
|
this.editing.song.duration -
|
|
this.editing.song.duration -
|
|
10 +
|
|
10 +
|
|
@@ -999,7 +1016,7 @@ export default {
|
|
const duration = Number(this.editing.song.duration);
|
|
const duration = Number(this.editing.song.duration);
|
|
const afterDuration = videoDuration - (skipDuration + duration);
|
|
const afterDuration = videoDuration - (skipDuration + duration);
|
|
|
|
|
|
- const width = 560;
|
|
|
|
|
|
+ const width = 530;
|
|
|
|
|
|
const currentTime = this.video.player.getCurrentTime();
|
|
const currentTime = this.video.player.getCurrentTime();
|
|
|
|
|
|
@@ -1153,6 +1170,7 @@ export default {
|
|
) {
|
|
) {
|
|
this.video.paused = false;
|
|
this.video.paused = false;
|
|
this.video.player.stopVideo();
|
|
this.video.player.stopVideo();
|
|
|
|
+ this.drawCanvas();
|
|
}
|
|
}
|
|
if (this.playerReady) {
|
|
if (this.playerReady) {
|
|
this.youtubeVideoCurrentTime = this.video.player
|
|
this.youtubeVideoCurrentTime = this.video.player
|
|
@@ -1190,6 +1208,8 @@ export default {
|
|
this.drawCanvas();
|
|
this.drawCanvas();
|
|
},
|
|
},
|
|
onStateChange: event => {
|
|
onStateChange: event => {
|
|
|
|
+ this.drawCanvas();
|
|
|
|
+
|
|
if (event.data === 1) {
|
|
if (event.data === 1) {
|
|
if (!this.video.autoPlayed) {
|
|
if (!this.video.autoPlayed) {
|
|
this.video.autoPlayed = true;
|
|
this.video.autoPlayed = true;
|