mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Simplify resume button
This commit is contained in:
parent
8777742123
commit
55cc467a95
1 changed files with 5 additions and 2 deletions
|
@ -292,8 +292,11 @@ define(['loading', 'appRouter', 'layoutManager', 'connectionManager', 'userSetti
|
||||||
var enableShuffle = item.IsFolder || -1 !== ['MusicAlbum', 'MusicGenre', 'MusicArtist'].indexOf(item.Type);
|
var enableShuffle = item.IsFolder || -1 !== ['MusicAlbum', 'MusicGenre', 'MusicArtist'].indexOf(item.Type);
|
||||||
hideAll(page, 'btnShuffle', enableShuffle);
|
hideAll(page, 'btnShuffle', enableShuffle);
|
||||||
canPlay = true;
|
canPlay = true;
|
||||||
if (item.UserData && item.UserData.PlaybackPositionTicks > 0) {
|
|
||||||
hideAll(page, 'btnResume', true);
|
const isResumable = item.UserData && item.UserData.PlaybackPositionTicks > 0;
|
||||||
|
hideAll(page, 'btnResume', isResumable);
|
||||||
|
|
||||||
|
if (isResumable) {
|
||||||
for (const elem of page.querySelectorAll('.btnPlay')) {
|
for (const elem of page.querySelectorAll('.btnPlay')) {
|
||||||
elem.querySelector('.detailButton-icon').classList.replace('play_arrow', 'replay');
|
elem.querySelector('.detailButton-icon').classList.replace('play_arrow', 'replay');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue