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

Merge branch 'master' into connection-manager-global

This commit is contained in:
Julien Machiels 2020-09-01 10:16:21 +02:00 committed by GitHub
commit 3cbe0f7264
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
139 changed files with 1032 additions and 3566 deletions

View file

@ -209,6 +209,10 @@ button::-moz-focus-inner {
contain: strict;
}
.defaultCardBackground {
display: flex;
}
.cardContent:not(.defaultCardBackground) {
background-color: transparent;
}

View file

@ -23,6 +23,7 @@ export default class channelMapper {
tunerChannelId: channelId,
providerChannelId: providerChannelId
}),
contentType: 'application/json',
dataType: 'json'
}).then(mapping => {
const listItem = dom.parentWithClass(button, 'listItem');

View file

@ -169,7 +169,8 @@ import 'emby-button';
data: JSON.stringify({
ValidateWriteable: validateWriteable,
Path: path
})
}),
contentType: 'application/json'
}).catch(response => {
if (response) {
if (response.status === 404) {

View file

@ -28,21 +28,21 @@ import 'emby-itemscontainer';
function getSections() {
return [{
name: 'HeaderFavoriteMovies',
name: 'Movies',
types: 'Movie',
id: 'favoriteMovies',
shape: getPosterShape(),
showTitle: false,
overlayPlayButton: true
}, {
name: 'HeaderFavoriteShows',
name: 'Shows',
types: 'Series',
id: 'favoriteShows',
shape: getPosterShape(),
showTitle: false,
overlayPlayButton: true
}, {
name: 'HeaderFavoriteEpisodes',
name: 'Episodes',
types: 'Episode',
id: 'favoriteEpisode',
shape: getThumbShape(),
@ -53,7 +53,7 @@ import 'emby-itemscontainer';
overlayText: false,
centerText: true
}, {
name: 'HeaderFavoriteVideos',
name: 'Videos',
types: 'Video,MusicVideo',
id: 'favoriteVideos',
shape: getThumbShape(),
@ -63,7 +63,7 @@ import 'emby-itemscontainer';
overlayText: false,
centerText: true
}, {
name: 'HeaderFavoriteArtists',
name: 'Artists',
types: 'MusicArtist',
id: 'favoriteArtists',
shape: getSquareShape(),
@ -75,7 +75,7 @@ import 'emby-itemscontainer';
overlayPlayButton: true,
coverImage: true
}, {
name: 'HeaderFavoriteAlbums',
name: 'Albums',
types: 'MusicAlbum',
id: 'favoriteAlbums',
shape: getSquareShape(),
@ -87,7 +87,7 @@ import 'emby-itemscontainer';
overlayPlayButton: true,
coverImage: true
}, {
name: 'HeaderFavoriteSongs',
name: 'Songs',
types: 'Audio',
id: 'favoriteSongs',
shape: getSquareShape(),

View file

@ -6,12 +6,12 @@
<label>
<input type="checkbox" is="emby-checkbox" class="chkStandardFilter videoStandard"
data-filter="IsPlayed" />
<span>${OptionPlayed}</span>
<span>${Played}</span>
</label>
<label>
<input type="checkbox" is="emby-checkbox" class="chkStandardFilter videoStandard"
data-filter="IsUnPlayed" />
<span>${OptionUnplayed}</span>
<span>${Unplayed}</span>
</label>
<label>
<input type="checkbox" is="emby-checkbox" class="chkStandardFilter videoStandard"
@ -21,7 +21,7 @@
<label>
<input type="checkbox" is="emby-checkbox" class="chkStandardFilter chkFavorite"
data-filter="IsFavorite" />
<span>${OptionFavorite}</span>
<span>${Favorites}</span>
</label>
<label>
<input type="checkbox" is="emby-checkbox" class="chkStandardFilter chkLikes" data-filter="Likes" />
@ -53,11 +53,11 @@
<div class="checkboxList">
<label>
<input type="checkbox" is="emby-checkbox" class="chkStatus" data-filter="Continuing" />
<span>${OptionContinuing}</span>
<span>${Continuing}</span>
</label>
<label>
<input type="checkbox" is="emby-checkbox" class="chkStatus" data-filter="Ended" />
<span>${OptionEnded}</span>
<span>${Ended}</span>
</label>
</div>
</div>
@ -68,15 +68,15 @@
<div class="checkboxList">
<label>
<input type="checkbox" is="emby-checkbox" class="chkFeatureFilter" id="chkSubtitle" />
<span>${OptionHasSubtitles}</span>
<span>${Subtitles}</span>
</label>
<label>
<input type="checkbox" is="emby-checkbox" class="chkFeatureFilter" id="chkTrailer" />
<span>${OptionHasTrailer}</span>
<span>${ButtonTrailer}</span>
</label>
<label>
<input type="checkbox" is="emby-checkbox" class="chkFeatureFilter" id="chkSpecialFeature" />
<span>${OptionHasSpecialFeatures}</span>
<span>${SpecialFeatures}</span>
</label>
<label>
<input type="checkbox" is="emby-checkbox" class="chkFeatureFilter" id="chkThemeSong" />

View file

@ -15,41 +15,41 @@
<label>
<input type="checkbox" is="emby-checkbox" class="imageType" data-imagetype="Primary" />
<span>${OptionDownloadPrimaryImage}</span>
<span>${Primary}</span>
</label>
<label>
<input type="checkbox" is="emby-checkbox" class="imageType" data-imagetype="Art" />
<span>${OptionDownloadArtImage}</span>
<span>${Art}</span>
</label>
<label>
<input type="checkbox" is="emby-checkbox" class="imageType" data-imagetype="BoxRear" />
<span>${OptionDownloadBackImage}</span>
<span>${Back}</span>
</label>
<label>
<input type="checkbox" is="emby-checkbox" class="imageType" data-imagetype="Banner" />
<span>${OptionDownloadBannerImage}</span>
<span>${Banner}</span>
</label>
<label>
<input type="checkbox" is="emby-checkbox" class="imageType" data-imagetype="Box" />
<span>${OptionDownloadBoxImage}</span>
<span>${Box}</span>
</label>
<label>
<input type="checkbox" is="emby-checkbox" class="imageType" data-imagetype="Disc" />
<span>${OptionDownloadDiscImage}</span>
<span>${Disc}</span>
</label>
<label>
<input type="checkbox" is="emby-checkbox" class="imageType" data-imagetype="Logo" />
<span>${OptionDownloadLogoImage}</span>
<span>${Logo}</span>
</label>
<label>
<input type="checkbox" is="emby-checkbox" class="imageType" data-imagetype="Menu" />
<span>${OptionDownloadMenuImage}</span>
<span>${Menu}</span>
</label>
<label>
<input type="checkbox" is="emby-checkbox" class="imageType" data-imagetype="Thumb" />
<span>${OptionDownloadThumbImage}</span>
<span>${Thumb}</span>
</label>
</div>
</div>

View file

@ -51,8 +51,22 @@ import 'flexStyles';
if (stream.Type === 'Data') {
continue;
}
html += '<div class="mediaInfoStream">';
const displayType = globalize.translate(`MediaInfoStreamType${stream.Type}`);
let translateString;
switch (stream.Type) {
case 'Audio':
case 'Data':
case 'Subtitle':
case 'Video':
translateString = stream.Type;
break;
case 'EmbeddedImage':
translateString = 'Image';
break;
}
const displayType = globalize.translate(translateString);
html += `<h2 class="mediaInfoStreamType">${displayType}</h2>`;
const attributes = [];
if (stream.DisplayTitle) {

View file

@ -369,18 +369,8 @@ import 'emby-playstatebutton';
}
}
} else {
let showArtist = options.artist === true;
const artistItems = item.ArtistItems;
if (!showArtist && options.artist !== false) {
if (!artistItems || !artistItems.length) {
showArtist = true;
} else if (artistItems.length > 1 || !containerAlbumArtistIds.includes(artistItems[0].Id)) {
showArtist = true;
}
}
if (showArtist) {
if (options.artist) {
const artistItems = item.ArtistItems;
if (artistItems && item.Type !== 'MusicAlbum') {
textlines.push(artistItems.map(a => {
return a.Name;

View file

@ -248,7 +248,7 @@ events.on(serverNotifications, 'RestartRequired', function (e, apiClient) {
[
{
action: 'restart',
title: globalize.translate('ButtonRestart'),
title: globalize.translate('Restart'),
icon: getIconUrl()
}
];

View file

@ -700,7 +700,7 @@ import 'emby-ratingbutton';
const player = this;
currentRuntimeTicks = playbackManager.duration(player);
updateTimeDisplay(playbackManager.currentTime(player), currentRuntimeTicks, playbackManager.getBufferedRanges(player));
updateTimeDisplay(playbackManager.currentTime(player) * 10000, currentRuntimeTicks, playbackManager.getBufferedRanges(player));
}
function releaseCurrentPlayer() {

View file

@ -1617,11 +1617,7 @@ class PlaybackManager {
player = player || self._currentPlayer;
if (player && !enableLocalPlaylistManagement(player)) {
if (player.isLocalPlayer) {
return player.seek((ticks || 0) / 10000);
} else {
return player.seek(ticks);
}
return player.seek(ticks);
}
changeStream(player, ticks);
@ -1630,11 +1626,7 @@ class PlaybackManager {
self.seekRelative = function (offsetTicks, player) {
player = player || self._currentPlayer;
if (player && !enableLocalPlaylistManagement(player) && player.seekRelative) {
if (player.isLocalPlayer) {
return player.seekRelative((ticks || 0) / 10000);
} else {
return player.seekRelative(ticks);
}
return player.seekRelative(ticks);
}
const ticks = getCurrentTicks(player) + offsetTicks;
@ -3218,7 +3210,7 @@ class PlaybackManager {
return player.currentTime();
}
return this.getCurrentTicks(player);
return this.getCurrentTicks(player) / 10000;
}
nextItem(player = this._currentPlayer) {

View file

@ -618,7 +618,7 @@ export default function () {
lastUpdateTime = now;
const player = this;
currentRuntimeTicks = playbackManager.duration(player);
updateTimeDisplay(playbackManager.currentTime(player), currentRuntimeTicks);
updateTimeDisplay(playbackManager.currentTime(player) * 10000, currentRuntimeTicks);
}
}

View file

@ -26,7 +26,8 @@
});
}
window.addEventListener('notificationclick', function (event) {
/* eslint-disable-next-line no-restricted-globals -- self is valid in a serviceworker environment */
self.addEventListener('notificationclick', function (event) {
var notification = event.notification;
notification.close();

View file

@ -255,7 +255,7 @@ export default function (options) {
/**
* Handles zoom changes.
*/
function onZoomChange(scale, imageEl, slideEl) {
function onZoomChange(swiper, scale, imageEl, slideEl) {
const zoomImage = slideEl.querySelector('.swiper-zoom-fakeimg');
if (zoomImage) {

View file

@ -740,7 +740,7 @@ class SyncPlayManager {
const playAtTime = this.lastCommand.When;
const currentPositionTicks = playbackManager.currentTime();
const currentPositionTicks = playbackManager.currentTime() * 10000;
// Estimate PositionTicks on server
const serverPositionTicks = this.lastCommand.PositionTicks + ((currentTime - playAtTime) + this.timeOffsetWithServer) * 10000;
// Measure delay that needs to be recovered

View file

@ -255,7 +255,7 @@ import 'flexStyles';
const runtimeTicks = playbackManager.duration(options.player);
if (runtimeTicks) {
const timeRemainingTicks = runtimeTicks - playbackManager.currentTime(options.player);
const timeRemainingTicks = runtimeTicks - playbackManager.currentTime(options.player) * 10000;
return Math.round(timeRemainingTicks / 10000);
}