1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Merge pull request #2323 from jarnedemeulemeester/fix-play-icon-replace-resume-icon

Fix replay icon not getting replaced with play_arrow icon
This commit is contained in:
Bill Thornton 2021-01-21 14:44:45 -05:00 committed by GitHub
commit dade850ccf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -351,9 +351,13 @@ function reloadPlayButtons(page, item) {
const isResumable = item.UserData && item.UserData.PlaybackPositionTicks > 0; const isResumable = item.UserData && item.UserData.PlaybackPositionTicks > 0;
hideAll(page, 'btnResume', isResumable); 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'); const btnPlay = elem.querySelector('.detailButton-icon');
if (isResumable) {
btnPlay.classList.replace('play_arrow', 'replay');
} else {
btnPlay.classList.replace('replay', 'play_arrow');
} }
} }
} else { } else {