Skip to content

Commit

Permalink
fix song section not updating due to last mix change
Browse files Browse the repository at this point in the history
  • Loading branch information
dogatech committed Oct 4, 2024
1 parent 6b54cc0 commit a623fa9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion fe/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "SoulSifter",
"version": "1.7.1",
"description": "DJ & music organization app.",
"build": 3794,
"build": 3796,
"main": "main.js",
"scripts": {
"fe:build": "vite build",
Expand Down
6 changes: 2 additions & 4 deletions fe/src/song-section.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class SongSection extends SearchOptionsMixin(SettingsMixin(SongEditMixin(SongMix
<pitch-slider></pitch-slider>
</div>
<audio-player id="audio" .song="${this.song}" @song-ended="${this.songEnded}"></audio-player>
${this.mix.comments ? html`<div>${this.mix.comments}<br><br></div>` : ''}
${this.mix && this.mix.comments ? html`<div>${this.mix.comments}<br><br></div>` : ''}
<div>${this.song.styles.map(s => s.name).join(', ')}</div>
<div id="musicVideoThumbnail" draggable="true" @dragstart="${this.dragMusicVideo}" ?hide="${!this.musicVideo}"></div>
${debugMode ? html`<div id="musicVideoInput" ?hide="${!!this.musicVideo}">
Expand Down Expand Up @@ -71,7 +71,7 @@ class SongSection extends SearchOptionsMixin(SettingsMixin(SongEditMixin(SongMix
this.saveSongTrailListener = (e) => this.saveSongTrail(e);
this.song = new ss.Song();
this.song.album = new ss.Album();
this.mix = new ss.Mix();
this.mix = undefined;
this.autoplay = false;
}

Expand Down Expand Up @@ -112,8 +112,6 @@ class SongSection extends SearchOptionsMixin(SettingsMixin(SongEditMixin(SongMix
if (this.songTrail.length >= 2) {
let len = this.songTrail.length;
this.mix = ss.Mix.findByOutSongIdAndInSongId(this.songTrail[len - 2].songId, this.songTrail[len - 1].songId);
} else {
this.mix = new ss.Mix();
}
}

Expand Down

0 comments on commit a623fa9

Please sign in to comment.