@christianriedl/media 1.0.4 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/views/MusicPage.vue +6 -6
package/package.json
CHANGED
package/src/views/MusicPage.vue
CHANGED
|
@@ -147,21 +147,21 @@
|
|
|
147
147
|
mute.value = playerState.mute;
|
|
148
148
|
}
|
|
149
149
|
if (syncRemote) {
|
|
150
|
-
if (!selected.value || playerState.
|
|
150
|
+
if (!selected.value || playerState.albumId != selected.value.DLNAID) {
|
|
151
151
|
const album = mediaService.folders[playerState.albumId];
|
|
152
152
|
if (album) {
|
|
153
153
|
const audios = await mediaService.getAudios(album);
|
|
154
154
|
selected.value = audios;
|
|
155
155
|
items.splice(0, items.length, ...audios.Files);
|
|
156
156
|
playItems.splice(0, items.length, ...audios.Files);
|
|
157
|
-
if (playerState.mediaId) {
|
|
158
|
-
playIndex.value = items.findIndex((it) => it.DLNAID == playerState.mediaId);
|
|
159
|
-
if (playIndex.value >= 0)
|
|
160
|
-
playingTrack.value = items[playIndex.value];
|
|
161
|
-
}
|
|
162
157
|
computeListHeight();
|
|
163
158
|
}
|
|
164
159
|
}
|
|
160
|
+
if (playerState.mediaId) {
|
|
161
|
+
playIndex.value = items.findIndex((it) => it.DLNAID == playerState.mediaId);
|
|
162
|
+
if (playIndex.value >= 0)
|
|
163
|
+
playingTrack.value = items[playIndex.value];
|
|
164
|
+
}
|
|
165
165
|
}
|
|
166
166
|
setPosition(playerState.duration);
|
|
167
167
|
syncTimer = window.setTimeout(() => getPlayerState(), 1000);
|