mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Added ability to favorite item from video playback
This commit is contained in:
parent
bceed9fbc4
commit
a84bee544a
3 changed files with 19 additions and 0 deletions
|
@ -62,6 +62,7 @@
|
||||||
- [Pier-Luc Ducharme](https://github.com/pl-ducharme)
|
- [Pier-Luc Ducharme](https://github.com/pl-ducharme)
|
||||||
- [Anantharaju S](https://github.com/Anantharajus)
|
- [Anantharaju S](https://github.com/Anantharajus)
|
||||||
- [Merlin Sievers](https://github.com/dann-merlin)
|
- [Merlin Sievers](https://github.com/dann-merlin)
|
||||||
|
- [Fishbigger](https://github.com/fishbigger)
|
||||||
|
|
||||||
# Emby Contributors
|
# Emby Contributors
|
||||||
|
|
||||||
|
|
|
@ -69,6 +69,12 @@
|
||||||
<div class="osdRatingsText">
|
<div class="osdRatingsText">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<button is="emby-ratingbutton" type="button" class="button-flat hide btnUserRating detailButton" title="${Rate}">
|
||||||
|
<div class="detailButton-content">
|
||||||
|
<span class="material-icons detailButton-icon favorite" aria-hidden="true"></span>
|
||||||
|
</div>
|
||||||
|
</button>
|
||||||
|
|
||||||
<button is="paper-icon-button-light" class="btnSubtitles hide autoSize" title="${Subtitles}">
|
<button is="paper-icon-button-light" class="btnSubtitles hide autoSize" title="${Subtitles}">
|
||||||
<span class="xlargePaperIconButton material-icons closed_caption" aria-hidden="true"></span>
|
<span class="xlargePaperIconButton material-icons closed_caption" aria-hidden="true"></span>
|
||||||
</button>
|
</button>
|
||||||
|
|
|
@ -17,6 +17,7 @@ import keyboardnavigation from '../../../scripts/keyboardNavigation';
|
||||||
import '../../../styles/scrollstyles.scss';
|
import '../../../styles/scrollstyles.scss';
|
||||||
import '../../../elements/emby-slider/emby-slider';
|
import '../../../elements/emby-slider/emby-slider';
|
||||||
import '../../../elements/emby-button/paper-icon-button-light';
|
import '../../../elements/emby-button/paper-icon-button-light';
|
||||||
|
import '../../../elements/emby-ratingbutton/emby-ratingbutton';
|
||||||
import '../../../styles/videoosd.scss';
|
import '../../../styles/videoosd.scss';
|
||||||
import ServerConnections from '../../../components/ServerConnections';
|
import ServerConnections from '../../../components/ServerConnections';
|
||||||
import shell from '../../../scripts/shell';
|
import shell from '../../../scripts/shell';
|
||||||
|
@ -133,6 +134,17 @@ export default function (view) {
|
||||||
programStartDateMs = 0;
|
programStartDateMs = 0;
|
||||||
programEndDateMs = 0;
|
programEndDateMs = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Set currently playing item for favorite button
|
||||||
|
const btnUserRating = view.querySelector('.btnUserRating');
|
||||||
|
|
||||||
|
if (itemHelper.canRate(currentItem)) {
|
||||||
|
btnUserRating.classList.remove('hide');
|
||||||
|
btnUserRating.setItem(currentItem);
|
||||||
|
} else {
|
||||||
|
btnUserRating.classList.add('hide');
|
||||||
|
btnUserRating.setItem(null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function getDisplayTimeWithoutAmPm(date, showSeconds) {
|
function getDisplayTimeWithoutAmPm(date, showSeconds) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue