Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/release-10.7.z'
Browse files Browse the repository at this point in the history
  • Loading branch information
iwalton3 committed Apr 6, 2021
2 parents 57bbd2b + 8e63b38 commit 33dc25d
Show file tree
Hide file tree
Showing 8 changed files with 58 additions and 34 deletions.
2 changes: 1 addition & 1 deletion build.yaml
@@ -1,7 +1,7 @@
---
# We just wrap `build` so this is really it
name: "jellyfin-web"
version: "10.7.0"
version: "10.7.1"
packages:
- debian.all
- fedora.all
Expand Down
6 changes: 6 additions & 0 deletions debian/changelog
@@ -1,3 +1,9 @@
jellyfin-web (10.7.1-1) unstable; urgency=medium

* New upstream version 10.7.1; release changelog at https://github.com/jellyfin/jellyfin-web/releases/tag/v10.7.1

-- Jellyfin Packaging Team <packaging@jellyfin.org> Sun, 21 Mar 2021 19:23:29 -0400

jellyfin-web (10.7.0-1) unstable; urgency=medium

* New upstream version 10.7.0; release changelog at https://github.com/jellyfin/jellyfin-web/releases/tag/v10.7.0
12 changes: 9 additions & 3 deletions fedora/jellyfin-web.spec
@@ -1,12 +1,12 @@
%global debug_package %{nil}

Name: jellyfin-web
Version: 10.7.0
Version: 10.7.1
Release: 1%{?dist}
Summary: The Free Software Media System web client
License: GPLv3
URL: https://jellyfin.org
# Jellyfin Server tarball created by `make -f .copr/Makefile srpm`, real URL ends with `v%{version}.tar.gz`
# Jellyfin Server tarball created by `make -f .copr/Makefile srpm`, real URL ends with `v%%{version}.tar.gz`
Source0: jellyfin-web-%{version}.tar.gz

%if 0%{?centos}
Expand All @@ -18,6 +18,9 @@ BuildRequires: nodejs-yarn
# ditto for Fedora's yarn RPM
BuildRequires: git
BuildArch: noarch
%if 0%{?fedora} >= 33
BuildRequires: nodejs
%endif

# Disable Automatic Dependency Processing
AutoReqProv: no
Expand All @@ -38,10 +41,13 @@ mv dist %{buildroot}%{_datadir}/jellyfin-web
%{__install} -D -m 0644 LICENSE %{buildroot}%{_datadir}/licenses/jellyfin/LICENSE

%files
%attr(755,root,root) %{_datadir}/jellyfin-web
%defattr(644,root,root,755)
%{_datadir}/jellyfin-web
%{_datadir}/licenses/jellyfin/LICENSE

%changelog
* Sun Mar 21 2021 Jellyfin Packaging Team <packaging@jellyfin.org>
- New upstream version 10.7.1; release changelog at https://github.com/jellyfin/jellyfin-web/releases/tag/v10.7.1
* Mon Mar 08 2021 Jellyfin Packaging Team <packaging@jellyfin.org>
- New stable release 10.7.0; release changelog at https://github.com/jellyfin/jellyfin-web/releases/tag/v10.7.0
* Mon Jul 27 2020 Jellyfin Packaging Team <packaging@jellyfin.org>
Expand Down
2 changes: 1 addition & 1 deletion src/components/apphost.js
Expand Up @@ -8,7 +8,7 @@ import globalize from '../scripts/globalize';
import profileBuilder from '../scripts/browserDeviceProfile';

const appName = 'Jellyfin Web';
const appVersion = '10.7.0';
const appVersion = '10.7.1';

function getBaseProfileOptions(item) {
const disableHlsVideoAudioCodecs = [];
Expand Down
4 changes: 1 addition & 3 deletions src/controllers/itemDetails/index.js
Expand Up @@ -745,9 +745,7 @@ function renderLogo(page, item, apiClient) {

const url = logoImageUrl(item, apiClient, {});

if (!layoutManager.mobile && !userSettings.enableBackdrops()) {
detailLogo.classList.add('hide');
} else if (url) {
if (url) {
detailLogo.classList.remove('hide');
imageLoader.setLazyImage(detailLogo, url);
} else {
Expand Down
25 changes: 23 additions & 2 deletions src/plugins/comicsPlayer/plugin.js
Expand Up @@ -57,11 +57,29 @@ export class ComicsPlayer {
}
}

bindMediaElementEvents() {
const elem = this.mediaElement;

elem?.addEventListener('close', this.onDialogClosed, {once: true});
elem?.querySelector('.btnExit').addEventListener('click', this.onDialogClosed, {once: true});
}

bindEvents() {
this.bindMediaElementEvents();

document.addEventListener('keyup', this.onWindowKeyUp);
}

unbindMediaElementEvents() {
const elem = this.mediaElement;

elem?.removeEventListener('close', this.onDialogClosed);
elem?.querySelector('.btnExit').removeEventListener('click', this.onDialogClosed);
}

unbindEvents() {
this.unbindMediaElementEvents();

document.removeEventListener('keyup', this.onWindowKeyUp);
}

Expand All @@ -85,13 +103,16 @@ export class ComicsPlayer {
elem.id = 'comicsPlayer';
elem.classList.add('slideshowDialog');

elem.innerHTML = '<div class="slideshowSwiperContainer"><div class="swiper-wrapper"></div></div>';
elem.innerHTML = `<div class="slideshowSwiperContainer"><div class="swiper-wrapper"></div></div>
<div class="actionButtons">
<button is="paper-icon-button-light" class="autoSize btnExit" tabindex="-1"><i class="material-icons actionButtonIcon close"></i></button>
</div>`;

this.bindEvents();
dialogHelper.open(elem);
}

this.mediaElement = elem;
this.bindEvents();
return elem;
}

Expand Down
2 changes: 2 additions & 0 deletions src/plugins/comicsPlayer/style.scss
@@ -1,4 +1,6 @@
#comicsPlayer {
background: #fff;

.slideshowSwiperContainer {
height: 100%;
}
Expand Down
39 changes: 15 additions & 24 deletions src/scripts/settings/webSettings.js
@@ -1,5 +1,6 @@
let data;
import DefaultConfig from '../../config.json';

let data;
const urlResolver = document.createElement('a');

// `fetch` with `file:` support
Expand Down Expand Up @@ -55,30 +56,14 @@ async function getConfig() {
return data;
} catch (error) {
console.warn('failed to fetch the web config file:', error);
return getDefaultConfig();
}
}

async function getDefaultConfig() {
try {
const response = await fetchLocal('config.template.json', {
cache: 'no-cache'
});

if (!response.ok) {
throw new Error('network response was not ok');
}

data = await response.json();
data = DefaultConfig;
return data;
} catch (error) {
console.error('failed to fetch the default web config file:', error);
}
}

export function getIncludeCorsCredentials() {
return getConfig()
.then(config => config.includeCorsCredentials)
.then(config => !!config.includeCorsCredentials)
.catch(error => {
console.log('cannot get web config:', error);
return false;
Expand All @@ -87,7 +72,7 @@ export function getIncludeCorsCredentials() {

export function getMultiServer() {
return getConfig().then(config => {
return config.multiserver;
return !!config.multiserver;
}).catch(error => {
console.log('cannot get web config:', error);
return false;
Expand Down Expand Up @@ -126,23 +111,29 @@ const checkDefaultTheme = (themes) => {

export function getThemes() {
return getConfig().then(config => {
const themes = Array.isArray(config.themes) ? config.themes : [];
if (!Array.isArray(config.themes)) {
console.error('web config is invalid, missing themes:', config);
}
const themes = Array.isArray(config.themes) ? config.themes : DefaultConfig.themes;
checkDefaultTheme(themes);
return themes;
}).catch(error => {
console.log('cannot get web config:', error);
checkDefaultTheme();
return [];
return DefaultConfig.themes;
});
}

export const getDefaultTheme = () => internalDefaultTheme;

export function getPlugins() {
return getConfig().then(config => {
return config.plugins;
if (!config.plugins) {
console.error('web config is invalid, missing plugins:', config);
}
return config.plugins || DefaultConfig.plugins;
}).catch(error => {
console.log('cannot get web config:', error);
return [];
return DefaultConfig.plugins;
});
}

0 comments on commit 33dc25d

Please sign in to comment.