mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Merge remote-tracking branch 'upstream/master' into unstable
This commit is contained in:
commit
e9d3d6bd36
184 changed files with 14969 additions and 9940 deletions
|
@ -21,19 +21,19 @@ jobs:
|
||||||
- task: Cache@2
|
- task: Cache@2
|
||||||
displayName: 'Cache node_modules'
|
displayName: 'Cache node_modules'
|
||||||
inputs:
|
inputs:
|
||||||
key: 'yarn | yarn.lock'
|
key: 'npm | package-lock.json'
|
||||||
path: 'node_modules'
|
path: 'node_modules'
|
||||||
|
|
||||||
- script: 'yarn install --frozen-lockfile'
|
- script: 'npm ci --no-audit'
|
||||||
displayName: 'Install Dependencies'
|
displayName: 'Install Dependencies'
|
||||||
env:
|
env:
|
||||||
SKIP_PREPARE: 'true'
|
SKIP_PREPARE: 'true'
|
||||||
|
|
||||||
- script: 'yarn build:development'
|
- script: 'npm run build:development'
|
||||||
displayName: 'Build Development'
|
displayName: 'Build Development'
|
||||||
condition: eq(variables['BuildConfiguration'], 'development')
|
condition: eq(variables['BuildConfiguration'], 'development')
|
||||||
|
|
||||||
- script: 'yarn build:production'
|
- script: 'npm run build:production'
|
||||||
displayName: 'Build Production'
|
displayName: 'Build Production'
|
||||||
condition: eq(variables['BuildConfiguration'], 'production')
|
condition: eq(variables['BuildConfiguration'], 'production')
|
||||||
|
|
||||||
|
|
|
@ -99,10 +99,6 @@ module.exports = {
|
||||||
'Windows': 'readonly'
|
'Windows': 'readonly'
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
// TODO: Fix warnings and remove these rules
|
|
||||||
'no-redeclare': ['warn'],
|
|
||||||
'no-useless-escape': ['warn'],
|
|
||||||
'no-unused-vars': ['warn']
|
|
||||||
},
|
},
|
||||||
settings: {
|
settings: {
|
||||||
polyfills: [
|
polyfills: [
|
||||||
|
|
6
.github/dependabot.yaml
vendored
6
.github/dependabot.yaml
vendored
|
@ -5,3 +5,9 @@ updates:
|
||||||
schedule:
|
schedule:
|
||||||
interval: monthly
|
interval: monthly
|
||||||
open-pull-requests-limit: 10
|
open-pull-requests-limit: 10
|
||||||
|
|
||||||
|
- package-ecosystem: github-actions
|
||||||
|
directory: '/'
|
||||||
|
schedule:
|
||||||
|
interval: monthly
|
||||||
|
open-pull-requests-limit: 10
|
||||||
|
|
80
.github/workflows/lint.yml
vendored
80
.github/workflows/lint.yml
vendored
|
@ -15,24 +15,32 @@ jobs:
|
||||||
- name: Check out Git repository
|
- name: Check out Git repository
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Set up Node.js
|
- name: Setup node environment
|
||||||
uses: actions/setup-node@v1
|
uses: actions/setup-node@v2.1.5
|
||||||
with:
|
with:
|
||||||
node-version: 12
|
node-version: 12
|
||||||
|
check-latest: true
|
||||||
|
|
||||||
- name: Cache dependencies
|
- name: Get npm cache directory path
|
||||||
uses: actions/cache@v2
|
id: npm-cache-dir-path
|
||||||
|
run: echo "::set-output name=dir::$(npm config get cache)"
|
||||||
|
|
||||||
|
- name: Cache node_modules
|
||||||
|
uses: actions/cache@v2.1.4
|
||||||
|
id: npm-cache
|
||||||
with:
|
with:
|
||||||
path: '**/node_modules'
|
path: ${{ steps.npm-cache-dir-path.outputs.dir }}
|
||||||
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
|
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-npm-
|
||||||
|
|
||||||
- name: Install Node.js dependencies
|
- name: Install Node.js dependencies
|
||||||
run: yarn install --frozen-lockfile
|
run: npm ci --no-audit
|
||||||
env:
|
env:
|
||||||
SKIP_PREPARE: true
|
SKIP_PREPARE: true
|
||||||
|
|
||||||
- name: Run eslint
|
- name: Run eslint
|
||||||
run: yarn lint
|
run: npm run lint
|
||||||
|
|
||||||
run-stylelint-css:
|
run-stylelint-css:
|
||||||
name: Run stylelint (css)
|
name: Run stylelint (css)
|
||||||
|
@ -42,27 +50,35 @@ jobs:
|
||||||
- name: Check out Git repository
|
- name: Check out Git repository
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Set up Node.js
|
- name: Setup node environment
|
||||||
uses: actions/setup-node@v1
|
uses: actions/setup-node@v2.1.5
|
||||||
with:
|
with:
|
||||||
node-version: 12
|
node-version: 12
|
||||||
|
check-latest: true
|
||||||
|
|
||||||
|
- name: Get npm cache directory path
|
||||||
|
id: npm-cache-dir-path
|
||||||
|
run: echo "::set-output name=dir::$(npm config get cache)"
|
||||||
|
|
||||||
|
- name: Cache node_modules
|
||||||
|
uses: actions/cache@v2.1.4
|
||||||
|
id: npm-cache
|
||||||
|
with:
|
||||||
|
path: ${{ steps.npm-cache-dir-path.outputs.dir }}
|
||||||
|
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-npm-
|
||||||
|
|
||||||
- name: Set up stylelint matcher
|
- name: Set up stylelint matcher
|
||||||
uses: xt0rted/stylelint-problem-matcher@v1
|
uses: xt0rted/stylelint-problem-matcher@v1
|
||||||
|
|
||||||
- name: Cache dependencies
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: '**/node_modules'
|
|
||||||
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
|
|
||||||
|
|
||||||
- name: Install Node.js dependencies
|
- name: Install Node.js dependencies
|
||||||
run: yarn install --frozen-lockfile
|
run: npm ci --no-audit
|
||||||
env:
|
env:
|
||||||
SKIP_PREPARE: true
|
SKIP_PREPARE: true
|
||||||
|
|
||||||
- name: Run stylelint
|
- name: Run stylelint
|
||||||
run: yarn stylelint:css
|
run: npm run stylelint:css
|
||||||
|
|
||||||
run-stylelint-scss:
|
run-stylelint-scss:
|
||||||
name: Run stylelint (scss)
|
name: Run stylelint (scss)
|
||||||
|
@ -72,24 +88,32 @@ jobs:
|
||||||
- name: Check out Git repository
|
- name: Check out Git repository
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Set up Node.js
|
- name: Setup node environment
|
||||||
uses: actions/setup-node@v1
|
uses: actions/setup-node@v2.1.5
|
||||||
with:
|
with:
|
||||||
node-version: 12
|
node-version: 12
|
||||||
|
check-latest: true
|
||||||
|
|
||||||
|
- name: Get npm cache directory path
|
||||||
|
id: npm-cache-dir-path
|
||||||
|
run: echo "::set-output name=dir::$(npm config get cache)"
|
||||||
|
|
||||||
|
- name: Cache node_modules
|
||||||
|
uses: actions/cache@v2.1.4
|
||||||
|
id: npm-cache
|
||||||
|
with:
|
||||||
|
path: ${{ steps.npm-cache-dir-path.outputs.dir }}
|
||||||
|
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-npm-
|
||||||
|
|
||||||
- name: Set up stylelint matcher
|
- name: Set up stylelint matcher
|
||||||
uses: xt0rted/stylelint-problem-matcher@v1
|
uses: xt0rted/stylelint-problem-matcher@v1
|
||||||
|
|
||||||
- name: Cache dependencies
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: '**/node_modules'
|
|
||||||
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
|
|
||||||
|
|
||||||
- name: Install Node.js dependencies
|
- name: Install Node.js dependencies
|
||||||
run: yarn install --frozen-lockfile
|
run: npm ci --no-audit
|
||||||
env:
|
env:
|
||||||
SKIP_PREPARE: true
|
SKIP_PREPARE: true
|
||||||
|
|
||||||
- name: Run stylelint
|
- name: Run stylelint
|
||||||
run: yarn stylelint:scss
|
run: npm run stylelint:scss
|
||||||
|
|
1
.npmrc
Normal file
1
.npmrc
Normal file
|
@ -0,0 +1 @@
|
||||||
|
fund=false
|
|
@ -44,6 +44,7 @@
|
||||||
- [Orry Verducci](https://github.com/orryverducci)
|
- [Orry Verducci](https://github.com/orryverducci)
|
||||||
- [Camc314](https://github.com/camc314)
|
- [Camc314](https://github.com/camc314)
|
||||||
- [danieladov](https://github.com/danieladov)
|
- [danieladov](https://github.com/danieladov)
|
||||||
|
- [Stephane Senart](https://github.com/ssenart)
|
||||||
|
|
||||||
# Emby Contributors
|
# Emby Contributors
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,7 @@ Jellyfin Web is the frontend used for most of the clients available for end user
|
||||||
### Dependencies
|
### Dependencies
|
||||||
|
|
||||||
- [Node.js](https://nodejs.org/en/download)
|
- [Node.js](https://nodejs.org/en/download)
|
||||||
- [Yarn 1.22.5](https://classic.yarnpkg.com/en/docs/install)
|
- npm (included in Node.js)
|
||||||
|
|
||||||
### Getting Started
|
### Getting Started
|
||||||
|
|
||||||
|
@ -56,17 +56,17 @@ Jellyfin Web is the frontend used for most of the clients available for end user
|
||||||
2. Install build dependencies in the project directory.
|
2. Install build dependencies in the project directory.
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
yarn install
|
npm install
|
||||||
```
|
```
|
||||||
|
|
||||||
3. Run the web client with webpack for local development.
|
3. Run the web client with webpack for local development.
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
yarn serve
|
npm start
|
||||||
```
|
```
|
||||||
|
|
||||||
4. Build the client with sourcemaps available.
|
4. Build the client with sourcemaps available.
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
yarn build:development
|
npm run build:development
|
||||||
```
|
```
|
||||||
|
|
2
debian/rules
vendored
2
debian/rules
vendored
|
@ -11,7 +11,7 @@ override_dh_auto_test:
|
||||||
override_dh_clistrip:
|
override_dh_clistrip:
|
||||||
|
|
||||||
override_dh_auto_build:
|
override_dh_auto_build:
|
||||||
npx yarn install
|
npm ci --no-audit --unsafe-perm
|
||||||
mv $(CURDIR)/dist $(CURDIR)/web
|
mv $(CURDIR)/dist $(CURDIR)/web
|
||||||
|
|
||||||
override_dh_auto_clean:
|
override_dh_auto_clean:
|
||||||
|
|
|
@ -12,12 +12,9 @@ ENV IS_DOCKER=YES
|
||||||
# Prepare CentOS environment
|
# Prepare CentOS environment
|
||||||
RUN yum update -y \
|
RUN yum update -y \
|
||||||
&& yum install -y epel-release \
|
&& yum install -y epel-release \
|
||||||
&& yum install -y @buildsys-build rpmdevtools git yum-plugins-core nodejs-yarn autoconf automake glibc-devel
|
&& yum install -y @buildsys-build rpmdevtools git yum-plugins-core autoconf automake glibc-devel gcc-c++ make \
|
||||||
|
&& curl -fsSL https://rpm.nodesource.com/setup_12.x | bash - \
|
||||||
# Install recent NodeJS and Yarn
|
&& yum install -y nodejs
|
||||||
RUN curl -fSsLo /etc/yum.repos.d/yarn.repo https://dl.yarnpkg.com/rpm/yarn.repo \
|
|
||||||
&& rpm -i https://rpm.nodesource.com/pub_10.x/el/7/x86_64/nodesource-release-el7-1.noarch.rpm \
|
|
||||||
&& yum install -y yarn
|
|
||||||
|
|
||||||
# Link to build script
|
# Link to build script
|
||||||
RUN ln -sf ${SOURCE_DIR}/deployment/build.centos /build.sh
|
RUN ln -sf ${SOURCE_DIR}/deployment/build.centos /build.sh
|
||||||
|
|
|
@ -12,10 +12,10 @@ ENV IS_DOCKER=YES
|
||||||
|
|
||||||
# Prepare Debian build environment
|
# Prepare Debian build environment
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
&& apt-get install -y debhelper mmv npm git
|
&& apt-get install -y debhelper mmv git curl \
|
||||||
|
&& curl -fsSL https://deb.nodesource.com/setup_12.x | bash - \
|
||||||
|
&& apt-get install -y nodejs
|
||||||
|
|
||||||
# Prepare Yarn
|
|
||||||
RUN npm install -g yarn
|
|
||||||
|
|
||||||
# Link to build script
|
# Link to build script
|
||||||
RUN ln -sf ${SOURCE_DIR}/deployment/build.debian /build.sh
|
RUN ln -sf ${SOURCE_DIR}/deployment/build.debian /build.sh
|
||||||
|
|
|
@ -8,4 +8,4 @@ RUN apk add autoconf g++ make libpng-dev gifsicle alpine-sdk automake libtool ma
|
||||||
WORKDIR ${SOURCE_DIR}
|
WORKDIR ${SOURCE_DIR}
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
RUN yarn install && mv dist ${ARTIFACT_DIR}
|
RUN npm ci --no-audit --unsafe-perm && mv dist ${ARTIFACT_DIR}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
FROM fedora:31
|
FROM fedora:33
|
||||||
|
|
||||||
# Docker build arguments
|
# Docker build arguments
|
||||||
ARG SOURCE_DIR=/jellyfin
|
ARG SOURCE_DIR=/jellyfin
|
||||||
|
@ -11,7 +11,7 @@ ENV IS_DOCKER=YES
|
||||||
|
|
||||||
# Prepare Fedora environment
|
# Prepare Fedora environment
|
||||||
RUN dnf update -y \
|
RUN dnf update -y \
|
||||||
&& dnf install -y @buildsys-build rpmdevtools git dnf-plugins-core nodejs-yarn autoconf automake glibc-devel
|
&& dnf install -y @buildsys-build rpmdevtools git dnf-plugins-core nodejs autoconf automake glibc-devel
|
||||||
|
|
||||||
# Link to build script
|
# Link to build script
|
||||||
RUN ln -sf ${SOURCE_DIR}/deployment/build.fedora /build.sh
|
RUN ln -sf ${SOURCE_DIR}/deployment/build.fedora /build.sh
|
||||||
|
|
|
@ -11,10 +11,9 @@ ENV IS_DOCKER=YES
|
||||||
|
|
||||||
# Prepare Debian build environment
|
# Prepare Debian build environment
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
&& apt-get install -y mmv npm git
|
&& apt-get install -y mmv curl git \
|
||||||
|
&& curl -fsSL https://deb.nodesource.com/setup_12.x | bash - \
|
||||||
# Prepare Yarn
|
&& apt-get install -y nodejs
|
||||||
RUN npm install -g yarn
|
|
||||||
|
|
||||||
# Link to build script
|
# Link to build script
|
||||||
RUN ln -sf ${SOURCE_DIR}/deployment/build.portable /build.sh
|
RUN ln -sf ${SOURCE_DIR}/deployment/build.portable /build.sh
|
||||||
|
|
|
@ -6,7 +6,7 @@ set -o xtrace
|
||||||
# move to source directory
|
# move to source directory
|
||||||
pushd ${SOURCE_DIR}
|
pushd ${SOURCE_DIR}
|
||||||
|
|
||||||
cp -a yarn.lock /tmp/yarn.lock
|
cp -a package-lock.json /tmp/package-lock.json
|
||||||
|
|
||||||
# modify changelog to unstable configuration if IS_UNSTABLE
|
# modify changelog to unstable configuration if IS_UNSTABLE
|
||||||
if [[ ${IS_UNSTABLE} == 'yes' ]]; then
|
if [[ ${IS_UNSTABLE} == 'yes' ]]; then
|
||||||
|
@ -36,6 +36,6 @@ if [[ ${IS_DOCKER} == YES ]]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rm -f fedora/jellyfin*.tar.gz
|
rm -f fedora/jellyfin*.tar.gz
|
||||||
cp -a /tmp/yarn.lock yarn.lock
|
cp -a /tmp/package-lock.json package-lock.json
|
||||||
|
|
||||||
popd
|
popd
|
||||||
|
|
|
@ -6,7 +6,7 @@ set -o xtrace
|
||||||
# move to source directory
|
# move to source directory
|
||||||
pushd ${SOURCE_DIR}
|
pushd ${SOURCE_DIR}
|
||||||
|
|
||||||
cp -a yarn.lock /tmp/yarn.lock
|
cp -a package-lock.json /tmp/package-lock.json
|
||||||
|
|
||||||
# modify changelog to unstable configuration if IS_UNSTABLE
|
# modify changelog to unstable configuration if IS_UNSTABLE
|
||||||
if [[ ${IS_UNSTABLE} == 'yes' ]]; then
|
if [[ ${IS_UNSTABLE} == 'yes' ]]; then
|
||||||
|
@ -30,7 +30,7 @@ dpkg-buildpackage -us -uc --pre-clean --post-clean
|
||||||
mkdir -p ${ARTIFACT_DIR}
|
mkdir -p ${ARTIFACT_DIR}
|
||||||
mv ../jellyfin*.{deb,dsc,tar.gz,buildinfo,changes} ${ARTIFACT_DIR}
|
mv ../jellyfin*.{deb,dsc,tar.gz,buildinfo,changes} ${ARTIFACT_DIR}
|
||||||
|
|
||||||
cp -a /tmp/yarn.lock yarn.lock
|
cp -a /tmp/package-lock.json package-lock.json
|
||||||
|
|
||||||
if [[ ${IS_DOCKER} == YES ]]; then
|
if [[ ${IS_DOCKER} == YES ]]; then
|
||||||
chown -Rc $(stat -c %u:%g ${ARTIFACT_DIR}) ${ARTIFACT_DIR}
|
chown -Rc $(stat -c %u:%g ${ARTIFACT_DIR}) ${ARTIFACT_DIR}
|
||||||
|
|
|
@ -6,7 +6,7 @@ set -o xtrace
|
||||||
# move to source directory
|
# move to source directory
|
||||||
pushd ${SOURCE_DIR}
|
pushd ${SOURCE_DIR}
|
||||||
|
|
||||||
cp -a yarn.lock /tmp/yarn.lock
|
cp -a package-lock.json /tmp/package-lock.json
|
||||||
|
|
||||||
# modify changelog to unstable configuration if IS_UNSTABLE
|
# modify changelog to unstable configuration if IS_UNSTABLE
|
||||||
if [[ ${IS_UNSTABLE} == 'yes' ]]; then
|
if [[ ${IS_UNSTABLE} == 'yes' ]]; then
|
||||||
|
@ -36,6 +36,6 @@ if [[ ${IS_DOCKER} == YES ]]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rm -f fedora/jellyfin*.tar.gz
|
rm -f fedora/jellyfin*.tar.gz
|
||||||
cp -a /tmp/yarn.lock yarn.lock
|
cp -a /tmp/package-lock.json package-lock.json
|
||||||
|
|
||||||
popd
|
popd
|
||||||
|
|
|
@ -14,7 +14,7 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# build archives
|
# build archives
|
||||||
npx yarn install
|
npm ci --no-audit --unsafe-perm
|
||||||
mv dist jellyfin-web_${version}
|
mv dist jellyfin-web_${version}
|
||||||
tar -czf jellyfin-web_${version}_portable.tar.gz jellyfin-web_${version}
|
tar -czf jellyfin-web_${version}_portable.tar.gz jellyfin-web_${version}
|
||||||
rm -rf dist
|
rm -rf dist
|
||||||
|
|
|
@ -9,14 +9,6 @@ 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
|
Source0: jellyfin-web-%{version}.tar.gz
|
||||||
|
|
||||||
%if 0%{?centos}
|
|
||||||
BuildRequires: yarn
|
|
||||||
%else
|
|
||||||
BuildRequires: nodejs-yarn
|
|
||||||
%endif
|
|
||||||
# sadly the yarn RPM at https://dl.yarnpkg.com/rpm/ uses git but doesn't Requires: it
|
|
||||||
# ditto for Fedora's yarn RPM
|
|
||||||
BuildRequires: git
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
%if 0%{?fedora} >= 33
|
%if 0%{?fedora} >= 33
|
||||||
BuildRequires: nodejs
|
BuildRequires: nodejs
|
||||||
|
@ -35,7 +27,8 @@ Jellyfin is a free software media system that puts you in control of managing an
|
||||||
%build
|
%build
|
||||||
|
|
||||||
%install
|
%install
|
||||||
yarn install
|
chown root:root -R .
|
||||||
|
npm ci --no-audit --unsafe-perm
|
||||||
%{__mkdir} -p %{buildroot}%{_datadir}
|
%{__mkdir} -p %{buildroot}%{_datadir}
|
||||||
mv dist %{buildroot}%{_datadir}/jellyfin-web
|
mv dist %{buildroot}%{_datadir}/jellyfin-web
|
||||||
%{__install} -D -m 0644 LICENSE %{buildroot}%{_datadir}/licenses/jellyfin/LICENSE
|
%{__install} -D -m 0644 LICENSE %{buildroot}%{_datadir}/licenses/jellyfin/LICENSE
|
||||||
|
|
14135
package-lock.json
generated
Normal file
14135
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load diff
19
package.json
19
package.json
|
@ -18,7 +18,7 @@
|
||||||
"babel-plugin-dynamic-import-polyfill": "^1.0.0",
|
"babel-plugin-dynamic-import-polyfill": "^1.0.0",
|
||||||
"clean-webpack-plugin": "^3.0.0",
|
"clean-webpack-plugin": "^3.0.0",
|
||||||
"confusing-browser-globals": "^1.0.10",
|
"confusing-browser-globals": "^1.0.10",
|
||||||
"copy-webpack-plugin": "^7.0.0",
|
"copy-webpack-plugin": "^8.1.0",
|
||||||
"css-loader": "^5.1.0",
|
"css-loader": "^5.1.0",
|
||||||
"cssnano": "^4.1.10",
|
"cssnano": "^4.1.10",
|
||||||
"eslint": "^7.21.0",
|
"eslint": "^7.21.0",
|
||||||
|
@ -29,7 +29,7 @@
|
||||||
"expose-loader": "^2.0.0",
|
"expose-loader": "^2.0.0",
|
||||||
"file-loader": "^6.2.0",
|
"file-loader": "^6.2.0",
|
||||||
"html-loader": "^1.1.0",
|
"html-loader": "^1.1.0",
|
||||||
"html-webpack-plugin": "^5.2.0",
|
"html-webpack-plugin": "^5.3.1",
|
||||||
"postcss-loader": "^3.0.0",
|
"postcss-loader": "^3.0.0",
|
||||||
"postcss-preset-env": "^6.7.0",
|
"postcss-preset-env": "^6.7.0",
|
||||||
"sass": "^1.32.8",
|
"sass": "^1.32.8",
|
||||||
|
@ -42,7 +42,7 @@
|
||||||
"stylelint-order": "^4.1.0",
|
"stylelint-order": "^4.1.0",
|
||||||
"stylelint-scss": "^3.19.0",
|
"stylelint-scss": "^3.19.0",
|
||||||
"webpack": "^5.24.2",
|
"webpack": "^5.24.2",
|
||||||
"webpack-cli": "^4.5.0",
|
"webpack-cli": "^4.6.0",
|
||||||
"webpack-dev-server": "^3.11.2",
|
"webpack-dev-server": "^3.11.2",
|
||||||
"webpack-merge": "^4.2.2",
|
"webpack-merge": "^4.2.2",
|
||||||
"workbox-webpack-plugin": "^6.1.1",
|
"workbox-webpack-plugin": "^6.1.1",
|
||||||
|
@ -52,7 +52,7 @@
|
||||||
"@fontsource/noto-sans": "^4.2.1",
|
"@fontsource/noto-sans": "^4.2.1",
|
||||||
"@fontsource/noto-sans-hk": "^4.2.1",
|
"@fontsource/noto-sans-hk": "^4.2.1",
|
||||||
"@fontsource/noto-sans-jp": "^4.2.1",
|
"@fontsource/noto-sans-jp": "^4.2.1",
|
||||||
"@fontsource/noto-sans-kr": "^4.2.1",
|
"@fontsource/noto-sans-kr": "^4.2.2",
|
||||||
"@fontsource/noto-sans-sc": "^4.2.1",
|
"@fontsource/noto-sans-sc": "^4.2.1",
|
||||||
"blurhash": "^1.1.3",
|
"blurhash": "^1.1.3",
|
||||||
"classlist.js": "https://github.com/eligrey/classList.js/archive/1.2.20180112.tar.gz",
|
"classlist.js": "https://github.com/eligrey/classList.js/archive/1.2.20180112.tar.gz",
|
||||||
|
@ -64,7 +64,7 @@
|
||||||
"headroom.js": "^0.12.0",
|
"headroom.js": "^0.12.0",
|
||||||
"hls.js": "^0.14.17",
|
"hls.js": "^0.14.17",
|
||||||
"intersection-observer": "^0.12.0",
|
"intersection-observer": "^0.12.0",
|
||||||
"jellyfin-apiclient": "^1.6.0",
|
"jellyfin-apiclient": "^1.7.0",
|
||||||
"jquery": "^3.5.1",
|
"jquery": "^3.5.1",
|
||||||
"jstree": "^3.3.11",
|
"jstree": "^3.3.11",
|
||||||
"libarchive.js": "^1.3.0",
|
"libarchive.js": "^1.3.0",
|
||||||
|
@ -76,7 +76,7 @@
|
||||||
"resize-observer-polyfill": "^1.5.1",
|
"resize-observer-polyfill": "^1.5.1",
|
||||||
"screenfull": "^5.1.0",
|
"screenfull": "^5.1.0",
|
||||||
"sortablejs": "^1.13.0",
|
"sortablejs": "^1.13.0",
|
||||||
"swiper": "^6.4.15",
|
"swiper": "^6.5.0",
|
||||||
"webcomponents.js": "^0.7.24",
|
"webcomponents.js": "^0.7.24",
|
||||||
"whatwg-fetch": "^3.6.2",
|
"whatwg-fetch": "^3.6.2",
|
||||||
"workbox-core": "^5.1.4",
|
"workbox-core": "^5.1.4",
|
||||||
|
@ -99,14 +99,17 @@
|
||||||
"Firefox ESR"
|
"Firefox ESR"
|
||||||
],
|
],
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "yarn serve",
|
"start": "npm run serve",
|
||||||
"serve": "webpack serve --config webpack.dev.js",
|
"serve": "webpack serve --config webpack.dev.js",
|
||||||
"prepare": "node ./scripts/prepare.js",
|
"prepare": "node ./scripts/prepare.js",
|
||||||
"build:development": "webpack --config webpack.dev.js",
|
"build:development": "webpack --config webpack.dev.js",
|
||||||
"build:production": "webpack --config webpack.prod.js",
|
"build:production": "webpack --config webpack.prod.js",
|
||||||
"lint": "eslint \"src/\"",
|
"lint": "eslint \"src/\"",
|
||||||
"stylelint": "yarn stylelint:css && yarn stylelint:scss",
|
"stylelint": "npm run stylelint:css && npm run stylelint:scss",
|
||||||
"stylelint:css": "stylelint \"src/**/*.css\"",
|
"stylelint:css": "stylelint \"src/**/*.css\"",
|
||||||
"stylelint:scss": "stylelint --config=\".stylelintrc.scss.json\" \"src/**/*.scss\""
|
"stylelint:scss": "stylelint --config=\".stylelintrc.scss.json\" \"src/**/*.scss\""
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"yarn": "YARN NO LONGER USED - use npm instead."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,7 +54,7 @@ import alert from './alert';
|
||||||
return html;
|
return html;
|
||||||
}
|
}
|
||||||
|
|
||||||
function renderList(elem, apiClient, result, startIndex, limit) {
|
function renderList(elem, apiClient, result) {
|
||||||
elem.innerHTML = result.Items.map(function (i) {
|
elem.innerHTML = result.Items.map(function (i) {
|
||||||
return getEntryHtml(i, apiClient);
|
return getEntryHtml(i, apiClient);
|
||||||
}).join('');
|
}).join('');
|
||||||
|
@ -97,11 +97,11 @@ import alert from './alert';
|
||||||
}
|
}
|
||||||
|
|
||||||
instance.items = result.Items;
|
instance.items = result.Items;
|
||||||
renderList(elem, apiClient, result, startIndex, limit);
|
renderList(elem, apiClient, result);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function onActivityLogUpdate(e, apiClient, data) {
|
function onActivityLogUpdate(e, apiClient) {
|
||||||
const options = this.options;
|
const options = this.options;
|
||||||
|
|
||||||
if (options && options.serverId === apiClient.serverId()) {
|
if (options && options.serverId === apiClient.serverId()) {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import './appFooter.scss';
|
import './appFooter.scss';
|
||||||
|
|
||||||
function render(options) {
|
function render() {
|
||||||
const elem = document.createElement('div');
|
const elem = document.createElement('div');
|
||||||
elem.classList.add('appfooter');
|
elem.classList.add('appfooter');
|
||||||
|
|
||||||
|
@ -10,10 +10,10 @@ function render(options) {
|
||||||
}
|
}
|
||||||
|
|
||||||
class appFooter {
|
class appFooter {
|
||||||
constructor(options) {
|
constructor() {
|
||||||
const self = this;
|
const self = this;
|
||||||
|
|
||||||
self.element = render(options);
|
self.element = render();
|
||||||
self.add = function (elem) {
|
self.add = function (elem) {
|
||||||
self.element.appendChild(elem);
|
self.element.appendChild(elem);
|
||||||
};
|
};
|
||||||
|
@ -33,4 +33,4 @@ class appFooter {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default new appFooter({});
|
export default new appFooter();
|
||||||
|
|
|
@ -427,12 +427,12 @@ class AppRouter {
|
||||||
|
|
||||||
if (data.status === 403) {
|
if (data.status === 403) {
|
||||||
if (data.errorCode === 'ParentalControl') {
|
if (data.errorCode === 'ParentalControl') {
|
||||||
const isCurrentAllowed = this.currentRouteInfo ? (this.currentRouteInfo.route.anonymous || this.currentRouteInfo.route.startup) : true;
|
const isCurrentAllowed = appRouter.currentRouteInfo ? (appRouter.currentRouteInfo.route.anonymous || appRouter.currentRouteInfo.route.startup) : true;
|
||||||
|
|
||||||
// Bounce to the login screen, but not if a password entry fails, obviously
|
// Bounce to the login screen, but not if a password entry fails, obviously
|
||||||
if (!isCurrentAllowed) {
|
if (!isCurrentAllowed) {
|
||||||
this.showForcedLogoutMessage(globalize.translate('AccessRestrictedTryAgainLater'));
|
appRouter.showForcedLogoutMessage(globalize.translate('AccessRestrictedTryAgainLater'));
|
||||||
this.showLocalLogin(apiClient.serverId());
|
appRouter.showLocalLogin(apiClient.serverId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -446,7 +446,7 @@ class AppRouter {
|
||||||
|
|
||||||
normalizeImageOptions(options) {
|
normalizeImageOptions(options) {
|
||||||
let setQuality;
|
let setQuality;
|
||||||
if (options.maxWidth || options.width || options.maxHeight || options.height) {
|
if (options.maxWidth || options.width || options.maxHeight || options.height || options.fillWidth || options.fillHeight) {
|
||||||
setQuality = true;
|
setQuality = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@ import ServerConnections from '../ServerConnections';
|
||||||
|
|
||||||
/* eslint-disable indent */
|
/* eslint-disable indent */
|
||||||
|
|
||||||
function enableAnimation(elem) {
|
function enableAnimation() {
|
||||||
if (browser.slow) {
|
if (browser.slow) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -47,7 +47,7 @@ import ServerConnections from '../ServerConnections';
|
||||||
backdropImage.classList.add('backdropImageFadeIn');
|
backdropImage.classList.add('backdropImageFadeIn');
|
||||||
parent.appendChild(backdropImage);
|
parent.appendChild(backdropImage);
|
||||||
|
|
||||||
if (!enableAnimation(backdropImage)) {
|
if (!enableAnimation()) {
|
||||||
if (existingBackdropImage && existingBackdropImage.parentNode) {
|
if (existingBackdropImage && existingBackdropImage.parentNode) {
|
||||||
existingBackdropImage.parentNode.removeChild(existingBackdropImage);
|
existingBackdropImage.parentNode.removeChild(existingBackdropImage);
|
||||||
}
|
}
|
||||||
|
|
|
@ -498,7 +498,7 @@ import ServerConnections from '../ServerConnections';
|
||||||
let imgUrl = null;
|
let imgUrl = null;
|
||||||
let imgTag = null;
|
let imgTag = null;
|
||||||
let coverImage = false;
|
let coverImage = false;
|
||||||
let uiAspect = null;
|
const uiAspect = getDesiredAspect(shape);
|
||||||
let imgType = null;
|
let imgType = null;
|
||||||
let itemId = null;
|
let itemId = null;
|
||||||
|
|
||||||
|
@ -543,11 +543,8 @@ import ServerConnections from '../ServerConnections';
|
||||||
forceName = true;
|
forceName = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (primaryImageAspectRatio) {
|
if (primaryImageAspectRatio && uiAspect) {
|
||||||
uiAspect = getDesiredAspect(shape);
|
coverImage = (Math.abs(primaryImageAspectRatio - uiAspect) / uiAspect) <= 0.2;
|
||||||
if (uiAspect) {
|
|
||||||
coverImage = (Math.abs(primaryImageAspectRatio - uiAspect) / uiAspect) <= 0.2;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} else if (item.SeriesPrimaryImageTag) {
|
} else if (item.SeriesPrimaryImageTag) {
|
||||||
imgType = 'Primary';
|
imgType = 'Primary';
|
||||||
|
@ -563,11 +560,8 @@ import ServerConnections from '../ServerConnections';
|
||||||
forceName = true;
|
forceName = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (primaryImageAspectRatio) {
|
if (primaryImageAspectRatio && uiAspect) {
|
||||||
uiAspect = getDesiredAspect(shape);
|
coverImage = (Math.abs(primaryImageAspectRatio - uiAspect) / uiAspect) <= 0.2;
|
||||||
if (uiAspect) {
|
|
||||||
coverImage = (Math.abs(primaryImageAspectRatio - uiAspect) / uiAspect) <= 0.2;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} else if (item.ParentPrimaryImageTag) {
|
} else if (item.ParentPrimaryImageTag) {
|
||||||
imgType = 'Primary';
|
imgType = 'Primary';
|
||||||
|
@ -579,11 +573,8 @@ import ServerConnections from '../ServerConnections';
|
||||||
itemId = item.AlbumId;
|
itemId = item.AlbumId;
|
||||||
height = width && primaryImageAspectRatio ? Math.round(width / primaryImageAspectRatio) : null;
|
height = width && primaryImageAspectRatio ? Math.round(width / primaryImageAspectRatio) : null;
|
||||||
|
|
||||||
if (primaryImageAspectRatio) {
|
if (primaryImageAspectRatio && uiAspect) {
|
||||||
uiAspect = getDesiredAspect(shape);
|
coverImage = (Math.abs(primaryImageAspectRatio - uiAspect) / uiAspect) <= 0.2;
|
||||||
if (uiAspect) {
|
|
||||||
coverImage = (Math.abs(primaryImageAspectRatio - uiAspect) / uiAspect) <= 0.2;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} else if (item.Type === 'Season' && item.ImageTags && item.ImageTags.Thumb) {
|
} else if (item.Type === 'Season' && item.ImageTags && item.ImageTags.Thumb) {
|
||||||
imgType = 'Thumb';
|
imgType = 'Thumb';
|
||||||
|
@ -613,10 +604,15 @@ import ServerConnections from '../ServerConnections';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (imgTag && imgType) {
|
if (imgTag && imgType) {
|
||||||
|
// TODO: This place is a mess. Could do with a good spring cleaning.
|
||||||
|
if (!height && width && uiAspect) {
|
||||||
|
height = width / uiAspect;
|
||||||
|
}
|
||||||
imgUrl = apiClient.getScaledImageUrl(itemId, {
|
imgUrl = apiClient.getScaledImageUrl(itemId, {
|
||||||
type: imgType,
|
type: imgType,
|
||||||
maxHeight: height,
|
fillHeight: height,
|
||||||
maxWidth: width,
|
fillWidth: width,
|
||||||
|
quality: 96,
|
||||||
tag: imgTag
|
tag: imgTag
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,7 +48,7 @@ import '../../assets/css/scrollstyles.scss';
|
||||||
const activeElement = document.activeElement;
|
const activeElement = document.activeElement;
|
||||||
let removeScrollLockOnClose = false;
|
let removeScrollLockOnClose = false;
|
||||||
|
|
||||||
function onHashChange(e) {
|
function onHashChange() {
|
||||||
const isBack = self.originalUrl === window.location.href;
|
const isBack = self.originalUrl === window.location.href;
|
||||||
|
|
||||||
if (isBack || !isOpened(dlg)) {
|
if (isBack || !isOpened(dlg)) {
|
||||||
|
@ -200,7 +200,7 @@ import '../../assets/css/scrollstyles.scss';
|
||||||
dlg.dialogContainer = dialogContainer;
|
dlg.dialogContainer = dialogContainer;
|
||||||
document.body.appendChild(dialogContainer);
|
document.body.appendChild(dialogContainer);
|
||||||
|
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve) => {
|
||||||
new DialogHashHandler(dlg, `dlg${new Date().getTime()}`, resolve);
|
new DialogHashHandler(dlg, `dlg${new Date().getTime()}`, resolve);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -210,7 +210,7 @@ function loadDynamicFilters(context, options) {
|
||||||
}
|
}
|
||||||
class FilterMenu {
|
class FilterMenu {
|
||||||
show(options) {
|
show(options) {
|
||||||
return new Promise( (resolve, reject) => {
|
return new Promise( (resolve) => {
|
||||||
const dialogOptions = {
|
const dialogOptions = {
|
||||||
removeOnClose: true,
|
removeOnClose: true,
|
||||||
scrollY: false
|
scrollY: false
|
||||||
|
|
|
@ -8,7 +8,7 @@ import scrollManager from './scrollManager';
|
||||||
scopes.push(elem);
|
scopes.push(elem);
|
||||||
}
|
}
|
||||||
|
|
||||||
function popScope(elem) {
|
function popScope() {
|
||||||
if (scopes.length) {
|
if (scopes.length) {
|
||||||
scopes.length -= 1;
|
scopes.length -= 1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1057,7 +1057,7 @@ function Guide(options) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function onSeriesTimerCreated(e, apiClient, data) {
|
function onSeriesTimerCreated() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function onTimerCancelled(e, apiClient, data) {
|
function onTimerCancelled(e, apiClient, data) {
|
||||||
|
@ -1116,7 +1116,7 @@ function Guide(options) {
|
||||||
programGrid.classList.add('noRubberBanding');
|
programGrid.classList.add('noRubberBanding');
|
||||||
}
|
}
|
||||||
|
|
||||||
dom.addEventListener(programGrid, 'scroll', function (e) {
|
dom.addEventListener(programGrid, 'scroll', function () {
|
||||||
onProgramGridScroll(guideContext, this, timeslotHeaders);
|
onProgramGridScroll(guideContext, this, timeslotHeaders);
|
||||||
}, {
|
}, {
|
||||||
passive: true
|
passive: true
|
||||||
|
|
|
@ -219,7 +219,7 @@ import template from './homeScreenSettings.template.html';
|
||||||
context.querySelector('.selectTVHomeScreen').value = userSettings.get('tvhome') || '';
|
context.querySelector('.selectTVHomeScreen').value = userSettings.get('tvhome') || '';
|
||||||
}
|
}
|
||||||
|
|
||||||
function getPerLibrarySettingsHtml(item, user, userSettings, apiClient) {
|
function getPerLibrarySettingsHtml(item, user, userSettings) {
|
||||||
let html = '';
|
let html = '';
|
||||||
|
|
||||||
let isChecked;
|
let isChecked;
|
||||||
|
@ -275,12 +275,12 @@ import template from './homeScreenSettings.template.html';
|
||||||
return html;
|
return html;
|
||||||
}
|
}
|
||||||
|
|
||||||
function renderPerLibrarySettings(context, user, userViews, userSettings, apiClient) {
|
function renderPerLibrarySettings(context, user, userViews) {
|
||||||
const elem = context.querySelector('.perLibrarySettings');
|
const elem = context.querySelector('.perLibrarySettings');
|
||||||
let html = '';
|
let html = '';
|
||||||
|
|
||||||
for (let i = 0, length = userViews.length; i < length; i++) {
|
for (let i = 0, length = userViews.length; i < length; i++) {
|
||||||
html += getPerLibrarySettingsHtml(userViews[i], user, userSettings, apiClient);
|
html += getPerLibrarySettingsHtml(userViews[i], user);
|
||||||
}
|
}
|
||||||
|
|
||||||
elem.innerHTML = html;
|
elem.innerHTML = html;
|
||||||
|
@ -297,7 +297,7 @@ import template from './homeScreenSettings.template.html';
|
||||||
Promise.all([promise1, promise2]).then(responses => {
|
Promise.all([promise1, promise2]).then(responses => {
|
||||||
renderViewOrder(context, user, responses[0]);
|
renderViewOrder(context, user, responses[0]);
|
||||||
|
|
||||||
renderPerLibrarySettings(context, user, responses[0].Items, userSettings, apiClient);
|
renderPerLibrarySettings(context, user, responses[0].Items);
|
||||||
|
|
||||||
renderViews(context, user, responses[1]);
|
renderViews(context, user, responses[1]);
|
||||||
|
|
||||||
|
|
|
@ -133,24 +133,22 @@ import ServerConnections from '../ServerConnections';
|
||||||
|
|
||||||
function loadSection(page, apiClient, user, userSettings, userViews, allSections, index) {
|
function loadSection(page, apiClient, user, userSettings, userViews, allSections, index) {
|
||||||
const section = allSections[index];
|
const section = allSections[index];
|
||||||
const userId = user.Id;
|
|
||||||
|
|
||||||
const elem = page.querySelector('.section' + index);
|
const elem = page.querySelector('.section' + index);
|
||||||
|
|
||||||
if (section === 'latestmedia') {
|
if (section === 'latestmedia') {
|
||||||
loadRecentlyAdded(elem, apiClient, user, userViews);
|
loadRecentlyAdded(elem, apiClient, user, userViews);
|
||||||
} else if (section === 'librarytiles' || section === 'smalllibrarytiles' || section === 'smalllibrarytiles-automobile' || section === 'librarytiles-automobile') {
|
} else if (section === 'librarytiles' || section === 'smalllibrarytiles' || section === 'smalllibrarytiles-automobile' || section === 'librarytiles-automobile') {
|
||||||
loadLibraryTiles(elem, apiClient, user, userSettings, 'smallBackdrop', userViews, allSections);
|
loadLibraryTiles(elem, apiClient, user, userSettings, 'smallBackdrop', userViews);
|
||||||
} else if (section === 'librarybuttons') {
|
} else if (section === 'librarybuttons') {
|
||||||
loadlibraryButtons(elem, apiClient, user, userSettings, userViews);
|
loadlibraryButtons(elem, apiClient, user, userSettings, userViews);
|
||||||
} else if (section === 'resume') {
|
} else if (section === 'resume') {
|
||||||
loadResumeVideo(elem, apiClient, userId);
|
loadResumeVideo(elem, apiClient);
|
||||||
} else if (section === 'resumeaudio') {
|
} else if (section === 'resumeaudio') {
|
||||||
loadResumeAudio(elem, apiClient, userId);
|
loadResumeAudio(elem, apiClient);
|
||||||
} else if (section === 'activerecordings') {
|
} else if (section === 'activerecordings') {
|
||||||
loadLatestLiveTvRecordings(elem, true, apiClient, userId);
|
loadLatestLiveTvRecordings(elem, true, apiClient);
|
||||||
} else if (section === 'nextup') {
|
} else if (section === 'nextup') {
|
||||||
loadNextUp(elem, apiClient, userId);
|
loadNextUp(elem, apiClient);
|
||||||
} else if (section === 'onnow' || section === 'livetv') {
|
} else if (section === 'onnow' || section === 'livetv') {
|
||||||
return loadOnNow(elem, apiClient, user);
|
return loadOnNow(elem, apiClient, user);
|
||||||
} else {
|
} else {
|
||||||
|
@ -335,7 +333,7 @@ import ServerConnections from '../ServerConnections';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export function loadLibraryTiles(elem, apiClient, user, userSettings, shape, userViews, allSections) {
|
export function loadLibraryTiles(elem, apiClient, user, userSettings, shape, userViews) {
|
||||||
let html = '';
|
let html = '';
|
||||||
if (userViews.length) {
|
if (userViews.length) {
|
||||||
html += '<h2 class="sectionTitle sectionTitle-cards padded-left">' + globalize.translate('HeaderMyMedia') + '</h2>';
|
html += '<h2 class="sectionTitle sectionTitle-cards padded-left">' + globalize.translate('HeaderMyMedia') + '</h2>';
|
||||||
|
@ -415,7 +413,7 @@ import ServerConnections from '../ServerConnections';
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function loadResumeVideo(elem, apiClient, userId) {
|
function loadResumeVideo(elem, apiClient) {
|
||||||
let html = '';
|
let html = '';
|
||||||
|
|
||||||
html += '<h2 class="sectionTitle sectionTitle-cards padded-left">' + globalize.translate('HeaderContinueWatching') + '</h2>';
|
html += '<h2 class="sectionTitle sectionTitle-cards padded-left">' + globalize.translate('HeaderContinueWatching') + '</h2>';
|
||||||
|
@ -488,7 +486,7 @@ import ServerConnections from '../ServerConnections';
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function loadResumeAudio(elem, apiClient, userId) {
|
function loadResumeAudio(elem, apiClient) {
|
||||||
let html = '';
|
let html = '';
|
||||||
|
|
||||||
html += '<h2 class="sectionTitle sectionTitle-cards padded-left">' + globalize.translate('HeaderContinueListening') + '</h2>';
|
html += '<h2 class="sectionTitle sectionTitle-cards padded-left">' + globalize.translate('HeaderContinueListening') + '</h2>';
|
||||||
|
@ -665,7 +663,8 @@ import ServerConnections from '../ServerConnections';
|
||||||
UserId: apiClient.getCurrentUserId(),
|
UserId: apiClient.getCurrentUserId(),
|
||||||
ImageTypeLimit: 1,
|
ImageTypeLimit: 1,
|
||||||
EnableImageTypes: 'Primary,Backdrop,Banner,Thumb',
|
EnableImageTypes: 'Primary,Backdrop,Banner,Thumb',
|
||||||
EnableTotalRecordCount: false
|
EnableTotalRecordCount: false,
|
||||||
|
DisableFirstEpisode: true
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -688,7 +687,7 @@ import ServerConnections from '../ServerConnections';
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function loadNextUp(elem, apiClient, userId) {
|
function loadNextUp(elem, apiClient) {
|
||||||
let html = '';
|
let html = '';
|
||||||
|
|
||||||
html += '<div class="sectionTitleContainer sectionTitleContainer-cards padded-left">';
|
html += '<div class="sectionTitleContainer sectionTitleContainer-cards padded-left">';
|
||||||
|
@ -766,7 +765,7 @@ import ServerConnections from '../ServerConnections';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
function loadLatestLiveTvRecordings(elem, activeRecordingsOnly, apiClient, userId) {
|
function loadLatestLiveTvRecordings(elem, activeRecordingsOnly, apiClient) {
|
||||||
const title = activeRecordingsOnly ?
|
const title = activeRecordingsOnly ?
|
||||||
globalize.translate('HeaderActiveRecordings') :
|
globalize.translate('HeaderActiveRecordings') :
|
||||||
globalize.translate('HeaderLatestRecordings');
|
globalize.translate('HeaderLatestRecordings');
|
||||||
|
|
|
@ -359,7 +359,7 @@ import toast from './toast/toast';
|
||||||
itemId: itemId,
|
itemId: itemId,
|
||||||
serverId: serverId,
|
serverId: serverId,
|
||||||
title: item.Name,
|
title: item.Name,
|
||||||
filename: item.Path.replace(/^.*[\\\/]/, '')
|
filename: item.Path.replace(/^.*[\\/]/, '')
|
||||||
}]);
|
}]);
|
||||||
getResolveFunction(getResolveFunction(resolve, id), id)();
|
getResolveFunction(getResolveFunction(resolve, id), id)();
|
||||||
});
|
});
|
||||||
|
|
|
@ -2,7 +2,7 @@ import { playbackManager } from './playback/playbackmanager';
|
||||||
import serverNotifications from '../scripts/serverNotifications';
|
import serverNotifications from '../scripts/serverNotifications';
|
||||||
import { Events } from 'jellyfin-apiclient';
|
import { Events } from 'jellyfin-apiclient';
|
||||||
|
|
||||||
function onUserDataChanged(e, apiClient, userData) {
|
function onUserDataChanged() {
|
||||||
const instance = this;
|
const instance = this;
|
||||||
|
|
||||||
const eventsToMonitor = getEventsToMonitor(instance);
|
const eventsToMonitor = getEventsToMonitor(instance);
|
||||||
|
@ -25,7 +25,7 @@ function getEventsToMonitor(instance) {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
function onTimerCreated(e, apiClient, data) {
|
function onTimerCreated() {
|
||||||
const instance = this;
|
const instance = this;
|
||||||
|
|
||||||
if (getEventsToMonitor(instance).indexOf('timers') !== -1) {
|
if (getEventsToMonitor(instance).indexOf('timers') !== -1) {
|
||||||
|
@ -34,7 +34,7 @@ function onTimerCreated(e, apiClient, data) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function onSeriesTimerCreated(e, apiClient, data) {
|
function onSeriesTimerCreated() {
|
||||||
const instance = this;
|
const instance = this;
|
||||||
if (getEventsToMonitor(instance).indexOf('seriestimers') !== -1) {
|
if (getEventsToMonitor(instance).indexOf('seriestimers') !== -1) {
|
||||||
instance.notifyRefreshNeeded();
|
instance.notifyRefreshNeeded();
|
||||||
|
@ -42,7 +42,7 @@ function onSeriesTimerCreated(e, apiClient, data) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function onTimerCancelled(e, apiClient, data) {
|
function onTimerCancelled() {
|
||||||
const instance = this;
|
const instance = this;
|
||||||
|
|
||||||
if (getEventsToMonitor(instance).indexOf('timers') !== -1) {
|
if (getEventsToMonitor(instance).indexOf('timers') !== -1) {
|
||||||
|
@ -51,7 +51,7 @@ function onTimerCancelled(e, apiClient, data) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function onSeriesTimerCancelled(e, apiClient, data) {
|
function onSeriesTimerCancelled() {
|
||||||
const instance = this;
|
const instance = this;
|
||||||
if (getEventsToMonitor(instance).indexOf('seriestimers') !== -1) {
|
if (getEventsToMonitor(instance).indexOf('seriestimers') !== -1) {
|
||||||
instance.notifyRefreshNeeded();
|
instance.notifyRefreshNeeded();
|
||||||
|
|
|
@ -76,12 +76,13 @@ import ServerConnections from '../ServerConnections';
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
function getImageUrl(item, width) {
|
function getImageUrl(item, size) {
|
||||||
const apiClient = ServerConnections.getApiClient(item.ServerId);
|
const apiClient = ServerConnections.getApiClient(item.ServerId);
|
||||||
let itemId;
|
let itemId;
|
||||||
|
|
||||||
const options = {
|
const options = {
|
||||||
maxWidth: width,
|
fillWidth: size,
|
||||||
|
fillHeight: size,
|
||||||
type: 'Primary'
|
type: 'Primary'
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -105,10 +106,11 @@ import ServerConnections from '../ServerConnections';
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getChannelImageUrl(item, width) {
|
function getChannelImageUrl(item, size) {
|
||||||
const apiClient = ServerConnections.getApiClient(item.ServerId);
|
const apiClient = ServerConnections.getApiClient(item.ServerId);
|
||||||
const options = {
|
const options = {
|
||||||
maxWidth: width,
|
fillWidth: size,
|
||||||
|
fillHeight: size,
|
||||||
type: 'Primary'
|
type: 'Primary'
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -163,10 +165,6 @@ import ServerConnections from '../ServerConnections';
|
||||||
return html;
|
return html;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getId(item) {
|
|
||||||
return item.Id;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function getListViewHtml(options) {
|
export function getListViewHtml(options) {
|
||||||
const items = options.items;
|
const items = options.items;
|
||||||
|
|
||||||
|
@ -183,7 +181,6 @@ import ServerConnections from '../ServerConnections';
|
||||||
let outerHtml = '';
|
let outerHtml = '';
|
||||||
|
|
||||||
const enableContentWrapper = options.enableOverview && !layoutManager.tv;
|
const enableContentWrapper = options.enableOverview && !layoutManager.tv;
|
||||||
const containerAlbumArtistIds = (options.containerAlbumArtists || []).map(getId);
|
|
||||||
|
|
||||||
for (let i = 0, length = items.length; i < length; i++) {
|
for (let i = 0, length = items.length; i < length; i++) {
|
||||||
const item = items[i];
|
const item = items[i];
|
||||||
|
|
|
@ -47,7 +47,7 @@ import '../elements/emby-button/emby-button';
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
function configureSwipeTabs(view, tabsElem, getTabContainersFn) {
|
function configureSwipeTabs(view, tabsElem) {
|
||||||
if (!browser.touch) {
|
if (!browser.touch) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -142,7 +142,7 @@ import '../elements/emby-button/emby-button';
|
||||||
|
|
||||||
tabsElem = tabsContainerElem.querySelector('[is="emby-tabs"]');
|
tabsElem = tabsContainerElem.querySelector('[is="emby-tabs"]');
|
||||||
|
|
||||||
configureSwipeTabs(view, tabsElem, getTabContainersFn);
|
configureSwipeTabs(view, tabsElem);
|
||||||
|
|
||||||
tabsElem.addEventListener('beforetabchange', function (e) {
|
tabsElem.addEventListener('beforetabchange', function (e) {
|
||||||
const tabContainers = getTabContainersFn();
|
const tabContainers = getTabContainersFn();
|
||||||
|
|
|
@ -490,9 +490,7 @@ import '../../elements/emby-button/emby-button';
|
||||||
})[0];
|
})[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getMediaInfoStats(item, options) {
|
export function getMediaInfoStats(item) {
|
||||||
options = options || {};
|
|
||||||
|
|
||||||
const list = [];
|
const list = [];
|
||||||
|
|
||||||
const mediaSource = (item.MediaSources || [])[0] || {};
|
const mediaSource = (item.MediaSources || [])[0] || {};
|
||||||
|
|
|
@ -31,7 +31,7 @@ import template from './metadataEditor.template.html';
|
||||||
return currentContext.classList.contains('dialog');
|
return currentContext.classList.contains('dialog');
|
||||||
}
|
}
|
||||||
|
|
||||||
function closeDialog(isSubmitted) {
|
function closeDialog() {
|
||||||
if (isDialog()) {
|
if (isDialog()) {
|
||||||
dialogHelper.close(currentContext);
|
dialogHelper.close(currentContext);
|
||||||
}
|
}
|
||||||
|
@ -42,7 +42,7 @@ import template from './metadataEditor.template.html';
|
||||||
toast(globalize.translate('MessageItemSaved'));
|
toast(globalize.translate('MessageItemSaved'));
|
||||||
|
|
||||||
loading.hide();
|
loading.hide();
|
||||||
closeDialog(true);
|
closeDialog();
|
||||||
}
|
}
|
||||||
|
|
||||||
const apiClient = getApiClient();
|
const apiClient = getApiClient();
|
||||||
|
@ -298,7 +298,7 @@ import template from './metadataEditor.template.html';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function init(context, apiClient) {
|
function init(context) {
|
||||||
context.querySelector('.externalIds').addEventListener('click', function (e) {
|
context.querySelector('.externalIds').addEventListener('click', function (e) {
|
||||||
const btnOpenExternalId = dom.parentWithClass(e.target, 'btnOpenExternalId');
|
const btnOpenExternalId = dom.parentWithClass(e.target, 'btnOpenExternalId');
|
||||||
if (btnOpenExternalId) {
|
if (btnOpenExternalId) {
|
||||||
|
@ -319,7 +319,7 @@ import template from './metadataEditor.template.html';
|
||||||
|
|
||||||
bindAll(context.querySelectorAll('.btnCancel'), 'click', function (event) {
|
bindAll(context.querySelectorAll('.btnCancel'), 'click', function (event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
closeDialog(false);
|
closeDialog();
|
||||||
});
|
});
|
||||||
|
|
||||||
context.querySelector('.btnMore').addEventListener('click', function (e) {
|
context.querySelector('.btnMore').addEventListener('click', function (e) {
|
||||||
|
@ -328,7 +328,7 @@ import template from './metadataEditor.template.html';
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
context.querySelector('.btnHeaderSave').addEventListener('click', function (e) {
|
context.querySelector('.btnHeaderSave').addEventListener('click', function () {
|
||||||
context.querySelector('.btnSave').click();
|
context.querySelector('.btnSave').click();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -347,7 +347,7 @@ import template from './metadataEditor.template.html';
|
||||||
form.removeEventListener('submit', onSubmit);
|
form.removeEventListener('submit', onSubmit);
|
||||||
form.addEventListener('submit', onSubmit);
|
form.addEventListener('submit', onSubmit);
|
||||||
|
|
||||||
context.querySelector('#btnAddPerson').addEventListener('click', function (event, data) {
|
context.querySelector('#btnAddPerson').addEventListener('click', function () {
|
||||||
editPerson(context, {}, -1);
|
editPerson(context, {}, -1);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -1026,7 +1026,7 @@ import template from './metadataEditor.template.html';
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function show(itemId, serverId, resolve, reject) {
|
function show(itemId, serverId, resolve) {
|
||||||
loading.show();
|
loading.show();
|
||||||
|
|
||||||
const dialogOptions = {
|
const dialogOptions = {
|
||||||
|
@ -1066,20 +1066,20 @@ import template from './metadataEditor.template.html';
|
||||||
|
|
||||||
currentContext = dlg;
|
currentContext = dlg;
|
||||||
|
|
||||||
init(dlg, ServerConnections.getApiClient(serverId));
|
init(dlg);
|
||||||
|
|
||||||
reload(dlg, itemId, serverId);
|
reload(dlg, itemId, serverId);
|
||||||
}
|
}
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
show: function (itemId, serverId) {
|
show: function (itemId, serverId) {
|
||||||
return new Promise(function (resolve, reject) {
|
return new Promise(function (resolve) {
|
||||||
return show(itemId, serverId, resolve, reject);
|
return show(itemId, serverId, resolve);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
embed: function (elem, itemId, serverId) {
|
embed: function (elem, itemId, serverId) {
|
||||||
return new Promise(function (resolve, reject) {
|
return new Promise(function () {
|
||||||
loading.show();
|
loading.show();
|
||||||
|
|
||||||
elem.innerHTML = globalize.translateHtml(template, 'core');
|
elem.innerHTML = globalize.translateHtml(template, 'core');
|
||||||
|
@ -1091,7 +1091,7 @@ import template from './metadataEditor.template.html';
|
||||||
|
|
||||||
currentContext = elem;
|
currentContext = elem;
|
||||||
|
|
||||||
init(elem, ServerConnections.getApiClient(serverId));
|
init(elem);
|
||||||
reload(elem, itemId, serverId);
|
reload(elem, itemId, serverId);
|
||||||
|
|
||||||
focusManager.autoFocus(elem);
|
focusManager.autoFocus(elem);
|
||||||
|
|
|
@ -63,7 +63,7 @@ import template from './personEditor.template.html';
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
dlg.querySelector('.selectPersonType').addEventListener('change', function (e) {
|
dlg.querySelector('.selectPersonType').addEventListener('change', function () {
|
||||||
if (this.value === 'Actor') {
|
if (this.value === 'Actor') {
|
||||||
dlg.querySelector('.fldRole').classList.remove('hide');
|
dlg.querySelector('.fldRole').classList.remove('hide');
|
||||||
} else {
|
} else {
|
||||||
|
@ -71,7 +71,7 @@ import template from './personEditor.template.html';
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
dlg.querySelector('.btnCancel').addEventListener('click', function (e) {
|
dlg.querySelector('.btnCancel').addEventListener('click', function () {
|
||||||
dialogHelper.close(dlg);
|
dialogHelper.close(dlg);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -84,7 +84,7 @@ import confirm from '../confirm/confirm';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function onSelectionChange(e) {
|
function onSelectionChange() {
|
||||||
updateItemSelection(this, this.checked);
|
updateItemSelection(this, this.checked);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -440,13 +440,13 @@ import confirm from '../confirm/confirm';
|
||||||
deltaY = 100;
|
deltaY = 100;
|
||||||
}
|
}
|
||||||
if (deltaX >= 5 || deltaY >= 5) {
|
if (deltaX >= 5 || deltaY >= 5) {
|
||||||
onMouseOut(e);
|
onMouseOut();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function onTouchEnd(e) {
|
function onTouchEnd() {
|
||||||
onMouseOut(e);
|
onMouseOut();
|
||||||
}
|
}
|
||||||
|
|
||||||
function onMouseDown(e) {
|
function onMouseDown(e) {
|
||||||
|
@ -459,7 +459,7 @@ import confirm from '../confirm/confirm';
|
||||||
touchStartTimeout = setTimeout(onTouchStartTimerFired, 550);
|
touchStartTimeout = setTimeout(onTouchStartTimerFired, 550);
|
||||||
}
|
}
|
||||||
|
|
||||||
function onMouseOut(e) {
|
function onMouseOut() {
|
||||||
if (touchStartTimeout) {
|
if (touchStartTimeout) {
|
||||||
clearTimeout(touchStartTimeout);
|
clearTimeout(touchStartTimeout);
|
||||||
touchStartTimeout = null;
|
touchStartTimeout = null;
|
||||||
|
|
|
@ -41,7 +41,7 @@ function resetRegistration() {
|
||||||
|
|
||||||
resetRegistration();
|
resetRegistration();
|
||||||
|
|
||||||
function showPersistentNotification(title, options, timeoutMs) {
|
function showPersistentNotification(title, options) {
|
||||||
serviceWorkerRegistration.showNotification(title, options);
|
serviceWorkerRegistration.showNotification(title, options);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -77,7 +77,7 @@ function showNotification(options, timeoutMs, apiClient) {
|
||||||
resetRegistration();
|
resetRegistration();
|
||||||
|
|
||||||
if (serviceWorkerRegistration) {
|
if (serviceWorkerRegistration) {
|
||||||
showPersistentNotification(title, options, timeoutMs);
|
showPersistentNotification(title, options);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -219,7 +219,7 @@ Events.on(serverNotifications, 'PackageInstalling', function (e, apiClient, data
|
||||||
showPackageInstallNotification(apiClient, data, 'progress');
|
showPackageInstallNotification(apiClient, data, 'progress');
|
||||||
});
|
});
|
||||||
|
|
||||||
Events.on(serverNotifications, 'ServerShuttingDown', function (e, apiClient, data) {
|
Events.on(serverNotifications, 'ServerShuttingDown', function (e, apiClient) {
|
||||||
const serverId = apiClient.serverInfo().Id;
|
const serverId = apiClient.serverInfo().Id;
|
||||||
const notification = {
|
const notification = {
|
||||||
tag: 'restart' + serverId,
|
tag: 'restart' + serverId,
|
||||||
|
@ -228,7 +228,7 @@ Events.on(serverNotifications, 'ServerShuttingDown', function (e, apiClient, dat
|
||||||
showNotification(notification, 0, apiClient);
|
showNotification(notification, 0, apiClient);
|
||||||
});
|
});
|
||||||
|
|
||||||
Events.on(serverNotifications, 'ServerRestarting', function (e, apiClient, data) {
|
Events.on(serverNotifications, 'ServerRestarting', function (e, apiClient) {
|
||||||
const serverId = apiClient.serverInfo().Id;
|
const serverId = apiClient.serverInfo().Id;
|
||||||
const notification = {
|
const notification = {
|
||||||
tag: 'restart' + serverId,
|
tag: 'restart' + serverId,
|
||||||
|
|
|
@ -648,7 +648,7 @@ import { appRouter } from '../appRouter';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function onPlayPauseStateChanged(e) {
|
function onPlayPauseStateChanged() {
|
||||||
if (!isEnabled) {
|
if (!isEnabled) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -682,7 +682,7 @@ import { appRouter } from '../appRouter';
|
||||||
updatePlayerStateInternal(event, state, player);
|
updatePlayerStateInternal(event, state, player);
|
||||||
}
|
}
|
||||||
|
|
||||||
function onTimeUpdate(e) {
|
function onTimeUpdate() {
|
||||||
if (!isEnabled) {
|
if (!isEnabled) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -718,7 +718,7 @@ import { appRouter } from '../appRouter';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function onVolumeChanged(e) {
|
function onVolumeChanged() {
|
||||||
if (!isEnabled) {
|
if (!isEnabled) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -127,7 +127,7 @@ function releaseCurrentPlayer() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function onBrightnessChanged(e) {
|
function onBrightnessChanged() {
|
||||||
const player = this;
|
const player = this;
|
||||||
|
|
||||||
ensureOsdElement();
|
ensureOsdElement();
|
||||||
|
|
|
@ -156,7 +156,7 @@ function backdropImageUrl(apiClient, item, options) {
|
||||||
options.type = options.type || 'Backdrop';
|
options.type = options.type || 'Backdrop';
|
||||||
|
|
||||||
// If not resizing, get the original image
|
// If not resizing, get the original image
|
||||||
if (!options.maxWidth && !options.width && !options.maxHeight && !options.height) {
|
if (!options.maxWidth && !options.width && !options.maxHeight && !options.height && !options.fillWidth && !options.fillHeight) {
|
||||||
options.quality = 100;
|
options.quality = 100;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -208,7 +208,7 @@ function getMimeType(type, container) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function getParam(name, url) {
|
function getParam(name, url) {
|
||||||
name = name.replace(/[\[]/, '\\\[').replace(/[\]]/, '\\\]');
|
name = name.replace(/[[]/, '\\[').replace(/[\]]/, '\\]');
|
||||||
const regexS = '[\\?&]' + name + '=([^&#]*)';
|
const regexS = '[\\?&]' + name + '=([^&#]*)';
|
||||||
const regex = new RegExp(regexS, 'i');
|
const regex = new RegExp(regexS, 'i');
|
||||||
|
|
||||||
|
@ -270,7 +270,7 @@ function getIntros(firstItem, apiClient, options) {
|
||||||
|
|
||||||
return apiClient.getIntros(firstItem.Id).then(function (result) {
|
return apiClient.getIntros(firstItem.Id).then(function (result) {
|
||||||
return result;
|
return result;
|
||||||
}, function (err) {
|
}, function () {
|
||||||
return Promise.resolve({
|
return Promise.resolve({
|
||||||
Items: []
|
Items: []
|
||||||
});
|
});
|
||||||
|
@ -619,7 +619,7 @@ function supportsDirectPlay(apiClient, item, mediaSource) {
|
||||||
return isHostReachable(mediaSource, apiClient);
|
return isHostReachable(mediaSource, apiClient);
|
||||||
}
|
}
|
||||||
} else if (mediaSource.Protocol === 'File') {
|
} else if (mediaSource.Protocol === 'File') {
|
||||||
return new Promise(function (resolve, reject) {
|
return new Promise(function (resolve) {
|
||||||
// Determine if the file can be accessed directly
|
// Determine if the file can be accessed directly
|
||||||
import('../../scripts/filesystem').then((filesystem) => {
|
import('../../scripts/filesystem').then((filesystem) => {
|
||||||
const method = isFolderRip ?
|
const method = isFolderRip ?
|
||||||
|
@ -1711,7 +1711,7 @@ class PlaybackManager {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function changeStreamToUrl(apiClient, player, playSessionId, streamInfo, newPositionTicks) {
|
function changeStreamToUrl(apiClient, player, playSessionId, streamInfo) {
|
||||||
const playerData = getPlayerData(player);
|
const playerData = getPlayerData(player);
|
||||||
|
|
||||||
playerData.isChangingStream = true;
|
playerData.isChangingStream = true;
|
||||||
|
@ -2037,7 +2037,7 @@ class PlaybackManager {
|
||||||
// Only used internally
|
// Only used internally
|
||||||
self.getCurrentTicks = getCurrentTicks;
|
self.getCurrentTicks = getCurrentTicks;
|
||||||
|
|
||||||
function playOther(items, options, user) {
|
function playOther(items, options) {
|
||||||
const playStartIndex = options.startIndex || 0;
|
const playStartIndex = options.startIndex || 0;
|
||||||
const player = getPlayer(items[playStartIndex], options);
|
const player = getPlayer(items[playStartIndex], options);
|
||||||
|
|
||||||
|
@ -2048,7 +2048,7 @@ class PlaybackManager {
|
||||||
return player.play(options);
|
return player.play(options);
|
||||||
}
|
}
|
||||||
|
|
||||||
function playWithIntros(items, options, user) {
|
function playWithIntros(items, options) {
|
||||||
let playStartIndex = options.startIndex || 0;
|
let playStartIndex = options.startIndex || 0;
|
||||||
let firstItem = items[playStartIndex];
|
let firstItem = items[playStartIndex];
|
||||||
|
|
||||||
|
@ -2065,7 +2065,7 @@ class PlaybackManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (firstItem.MediaType === 'Photo' || firstItem.MediaType === 'Book') {
|
if (firstItem.MediaType === 'Photo' || firstItem.MediaType === 'Book') {
|
||||||
return playOther(items, options, user);
|
return playOther(items, options);
|
||||||
}
|
}
|
||||||
|
|
||||||
const apiClient = ServerConnections.getApiClient(firstItem.ServerId);
|
const apiClient = ServerConnections.getApiClient(firstItem.ServerId);
|
||||||
|
@ -3038,27 +3038,27 @@ class PlaybackManager {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function onPlaybackTimeUpdate(e) {
|
function onPlaybackTimeUpdate() {
|
||||||
const player = this;
|
const player = this;
|
||||||
sendProgressUpdate(player, 'timeupdate');
|
sendProgressUpdate(player, 'timeupdate');
|
||||||
}
|
}
|
||||||
|
|
||||||
function onPlaybackPause(e) {
|
function onPlaybackPause() {
|
||||||
const player = this;
|
const player = this;
|
||||||
sendProgressUpdate(player, 'pause');
|
sendProgressUpdate(player, 'pause');
|
||||||
}
|
}
|
||||||
|
|
||||||
function onPlaybackUnpause(e) {
|
function onPlaybackUnpause() {
|
||||||
const player = this;
|
const player = this;
|
||||||
sendProgressUpdate(player, 'unpause');
|
sendProgressUpdate(player, 'unpause');
|
||||||
}
|
}
|
||||||
|
|
||||||
function onPlaybackVolumeChange(e) {
|
function onPlaybackVolumeChange() {
|
||||||
const player = this;
|
const player = this;
|
||||||
sendProgressUpdate(player, 'volumechange');
|
sendProgressUpdate(player, 'volumechange');
|
||||||
}
|
}
|
||||||
|
|
||||||
function onRepeatModeChange(e) {
|
function onRepeatModeChange() {
|
||||||
const player = this;
|
const player = this;
|
||||||
sendProgressUpdate(player, 'repeatmodechange');
|
sendProgressUpdate(player, 'repeatmodechange');
|
||||||
}
|
}
|
||||||
|
@ -3068,17 +3068,17 @@ class PlaybackManager {
|
||||||
sendProgressUpdate(player, 'shufflequeuemodechange');
|
sendProgressUpdate(player, 'shufflequeuemodechange');
|
||||||
}
|
}
|
||||||
|
|
||||||
function onPlaylistItemMove(e) {
|
function onPlaylistItemMove() {
|
||||||
const player = this;
|
const player = this;
|
||||||
sendProgressUpdate(player, 'playlistitemmove', true);
|
sendProgressUpdate(player, 'playlistitemmove', true);
|
||||||
}
|
}
|
||||||
|
|
||||||
function onPlaylistItemRemove(e) {
|
function onPlaylistItemRemove() {
|
||||||
const player = this;
|
const player = this;
|
||||||
sendProgressUpdate(player, 'playlistitemremove', true);
|
sendProgressUpdate(player, 'playlistitemremove', true);
|
||||||
}
|
}
|
||||||
|
|
||||||
function onPlaylistItemAdd(e) {
|
function onPlaylistItemAdd() {
|
||||||
const player = this;
|
const player = this;
|
||||||
sendProgressUpdate(player, 'playlistitemadd', true);
|
sendProgressUpdate(player, 'playlistitemadd', true);
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,7 +14,7 @@ function onOrientationChangeError(err) {
|
||||||
console.error('error locking orientation: ' + err);
|
console.error('error locking orientation: ' + err);
|
||||||
}
|
}
|
||||||
|
|
||||||
Events.on(playbackManager, 'playbackstart', function (e, player, state) {
|
Events.on(playbackManager, 'playbackstart', function (e, player) {
|
||||||
const isLocalVideo = player.isLocalPlayer && !player.isExternalPlayer && playbackManager.isPlayingVideo(player);
|
const isLocalVideo = player.isLocalPlayer && !player.isExternalPlayer && playbackManager.isPlayingVideo(player);
|
||||||
|
|
||||||
if (isLocalVideo && layoutManager.mobile) {
|
if (isLocalVideo && layoutManager.mobile) {
|
||||||
|
|
|
@ -301,15 +301,15 @@ Events.on(appSettings, 'change', function (e, name) {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
Events.on(playbackManager, 'pairing', function (e) {
|
Events.on(playbackManager, 'pairing', function () {
|
||||||
loading.show();
|
loading.show();
|
||||||
});
|
});
|
||||||
|
|
||||||
Events.on(playbackManager, 'paired', function (e) {
|
Events.on(playbackManager, 'paired', function () {
|
||||||
loading.hide();
|
loading.hide();
|
||||||
});
|
});
|
||||||
|
|
||||||
Events.on(playbackManager, 'pairerror', function (e) {
|
Events.on(playbackManager, 'pairerror', function () {
|
||||||
loading.hide();
|
loading.hide();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -114,7 +114,7 @@ class PlayQueueManager {
|
||||||
return this._currentPlaylistItemId;
|
return this._currentPlaylistItemId;
|
||||||
}
|
}
|
||||||
|
|
||||||
setPlaylistState(playlistItemId, playlistIndex) {
|
setPlaylistState(playlistItemId) {
|
||||||
this._currentPlaylistItemId = playlistItemId;
|
this._currentPlaylistItemId = playlistItemId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -118,7 +118,7 @@ function releaseCurrentPlayer() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function onVolumeChanged(e) {
|
function onVolumeChanged() {
|
||||||
const player = this;
|
const player = this;
|
||||||
|
|
||||||
ensureOsdElement();
|
ensureOsdElement();
|
||||||
|
|
|
@ -196,7 +196,7 @@ import ServerConnections from '../ServerConnections';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function getMediaSourceStats(session, player, displayPlayMethod) {
|
function getMediaSourceStats(session, player) {
|
||||||
const sessionStats = [];
|
const sessionStats = [];
|
||||||
|
|
||||||
const mediaSource = playbackManager.currentMediaSource(player) || {};
|
const mediaSource = playbackManager.currentMediaSource(player) || {};
|
||||||
|
|
|
@ -5,7 +5,7 @@ import '../../elements/emby-button/emby-button';
|
||||||
import './recordingfields.scss';
|
import './recordingfields.scss';
|
||||||
import ServerConnections from '../ServerConnections';
|
import ServerConnections from '../ServerConnections';
|
||||||
|
|
||||||
function onRecordingButtonClick(e) {
|
function onRecordingButtonClick() {
|
||||||
const item = this.item;
|
const item = this.item;
|
||||||
|
|
||||||
if (item) {
|
if (item) {
|
||||||
|
|
|
@ -28,7 +28,7 @@ function deleteTimer(apiClient, timerId) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function renderTimer(context, item, apiClient) {
|
function renderTimer(context, item) {
|
||||||
context.querySelector('#txtPrePaddingMinutes').value = item.PrePaddingSeconds / 60;
|
context.querySelector('#txtPrePaddingMinutes').value = item.PrePaddingSeconds / 60;
|
||||||
context.querySelector('#txtPostPaddingMinutes').value = item.PostPaddingSeconds / 60;
|
context.querySelector('#txtPostPaddingMinutes').value = item.PostPaddingSeconds / 60;
|
||||||
|
|
||||||
|
@ -79,13 +79,13 @@ function reload(context, id) {
|
||||||
|
|
||||||
const apiClient = ServerConnections.getApiClient(currentServerId);
|
const apiClient = ServerConnections.getApiClient(currentServerId);
|
||||||
apiClient.getLiveTvTimer(id).then(function (result) {
|
apiClient.getLiveTvTimer(id).then(function (result) {
|
||||||
renderTimer(context, result, apiClient);
|
renderTimer(context, result);
|
||||||
loading.hide();
|
loading.hide();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function showEditor(itemId, serverId, options) {
|
function showEditor(itemId, serverId, options) {
|
||||||
return new Promise(function (resolve, reject) {
|
return new Promise(function (resolve) {
|
||||||
recordingDeleted = false;
|
recordingDeleted = false;
|
||||||
currentServerId = serverId;
|
currentServerId = serverId;
|
||||||
loading.show();
|
loading.show();
|
||||||
|
|
|
@ -14,7 +14,7 @@ import template from './recordingfields.template.html';
|
||||||
|
|
||||||
/*eslint prefer-const: "error"*/
|
/*eslint prefer-const: "error"*/
|
||||||
|
|
||||||
function loadData(parent, program, apiClient) {
|
function loadData(parent, program) {
|
||||||
if (program.IsSeries) {
|
if (program.IsSeries) {
|
||||||
parent.querySelector('.recordSeriesContainer').classList.remove('hide');
|
parent.querySelector('.recordSeriesContainer').classList.remove('hide');
|
||||||
} else {
|
} else {
|
||||||
|
@ -55,7 +55,7 @@ function fetchData(instance) {
|
||||||
instance.TimerId = program.TimerId;
|
instance.TimerId = program.TimerId;
|
||||||
instance.Status = program.Status;
|
instance.Status = program.Status;
|
||||||
instance.SeriesTimerId = program.SeriesTimerId;
|
instance.SeriesTimerId = program.SeriesTimerId;
|
||||||
loadData(options.parent, program, apiClient);
|
loadData(options.parent, program);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -119,7 +119,7 @@ class RecordingEditor {
|
||||||
|
|
||||||
embed() {
|
embed() {
|
||||||
const self = this;
|
const self = this;
|
||||||
return new Promise(function (resolve, reject) {
|
return new Promise(function (resolve) {
|
||||||
const options = self.options;
|
const options = self.options;
|
||||||
const context = options.parent;
|
const context = options.parent;
|
||||||
context.innerHTML = globalize.translateHtml(template, 'core');
|
context.innerHTML = globalize.translateHtml(template, 'core');
|
||||||
|
@ -156,7 +156,7 @@ class RecordingEditor {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function onManageRecordingClick(e) {
|
function onManageRecordingClick() {
|
||||||
const options = this.options;
|
const options = this.options;
|
||||||
if (!this.TimerId || this.Status === 'Cancelled') {
|
if (!this.TimerId || this.Status === 'Cancelled') {
|
||||||
return;
|
return;
|
||||||
|
@ -172,7 +172,7 @@ function onManageRecordingClick(e) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function onManageSeriesRecordingClick(e) {
|
function onManageSeriesRecordingClick() {
|
||||||
const options = this.options;
|
const options = this.options;
|
||||||
|
|
||||||
if (!this.SeriesTimerId) {
|
if (!this.SeriesTimerId) {
|
||||||
|
|
|
@ -155,7 +155,7 @@ class RefreshDialog {
|
||||||
centerFocus(dlg.querySelector('.formDialogContent'), false, true);
|
centerFocus(dlg.querySelector('.formDialogContent'), false, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
return new Promise(function (resolve, reject) {
|
return new Promise(function (resolve) {
|
||||||
if (layoutManager.tv) {
|
if (layoutManager.tv) {
|
||||||
centerFocus(dlg.querySelector('.formDialogContent'), false, false);
|
centerFocus(dlg.querySelector('.formDialogContent'), false, false);
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,7 +24,7 @@ import { appRouter } from '../appRouter';
|
||||||
let showMuteButton = true;
|
let showMuteButton = true;
|
||||||
let showVolumeSlider = true;
|
let showVolumeSlider = true;
|
||||||
|
|
||||||
function showAudioMenu(context, player, button, item) {
|
function showAudioMenu(context, player, button) {
|
||||||
const currentIndex = playbackManager.getAudioStreamIndex(player);
|
const currentIndex = playbackManager.getAudioStreamIndex(player);
|
||||||
const streams = playbackManager.audioTracks(player);
|
const streams = playbackManager.audioTracks(player);
|
||||||
const menuItems = streams.map(function (s) {
|
const menuItems = streams.map(function (s) {
|
||||||
|
@ -51,7 +51,7 @@ function showAudioMenu(context, player, button, item) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function showSubtitleMenu(context, player, button, item) {
|
function showSubtitleMenu(context, player, button) {
|
||||||
const currentIndex = playbackManager.getSubtitleStreamIndex(player);
|
const currentIndex = playbackManager.getSubtitleStreamIndex(player);
|
||||||
const streams = playbackManager.subtitleTracks(player);
|
const streams = playbackManager.subtitleTracks(player);
|
||||||
const menuItems = streams.map(function (s) {
|
const menuItems = streams.map(function (s) {
|
||||||
|
@ -572,7 +572,7 @@ export default function () {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function onPlaylistUpdate(e) {
|
function onPlaylistUpdate() {
|
||||||
loadPlaylist(dlg, this);
|
loadPlaylist(dlg, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -603,7 +603,7 @@ export default function () {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function onPlayPauseStateChanged(e) {
|
function onPlayPauseStateChanged() {
|
||||||
updatePlayPauseState(this.paused(), true);
|
updatePlayPauseState(this.paused(), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -613,7 +613,7 @@ export default function () {
|
||||||
onPlaylistUpdate();
|
onPlaylistUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
function onTimeUpdate(e) {
|
function onTimeUpdate() {
|
||||||
const now = new Date().getTime();
|
const now = new Date().getTime();
|
||||||
|
|
||||||
if (!(now - lastUpdateTime < 700)) {
|
if (!(now - lastUpdateTime < 700)) {
|
||||||
|
@ -624,7 +624,7 @@ export default function () {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function onVolumeChanged(e) {
|
function onVolumeChanged() {
|
||||||
const player = this;
|
const player = this;
|
||||||
updatePlayerVolumeState(dlg, player.isMuted(), player.getVolume());
|
updatePlayerVolumeState(dlg, player.isMuted(), player.getVolume());
|
||||||
}
|
}
|
||||||
|
@ -727,12 +727,12 @@ export default function () {
|
||||||
});
|
});
|
||||||
context.querySelector('.btnAudioTracks').addEventListener('click', function (e) {
|
context.querySelector('.btnAudioTracks').addEventListener('click', function (e) {
|
||||||
if (currentPlayer && lastPlayerState && lastPlayerState.NowPlayingItem) {
|
if (currentPlayer && lastPlayerState && lastPlayerState.NowPlayingItem) {
|
||||||
showAudioMenu(context, currentPlayer, e.target, lastPlayerState.NowPlayingItem);
|
showAudioMenu(context, currentPlayer, e.target);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
context.querySelector('.btnSubtitles').addEventListener('click', function (e) {
|
context.querySelector('.btnSubtitles').addEventListener('click', function (e) {
|
||||||
if (currentPlayer && lastPlayerState && lastPlayerState.NowPlayingItem) {
|
if (currentPlayer && lastPlayerState && lastPlayerState.NowPlayingItem) {
|
||||||
showSubtitleMenu(context, currentPlayer, e.target, lastPlayerState.NowPlayingItem);
|
showSubtitleMenu(context, currentPlayer, e.target);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
context.querySelector('.btnStop').addEventListener('click', function () {
|
context.querySelector('.btnStop').addEventListener('click', function () {
|
||||||
|
@ -922,13 +922,13 @@ export default function () {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function onDialogClosed(e) {
|
function onDialogClosed() {
|
||||||
releaseCurrentPlayer();
|
releaseCurrentPlayer();
|
||||||
Events.off(playbackManager, 'playerchange', onPlayerChange);
|
Events.off(playbackManager, 'playerchange', onPlayerChange);
|
||||||
lastPlayerState = null;
|
lastPlayerState = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
function onShow(context, tab) {
|
function onShow(context) {
|
||||||
bindToPlayer(context, playbackManager.getCurrentPlayer());
|
bindToPlayer(context, playbackManager.getCurrentPlayer());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -946,7 +946,7 @@ export default function () {
|
||||||
};
|
};
|
||||||
|
|
||||||
self.onShow = function () {
|
self.onShow = function () {
|
||||||
onShow(dlg, window.location.hash);
|
onShow(dlg);
|
||||||
};
|
};
|
||||||
|
|
||||||
self.destroy = function () {
|
self.destroy = function () {
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
// TODO: Check if needed and move to external dependency
|
// TODO: Check if needed and move to external dependency
|
||||||
// From https://github.com/parshap/node-sanitize-filename
|
// From https://github.com/parshap/node-sanitize-filename
|
||||||
|
|
||||||
const illegalRe = /[\/\?<>\\:\*\|":]/g;
|
const illegalRe = /[/?<>\\:*|":]/g;
|
||||||
// eslint-disable-next-line no-control-regex
|
// eslint-disable-next-line no-control-regex
|
||||||
const controlRe = /[\x00-\x1f\x80-\x9f]/g;
|
const controlRe = /[\x00-\x1f\x80-\x9f]/g;
|
||||||
const reservedRe = /^\.+$/;
|
const reservedRe = /^\.+$/;
|
||||||
const windowsReservedRe = /^(con|prn|aux|nul|com[0-9]|lpt[0-9])(\..*)?$/i;
|
const windowsReservedRe = /^(con|prn|aux|nul|com[0-9]|lpt[0-9])(\..*)?$/i;
|
||||||
const windowsTrailingRe = /[\. ]+$/;
|
const windowsTrailingRe = /[. ]+$/;
|
||||||
|
|
||||||
function isHighSurrogate(codePoint) {
|
function isHighSurrogate(codePoint) {
|
||||||
return codePoint >= 0xd800 && codePoint <= 0xdbff;
|
return codePoint >= 0xd800 && codePoint <= 0xdbff;
|
||||||
|
|
|
@ -61,7 +61,7 @@ import template from './searchfields.template.html';
|
||||||
triggerSearch(searchFieldsInstance, value);
|
triggerSearch(searchFieldsInstance, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
function embed(elem, instance, options) {
|
function embed(elem, instance) {
|
||||||
let html = globalize.translateHtml(template, 'core');
|
let html = globalize.translateHtml(template, 'core');
|
||||||
|
|
||||||
if (browser.tizen || browser.orsay) {
|
if (browser.tizen || browser.orsay) {
|
||||||
|
@ -89,7 +89,7 @@ import template from './searchfields.template.html';
|
||||||
class SearchFields {
|
class SearchFields {
|
||||||
constructor(options) {
|
constructor(options) {
|
||||||
this.options = options;
|
this.options = options;
|
||||||
embed(options.element, this, options);
|
embed(options.element, this);
|
||||||
}
|
}
|
||||||
focus() {
|
focus() {
|
||||||
this.options.element.querySelector('.searchfields-txtSearch').focus();
|
this.options.element.querySelector('.searchfields-txtSearch').focus();
|
||||||
|
|
|
@ -585,7 +585,7 @@ import template from './searchresults.template.html';
|
||||||
return originalString.replace(reg, strWith);
|
return originalString.replace(reg, strWith);
|
||||||
}
|
}
|
||||||
|
|
||||||
function embed(elem, instance, options) {
|
function embed(elem, instance) {
|
||||||
let workingTemplate = template;
|
let workingTemplate = template;
|
||||||
if (!enableScrollX()) {
|
if (!enableScrollX()) {
|
||||||
workingTemplate = replaceAll(workingTemplate, 'data-horizontal="true"', 'data-horizontal="false"');
|
workingTemplate = replaceAll(workingTemplate, 'data-horizontal="true"', 'data-horizontal="false"');
|
||||||
|
@ -603,7 +603,7 @@ import template from './searchresults.template.html';
|
||||||
class SearchResults {
|
class SearchResults {
|
||||||
constructor(options) {
|
constructor(options) {
|
||||||
this.options = options;
|
this.options = options;
|
||||||
embed(options.element, this, options);
|
embed(options.element, this);
|
||||||
}
|
}
|
||||||
search(value) {
|
search(value) {
|
||||||
const apiClient = ServerConnections.getApiClient(this.options.serverId);
|
const apiClient = ServerConnections.getApiClient(this.options.serverId);
|
||||||
|
|
|
@ -71,7 +71,7 @@ function getBackdropImageUrl(item, options, apiClient) {
|
||||||
options.type = options.type || 'Backdrop';
|
options.type = options.type || 'Backdrop';
|
||||||
|
|
||||||
// If not resizing, get the original image
|
// If not resizing, get the original image
|
||||||
if (!options.maxWidth && !options.width && !options.maxHeight && !options.height) {
|
if (!options.maxWidth && !options.width && !options.maxHeight && !options.height && !options.fillWidth && !options.fillHeight) {
|
||||||
options.quality = 100;
|
options.quality = 100;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -210,7 +210,7 @@ export default function (options) {
|
||||||
dialog.innerHTML = html;
|
dialog.innerHTML = html;
|
||||||
|
|
||||||
if (options.interactive && !layoutManager.tv) {
|
if (options.interactive && !layoutManager.tv) {
|
||||||
dialog.querySelector('.btnSlideshowExit').addEventListener('click', function (e) {
|
dialog.querySelector('.btnSlideshowExit').addEventListener('click', function () {
|
||||||
dialogHelper.close(dialog);
|
dialogHelper.close(dialog);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -381,10 +381,9 @@ export default function (options) {
|
||||||
/**
|
/**
|
||||||
* Renders the HTML markup of a slide for an item or a slide.
|
* Renders the HTML markup of a slide for an item or a slide.
|
||||||
* @param {Object} item - The item used to render the slide.
|
* @param {Object} item - The item used to render the slide.
|
||||||
* @param {number} index - The index of the item in the Swiper instance.
|
|
||||||
* @returns {string} The HTML markup of the slide.
|
* @returns {string} The HTML markup of the slide.
|
||||||
*/
|
*/
|
||||||
function getSwiperSlideHtml(item, index) {
|
function getSwiperSlideHtml(item) {
|
||||||
if (currentOptions.slides) {
|
if (currentOptions.slides) {
|
||||||
return getSwiperSlideHtmlFromSlide(item);
|
return getSwiperSlideHtmlFromSlide(item);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -108,7 +108,7 @@ function initEditor(page) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function showEditor(options, resolve, reject) {
|
function showEditor(options, resolve) {
|
||||||
options = options || {};
|
options = options || {};
|
||||||
currentItemId = options.itemId;
|
currentItemId = options.itemId;
|
||||||
currentServerId = options.serverId;
|
currentServerId = options.serverId;
|
||||||
|
@ -161,9 +161,9 @@ function showEditor(options, resolve, reject) {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function show(options) {
|
export function show(options) {
|
||||||
return new Promise(function (resolve, reject) {
|
return new Promise(function (resolve) {
|
||||||
hasChanges = false;
|
hasChanges = false;
|
||||||
showEditor(options, resolve, reject);
|
showEditor(options, resolve);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -130,7 +130,7 @@ class Manager {
|
||||||
/**
|
/**
|
||||||
* Called when the player changes.
|
* Called when the player changes.
|
||||||
*/
|
*/
|
||||||
onPlayerChange(newPlayer, newTarget, oldPlayer) {
|
onPlayerChange(newPlayer) {
|
||||||
this.bindToPlayer(newPlayer);
|
this.bindToPlayer(newPlayer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -228,9 +228,8 @@ class Manager {
|
||||||
/**
|
/**
|
||||||
* Handles a playback command from the server.
|
* Handles a playback command from the server.
|
||||||
* @param {Object} cmd The playback command.
|
* @param {Object} cmd The playback command.
|
||||||
* @param {Object} apiClient The ApiClient.
|
|
||||||
*/
|
*/
|
||||||
processCommand(cmd, apiClient) {
|
processCommand(cmd) {
|
||||||
if (cmd === null) return;
|
if (cmd === null) return;
|
||||||
|
|
||||||
if (typeof cmd.When === 'string') {
|
if (typeof cmd.When === 'string') {
|
||||||
|
@ -277,9 +276,8 @@ class Manager {
|
||||||
/**
|
/**
|
||||||
* Handles a group state change.
|
* Handles a group state change.
|
||||||
* @param {Object} update The group state update.
|
* @param {Object} update The group state update.
|
||||||
* @param {Object} apiClient The ApiClient.
|
|
||||||
*/
|
*/
|
||||||
processStateChange(update, apiClient) {
|
processStateChange(update) {
|
||||||
if (update === null || update.State === null || update.Reason === null) return;
|
if (update === null || update.State === null || update.Reason === null) return;
|
||||||
|
|
||||||
if (!this.isSyncPlayEnabled()) {
|
if (!this.isSyncPlayEnabled()) {
|
||||||
|
|
|
@ -158,6 +158,7 @@ class GenericPlayer {
|
||||||
* Sets the playback rate, if supported.
|
* Sets the playback rate, if supported.
|
||||||
* @param {number} value The playback rate.
|
* @param {number} value The playback rate.
|
||||||
*/
|
*/
|
||||||
|
// eslint-disable-next-line no-unused-vars
|
||||||
setPlaybackRate(value) {
|
setPlaybackRate(value) {
|
||||||
// Do nothing.
|
// Do nothing.
|
||||||
}
|
}
|
||||||
|
@ -196,6 +197,7 @@ class GenericPlayer {
|
||||||
* Seeks the player to the specified position.
|
* Seeks the player to the specified position.
|
||||||
* @param {number} positionTicks The new position.
|
* @param {number} positionTicks The new position.
|
||||||
*/
|
*/
|
||||||
|
// eslint-disable-next-line no-unused-vars
|
||||||
localSeek(positionTicks) {
|
localSeek(positionTicks) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -211,6 +213,7 @@ class GenericPlayer {
|
||||||
* Sends a command to the player.
|
* Sends a command to the player.
|
||||||
* @param {Object} command The command.
|
* @param {Object} command The command.
|
||||||
*/
|
*/
|
||||||
|
// eslint-disable-next-line no-unused-vars
|
||||||
localSendCommand(command) {
|
localSendCommand(command) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -219,6 +222,7 @@ class GenericPlayer {
|
||||||
* Starts playback.
|
* Starts playback.
|
||||||
* @param {Object} options Playback data.
|
* @param {Object} options Playback data.
|
||||||
*/
|
*/
|
||||||
|
// eslint-disable-next-line no-unused-vars
|
||||||
localPlay(options) {
|
localPlay(options) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -227,6 +231,7 @@ class GenericPlayer {
|
||||||
* Sets playing item from playlist.
|
* Sets playing item from playlist.
|
||||||
* @param {string} playlistItemId The item to play.
|
* @param {string} playlistItemId The item to play.
|
||||||
*/
|
*/
|
||||||
|
// eslint-disable-next-line no-unused-vars
|
||||||
localSetCurrentPlaylistItem(playlistItemId) {
|
localSetCurrentPlaylistItem(playlistItemId) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -235,6 +240,7 @@ class GenericPlayer {
|
||||||
* Removes items from playlist.
|
* Removes items from playlist.
|
||||||
* @param {Array} playlistItemIds The items to remove.
|
* @param {Array} playlistItemIds The items to remove.
|
||||||
*/
|
*/
|
||||||
|
// eslint-disable-next-line no-unused-vars
|
||||||
localRemoveFromPlaylist(playlistItemIds) {
|
localRemoveFromPlaylist(playlistItemIds) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -244,6 +250,7 @@ class GenericPlayer {
|
||||||
* @param {string} playlistItemId The item to move.
|
* @param {string} playlistItemId The item to move.
|
||||||
* @param {number} newIndex The new position.
|
* @param {number} newIndex The new position.
|
||||||
*/
|
*/
|
||||||
|
// eslint-disable-next-line no-unused-vars
|
||||||
localMovePlaylistItem(playlistItemId, newIndex) {
|
localMovePlaylistItem(playlistItemId, newIndex) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -252,6 +259,7 @@ class GenericPlayer {
|
||||||
* Queues in the playlist.
|
* Queues in the playlist.
|
||||||
* @param {Object} options Queue data.
|
* @param {Object} options Queue data.
|
||||||
*/
|
*/
|
||||||
|
// eslint-disable-next-line no-unused-vars
|
||||||
localQueue(options) {
|
localQueue(options) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -260,6 +268,7 @@ class GenericPlayer {
|
||||||
* Queues after the playing item in the playlist.
|
* Queues after the playing item in the playlist.
|
||||||
* @param {Object} options Queue data.
|
* @param {Object} options Queue data.
|
||||||
*/
|
*/
|
||||||
|
// eslint-disable-next-line no-unused-vars
|
||||||
localQueueNext(options) {
|
localQueueNext(options) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -282,6 +291,7 @@ class GenericPlayer {
|
||||||
* Sets repeat mode.
|
* Sets repeat mode.
|
||||||
* @param {string} value The repeat mode.
|
* @param {string} value The repeat mode.
|
||||||
*/
|
*/
|
||||||
|
// eslint-disable-next-line no-unused-vars
|
||||||
localSetRepeatMode(value) {
|
localSetRepeatMode(value) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -290,6 +300,7 @@ class GenericPlayer {
|
||||||
* Sets shuffle mode.
|
* Sets shuffle mode.
|
||||||
* @param {string} value The shuffle mode.
|
* @param {string} value The shuffle mode.
|
||||||
*/
|
*/
|
||||||
|
// eslint-disable-next-line no-unused-vars
|
||||||
localSetQueueShuffleMode(value) {
|
localSetQueueShuffleMode(value) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -135,7 +135,7 @@ class NoActivePlayer extends SyncPlay.Players.GenericPlayer {
|
||||||
/**
|
/**
|
||||||
* Overrides PlaybackManager's seek method.
|
* Overrides PlaybackManager's seek method.
|
||||||
*/
|
*/
|
||||||
seekRequest(positionTicks, player) {
|
seekRequest(positionTicks) {
|
||||||
const controller = syncPlayManager.getController();
|
const controller = syncPlayManager.getController();
|
||||||
controller.seek(positionTicks);
|
controller.seek(positionTicks);
|
||||||
}
|
}
|
||||||
|
@ -148,19 +148,19 @@ class NoActivePlayer extends SyncPlay.Players.GenericPlayer {
|
||||||
const controller = syncPlayManager.getController();
|
const controller = syncPlayManager.getController();
|
||||||
const playerWrapper = syncPlayManager.getPlayerWrapper();
|
const playerWrapper = syncPlayManager.getPlayerWrapper();
|
||||||
|
|
||||||
const defaultAction = (_command, _player) => {
|
const defaultAction = (_command) => {
|
||||||
playerWrapper.localSendCommand(_command);
|
playerWrapper.localSendCommand(_command);
|
||||||
};
|
};
|
||||||
|
|
||||||
const ignoreCallback = (_command, _player) => {
|
const ignoreCallback = () => {
|
||||||
// Do nothing.
|
// Do nothing.
|
||||||
};
|
};
|
||||||
|
|
||||||
const SetRepeatModeCallback = (_command, _player) => {
|
const SetRepeatModeCallback = (_command) => {
|
||||||
controller.setRepeatMode(_command.Arguments.RepeatMode);
|
controller.setRepeatMode(_command.Arguments.RepeatMode);
|
||||||
};
|
};
|
||||||
|
|
||||||
const SetShuffleQueueCallback = (_command, _player) => {
|
const SetShuffleQueueCallback = (_command) => {
|
||||||
controller.setShuffleMode(_command.Arguments.ShuffleMode);
|
controller.setShuffleMode(_command.Arguments.ShuffleMode);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -176,7 +176,7 @@ class NoActivePlayer extends SyncPlay.Players.GenericPlayer {
|
||||||
if (typeof commandHandler === 'function') {
|
if (typeof commandHandler === 'function') {
|
||||||
commandHandler(command, player);
|
commandHandler(command, player);
|
||||||
} else {
|
} else {
|
||||||
defaultAction(command, player);
|
defaultAction(command);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -242,7 +242,7 @@ class NoActivePlayer extends SyncPlay.Players.GenericPlayer {
|
||||||
/**
|
/**
|
||||||
* Overrides PlaybackManager's setCurrentPlaylistItem method.
|
* Overrides PlaybackManager's setCurrentPlaylistItem method.
|
||||||
*/
|
*/
|
||||||
setCurrentPlaylistItemRequest(playlistItemId, player) {
|
setCurrentPlaylistItemRequest(playlistItemId) {
|
||||||
const controller = syncPlayManager.getController();
|
const controller = syncPlayManager.getController();
|
||||||
controller.setCurrentPlaylistItem(playlistItemId);
|
controller.setCurrentPlaylistItem(playlistItemId);
|
||||||
}
|
}
|
||||||
|
@ -250,7 +250,7 @@ class NoActivePlayer extends SyncPlay.Players.GenericPlayer {
|
||||||
/**
|
/**
|
||||||
* Overrides PlaybackManager's removeFromPlaylist method.
|
* Overrides PlaybackManager's removeFromPlaylist method.
|
||||||
*/
|
*/
|
||||||
removeFromPlaylistRequest(playlistItemIds, player) {
|
removeFromPlaylistRequest(playlistItemIds) {
|
||||||
const controller = syncPlayManager.getController();
|
const controller = syncPlayManager.getController();
|
||||||
controller.removeFromPlaylist(playlistItemIds);
|
controller.removeFromPlaylist(playlistItemIds);
|
||||||
}
|
}
|
||||||
|
@ -258,7 +258,7 @@ class NoActivePlayer extends SyncPlay.Players.GenericPlayer {
|
||||||
/**
|
/**
|
||||||
* Overrides PlaybackManager's movePlaylistItem method.
|
* Overrides PlaybackManager's movePlaylistItem method.
|
||||||
*/
|
*/
|
||||||
movePlaylistItemRequest(playlistItemId, newIndex, player) {
|
movePlaylistItemRequest(playlistItemId, newIndex) {
|
||||||
const controller = syncPlayManager.getController();
|
const controller = syncPlayManager.getController();
|
||||||
controller.movePlaylistItem(playlistItemId, newIndex);
|
controller.movePlaylistItem(playlistItemId, newIndex);
|
||||||
}
|
}
|
||||||
|
@ -266,7 +266,7 @@ class NoActivePlayer extends SyncPlay.Players.GenericPlayer {
|
||||||
/**
|
/**
|
||||||
* Overrides PlaybackManager's queue method.
|
* Overrides PlaybackManager's queue method.
|
||||||
*/
|
*/
|
||||||
queueRequest(options, player) {
|
queueRequest(options) {
|
||||||
const controller = syncPlayManager.getController();
|
const controller = syncPlayManager.getController();
|
||||||
controller.queue(options);
|
controller.queue(options);
|
||||||
}
|
}
|
||||||
|
@ -274,7 +274,7 @@ class NoActivePlayer extends SyncPlay.Players.GenericPlayer {
|
||||||
/**
|
/**
|
||||||
* Overrides PlaybackManager's queueNext method.
|
* Overrides PlaybackManager's queueNext method.
|
||||||
*/
|
*/
|
||||||
queueNextRequest(options, player) {
|
queueNextRequest(options) {
|
||||||
const controller = syncPlayManager.getController();
|
const controller = syncPlayManager.getController();
|
||||||
controller.queueNext(options);
|
controller.queueNext(options);
|
||||||
}
|
}
|
||||||
|
@ -282,7 +282,7 @@ class NoActivePlayer extends SyncPlay.Players.GenericPlayer {
|
||||||
/**
|
/**
|
||||||
* Overrides PlaybackManager's nextTrack method.
|
* Overrides PlaybackManager's nextTrack method.
|
||||||
*/
|
*/
|
||||||
nextTrackRequest(player) {
|
nextTrackRequest() {
|
||||||
const controller = syncPlayManager.getController();
|
const controller = syncPlayManager.getController();
|
||||||
controller.nextItem();
|
controller.nextItem();
|
||||||
}
|
}
|
||||||
|
@ -290,7 +290,7 @@ class NoActivePlayer extends SyncPlay.Players.GenericPlayer {
|
||||||
/**
|
/**
|
||||||
* Overrides PlaybackManager's previousTrack method.
|
* Overrides PlaybackManager's previousTrack method.
|
||||||
*/
|
*/
|
||||||
previousTrackRequest(player) {
|
previousTrackRequest() {
|
||||||
const controller = syncPlayManager.getController();
|
const controller = syncPlayManager.getController();
|
||||||
controller.previousItem();
|
controller.previousItem();
|
||||||
}
|
}
|
||||||
|
@ -298,7 +298,7 @@ class NoActivePlayer extends SyncPlay.Players.GenericPlayer {
|
||||||
/**
|
/**
|
||||||
* Overrides PlaybackManager's setRepeatMode method.
|
* Overrides PlaybackManager's setRepeatMode method.
|
||||||
*/
|
*/
|
||||||
setRepeatModeRequest(mode, player) {
|
setRepeatModeRequest(mode) {
|
||||||
const controller = syncPlayManager.getController();
|
const controller = syncPlayManager.getController();
|
||||||
controller.setRepeatMode(mode);
|
controller.setRepeatMode(mode);
|
||||||
}
|
}
|
||||||
|
@ -306,7 +306,7 @@ class NoActivePlayer extends SyncPlay.Players.GenericPlayer {
|
||||||
/**
|
/**
|
||||||
* Overrides PlaybackManager's setQueueShuffleMode method.
|
* Overrides PlaybackManager's setQueueShuffleMode method.
|
||||||
*/
|
*/
|
||||||
setQueueShuffleModeRequest(mode, player) {
|
setQueueShuffleModeRequest(mode) {
|
||||||
const controller = syncPlayManager.getController();
|
const controller = syncPlayManager.getController();
|
||||||
controller.setShuffleMode(mode);
|
controller.setShuffleMode(mode);
|
||||||
}
|
}
|
||||||
|
@ -314,7 +314,7 @@ class NoActivePlayer extends SyncPlay.Players.GenericPlayer {
|
||||||
/**
|
/**
|
||||||
* Overrides PlaybackManager's toggleQueueShuffleMode method.
|
* Overrides PlaybackManager's toggleQueueShuffleMode method.
|
||||||
*/
|
*/
|
||||||
toggleQueueShuffleModeRequest(player) {
|
toggleQueueShuffleModeRequest() {
|
||||||
const controller = syncPlayManager.getController();
|
const controller = syncPlayManager.getController();
|
||||||
controller.toggleShuffleMode();
|
controller.toggleShuffleMode();
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,14 +21,14 @@ class QueueManager {
|
||||||
/**
|
/**
|
||||||
* Placeholder for original PlayQueueManager method.
|
* Placeholder for original PlayQueueManager method.
|
||||||
*/
|
*/
|
||||||
setPlaylist(items) {
|
setPlaylist() {
|
||||||
// Do nothing.
|
// Do nothing.
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Placeholder for original PlayQueueManager method.
|
* Placeholder for original PlayQueueManager method.
|
||||||
*/
|
*/
|
||||||
queue(items) {
|
queue() {
|
||||||
// Do nothing.
|
// Do nothing.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -49,14 +49,14 @@ class QueueManager {
|
||||||
/**
|
/**
|
||||||
* Placeholder for original PlayQueueManager method.
|
* Placeholder for original PlayQueueManager method.
|
||||||
*/
|
*/
|
||||||
clearPlaylist(clearCurrentItem = false) {
|
clearPlaylist() {
|
||||||
// Do nothing.
|
// Do nothing.
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Placeholder for original PlayQueueManager method.
|
* Placeholder for original PlayQueueManager method.
|
||||||
*/
|
*/
|
||||||
queueNext(items) {
|
queueNext() {
|
||||||
// Do nothing.
|
// Do nothing.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -90,28 +90,28 @@ class QueueManager {
|
||||||
/**
|
/**
|
||||||
* Placeholder for original PlayQueueManager method.
|
* Placeholder for original PlayQueueManager method.
|
||||||
*/
|
*/
|
||||||
setPlaylistState(playlistItemId, playlistIndex) {
|
setPlaylistState() {
|
||||||
// Do nothing.
|
// Do nothing.
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Placeholder for original PlayQueueManager method.
|
* Placeholder for original PlayQueueManager method.
|
||||||
*/
|
*/
|
||||||
setPlaylistIndex(playlistIndex) {
|
setPlaylistIndex() {
|
||||||
// Do nothing.
|
// Do nothing.
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Placeholder for original PlayQueueManager method.
|
* Placeholder for original PlayQueueManager method.
|
||||||
*/
|
*/
|
||||||
removeFromPlaylist(playlistItemIds) {
|
removeFromPlaylist() {
|
||||||
// Do nothing.
|
// Do nothing.
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Placeholder for original PlayQueueManager method.
|
* Placeholder for original PlayQueueManager method.
|
||||||
*/
|
*/
|
||||||
movePlaylistItem(playlistItemId, newIndex) {
|
movePlaylistItem() {
|
||||||
// Do nothing.
|
// Do nothing.
|
||||||
return {
|
return {
|
||||||
result: 'noop'
|
result: 'noop'
|
||||||
|
@ -128,7 +128,7 @@ class QueueManager {
|
||||||
/**
|
/**
|
||||||
* Placeholder for original PlayQueueManager method.
|
* Placeholder for original PlayQueueManager method.
|
||||||
*/
|
*/
|
||||||
setRepeatMode(value) {
|
setRepeatMode() {
|
||||||
// Do nothing.
|
// Do nothing.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -142,7 +142,7 @@ class QueueManager {
|
||||||
/**
|
/**
|
||||||
* Placeholder for original PlayQueueManager method.
|
* Placeholder for original PlayQueueManager method.
|
||||||
*/
|
*/
|
||||||
setShuffleMode(value) {
|
setShuffleMode() {
|
||||||
// Do nothing.
|
// Do nothing.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ import layoutManager from '../layoutManager';
|
||||||
import '../../elements/emby-tabs/emby-tabs';
|
import '../../elements/emby-tabs/emby-tabs';
|
||||||
import { appRouter } from '../appRouter';
|
import { appRouter } from '../appRouter';
|
||||||
|
|
||||||
function onViewDestroy(e) {
|
function onViewDestroy() {
|
||||||
const tabControllers = this.tabControllers;
|
const tabControllers = this.tabControllers;
|
||||||
|
|
||||||
if (tabControllers) {
|
if (tabControllers) {
|
||||||
|
@ -78,7 +78,7 @@ class TabbedView {
|
||||||
|
|
||||||
view.addEventListener('viewbeforehide', this.onPause.bind(this));
|
view.addEventListener('viewbeforehide', this.onPause.bind(this));
|
||||||
|
|
||||||
view.addEventListener('viewbeforeshow', function (e) {
|
view.addEventListener('viewbeforeshow', function () {
|
||||||
mainTabsManager.setTabs(view, currentTabIndex, self.getTabs, getTabContainers, onBeforeTabChange, onTabChange, false);
|
mainTabsManager.setTabs(view, currentTabIndex, self.getTabs, getTabContainers, onBeforeTabChange, onTabChange, false);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -89,7 +89,7 @@ class TabbedView {
|
||||||
view.addEventListener('viewdestroy', onViewDestroy.bind(this));
|
view.addEventListener('viewdestroy', onViewDestroy.bind(this));
|
||||||
}
|
}
|
||||||
|
|
||||||
onResume(options) {
|
onResume() {
|
||||||
this.setTitle();
|
this.setTitle();
|
||||||
backdrop.clearBackdrop();
|
backdrop.clearBackdrop();
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,6 @@ import './formdialog.scss';
|
||||||
import '../elements/emby-button/emby-button';
|
import '../elements/emby-button/emby-button';
|
||||||
import '../elements/emby-itemscontainer/emby-itemscontainer';
|
import '../elements/emby-itemscontainer/emby-itemscontainer';
|
||||||
import './cardbuilder/card.scss';
|
import './cardbuilder/card.scss';
|
||||||
import ServerConnections from './ServerConnections';
|
|
||||||
|
|
||||||
const enableFocusTransform = !browser.slow && !browser.edge;
|
const enableFocusTransform = !browser.slow && !browser.edge;
|
||||||
|
|
||||||
|
@ -106,7 +105,7 @@ function renderDevices(view, devices) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function discoverDevices(view, apiClient) {
|
function discoverDevices(view) {
|
||||||
loading.show();
|
loading.show();
|
||||||
view.querySelector('.loadingContent').classList.remove('hide');
|
view.querySelector('.loadingContent').classList.remove('hide');
|
||||||
return ApiClient.getJSON(ApiClient.getUrl('LiveTv/Tuners/Discvover', {
|
return ApiClient.getJSON(ApiClient.getUrl('LiveTv/Tuners/Discvover', {
|
||||||
|
@ -120,7 +119,7 @@ function discoverDevices(view, apiClient) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function tunerPicker() {
|
function tunerPicker() {
|
||||||
this.show = function (options) {
|
this.show = function () {
|
||||||
const dialogOptions = {
|
const dialogOptions = {
|
||||||
removeOnClose: true,
|
removeOnClose: true,
|
||||||
scrollY: false
|
scrollY: false
|
||||||
|
@ -163,8 +162,7 @@ function tunerPicker() {
|
||||||
scrollHelper.centerFocus.on(dlg.querySelector('.formDialogContent'), false);
|
scrollHelper.centerFocus.on(dlg.querySelector('.formDialogContent'), false);
|
||||||
}
|
}
|
||||||
|
|
||||||
const apiClient = ServerConnections.getApiClient(options.serverId);
|
discoverDevices(dlg);
|
||||||
discoverDevices(dlg, apiClient);
|
|
||||||
|
|
||||||
if (layoutManager.tv) {
|
if (layoutManager.tv) {
|
||||||
scrollHelper.centerFocus.off(dlg.querySelector('.formDialogContent'), false);
|
scrollHelper.centerFocus.off(dlg.querySelector('.formDialogContent'), false);
|
||||||
|
|
|
@ -149,7 +149,7 @@ export default function (page, providerId, options) {
|
||||||
}),
|
}),
|
||||||
data: JSON.stringify(info),
|
data: JSON.stringify(info),
|
||||||
contentType: 'application/json'
|
contentType: 'application/json'
|
||||||
}).then(function (result) {
|
}).then(function () {
|
||||||
loading.hide();
|
loading.hide();
|
||||||
|
|
||||||
if (options.showConfirmation) {
|
if (options.showConfirmation) {
|
||||||
|
@ -190,7 +190,7 @@ export default function (page, providerId, options) {
|
||||||
}
|
}
|
||||||
|
|
||||||
loading.hide();
|
loading.hide();
|
||||||
}, function (result) {
|
}, function () {
|
||||||
Dashboard.alert({
|
Dashboard.alert({
|
||||||
message: globalize.translate('ErrorGettingTvLineups')
|
message: globalize.translate('ErrorGettingTvLineups')
|
||||||
});
|
});
|
||||||
|
|
|
@ -88,7 +88,7 @@ export default function (page, providerId, options) {
|
||||||
}),
|
}),
|
||||||
data: JSON.stringify(info),
|
data: JSON.stringify(info),
|
||||||
contentType: 'application/json'
|
contentType: 'application/json'
|
||||||
}).then(function (result) {
|
}).then(function () {
|
||||||
loading.hide();
|
loading.hide();
|
||||||
|
|
||||||
if (options.showConfirmation !== false) {
|
if (options.showConfirmation !== false) {
|
||||||
|
|
|
@ -119,7 +119,7 @@ import Dashboard from '../scripts/clientUtils';
|
||||||
function parseHtml(html, hasScript) {
|
function parseHtml(html, hasScript) {
|
||||||
if (hasScript) {
|
if (hasScript) {
|
||||||
html = replaceAll(html, '\x3c!--<script', '<script');
|
html = replaceAll(html, '\x3c!--<script', '<script');
|
||||||
html = replaceAll(html, '<\/script>--\x3e', '<\/script>');
|
html = replaceAll(html, '</script>--\x3e', '</script>');
|
||||||
}
|
}
|
||||||
|
|
||||||
const wrapper = document.createElement('div');
|
const wrapper = document.createElement('div');
|
||||||
|
|
|
@ -218,17 +218,17 @@ import confirm from '../../components/confirm/confirm';
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function renderInfo(view, sessions, forceUpdate) {
|
function renderInfo(view, sessions) {
|
||||||
sessions = filterSessions(sessions);
|
sessions = filterSessions(sessions);
|
||||||
renderActiveConnections(view, sessions);
|
renderActiveConnections(view, sessions);
|
||||||
loading.hide();
|
loading.hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
function pollForInfo(view, apiClient, forceUpdate) {
|
function pollForInfo(view, apiClient) {
|
||||||
apiClient.getSessions({
|
apiClient.getSessions({
|
||||||
ActiveWithinSeconds: 960
|
ActiveWithinSeconds: 960
|
||||||
}).then(function (sessions) {
|
}).then(function (sessions) {
|
||||||
renderInfo(view, sessions, forceUpdate);
|
renderInfo(view, sessions);
|
||||||
});
|
});
|
||||||
apiClient.getScheduledTasks().then(function (tasks) {
|
apiClient.getScheduledTasks().then(function (tasks) {
|
||||||
renderRunningTasks(view, tasks);
|
renderRunningTasks(view, tasks);
|
||||||
|
@ -730,7 +730,7 @@ import confirm from '../../components/confirm/confirm';
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
export default function (view, params) {
|
export default function (view) {
|
||||||
function onRestartRequired(evt, apiClient) {
|
function onRestartRequired(evt, apiClient) {
|
||||||
console.debug('onRestartRequired not implemented', evt, apiClient);
|
console.debug('onRestartRequired not implemented', evt, apiClient);
|
||||||
}
|
}
|
||||||
|
@ -745,14 +745,14 @@ import confirm from '../../components/confirm/confirm';
|
||||||
|
|
||||||
function onPackageInstalling(evt, apiClient) {
|
function onPackageInstalling(evt, apiClient) {
|
||||||
if (apiClient.serverId() === serverId) {
|
if (apiClient.serverId() === serverId) {
|
||||||
pollForInfo(view, apiClient, true);
|
pollForInfo(view, apiClient);
|
||||||
reloadSystemInfo(view, apiClient);
|
reloadSystemInfo(view, apiClient);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function onPackageInstallationCompleted(evt, apiClient) {
|
function onPackageInstallationCompleted(evt, apiClient) {
|
||||||
if (apiClient.serverId() === serverId) {
|
if (apiClient.serverId() === serverId) {
|
||||||
pollForInfo(view, apiClient, true);
|
pollForInfo(view, apiClient);
|
||||||
reloadSystemInfo(view, apiClient);
|
reloadSystemInfo(view, apiClient);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,7 +48,7 @@ import Dashboard from '../../../scripts/clientUtils';
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function (view, params) {
|
export default function (view) {
|
||||||
view.querySelector('form').addEventListener('submit', onSubmit);
|
view.querySelector('form').addEventListener('submit', onSubmit);
|
||||||
view.addEventListener('viewshow', loadData);
|
view.addEventListener('viewshow', loadData);
|
||||||
}
|
}
|
||||||
|
|
|
@ -149,7 +149,7 @@ import confirm from '../../../components/confirm/confirm';
|
||||||
}
|
}
|
||||||
|
|
||||||
const canEdit = ApiClient.isMinServerVersion('3.4.1.31');
|
const canEdit = ApiClient.isMinServerVersion('3.4.1.31');
|
||||||
export default function (view, params) {
|
export default function (view) {
|
||||||
view.querySelector('.devicesList').addEventListener('click', function (e) {
|
view.querySelector('.devicesList').addEventListener('click', function (e) {
|
||||||
const btnDeviceMenu = dom.parentWithClass(e.target, 'btnDeviceMenu');
|
const btnDeviceMenu = dom.parentWithClass(e.target, 'btnDeviceMenu');
|
||||||
|
|
||||||
|
|
|
@ -48,13 +48,13 @@ import alert from '../../components/alert';
|
||||||
loading.hide();
|
loading.hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
function onSaveEncodingPathFailure(response) {
|
function onSaveEncodingPathFailure() {
|
||||||
loading.hide();
|
loading.hide();
|
||||||
alert(globalize.translate('FFmpegSavePathNotFound'));
|
alert(globalize.translate('FFmpegSavePathNotFound'));
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateEncoder(form) {
|
function updateEncoder(form) {
|
||||||
return ApiClient.getSystemInfo().then(function (systemInfo) {
|
return ApiClient.getSystemInfo().then(function () {
|
||||||
return ApiClient.ajax({
|
return ApiClient.ajax({
|
||||||
url: ApiClient.getUrl('System/MediaEncoder/Path'),
|
url: ApiClient.getUrl('System/MediaEncoder/Path'),
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
|
|
|
@ -19,7 +19,6 @@ import alert from '../../components/alert';
|
||||||
$('#selectLocalizationLanguage', page).html(languageOptions.map(function (language) {
|
$('#selectLocalizationLanguage', page).html(languageOptions.map(function (language) {
|
||||||
return '<option value="' + language.Value + '">' + language.Name + '</option>';
|
return '<option value="' + language.Value + '">' + language.Name + '</option>';
|
||||||
})).val(config.UICulture);
|
})).val(config.UICulture);
|
||||||
currentLanguage = config.UICulture;
|
|
||||||
|
|
||||||
loading.hide();
|
loading.hide();
|
||||||
}
|
}
|
||||||
|
@ -34,16 +33,11 @@ import alert from '../../components/alert';
|
||||||
config.CachePath = form.querySelector('#txtCachePath').value;
|
config.CachePath = form.querySelector('#txtCachePath').value;
|
||||||
config.MetadataPath = $('#txtMetadataPath', form).val();
|
config.MetadataPath = $('#txtMetadataPath', form).val();
|
||||||
config.MetadataNetworkPath = $('#txtMetadataNetworkPath', form).val();
|
config.MetadataNetworkPath = $('#txtMetadataNetworkPath', form).val();
|
||||||
let requiresReload = config.UICulture !== currentLanguage;
|
|
||||||
ApiClient.updateServerConfiguration(config).then(function() {
|
ApiClient.updateServerConfiguration(config).then(function() {
|
||||||
ApiClient.getNamedConfiguration(brandingConfigKey).then(function(brandingConfig) {
|
ApiClient.getNamedConfiguration(brandingConfigKey).then(function(brandingConfig) {
|
||||||
brandingConfig.LoginDisclaimer = form.querySelector('#txtLoginDisclaimer').value;
|
brandingConfig.LoginDisclaimer = form.querySelector('#txtLoginDisclaimer').value;
|
||||||
brandingConfig.CustomCss = form.querySelector('#txtCustomCss').value;
|
brandingConfig.CustomCss = form.querySelector('#txtCustomCss').value;
|
||||||
|
|
||||||
if (currentBrandingOptions && brandingConfig.CustomCss !== currentBrandingOptions.CustomCss) {
|
|
||||||
requiresReload = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
ApiClient.updateNamedConfiguration(brandingConfigKey, brandingConfig).then(function () {
|
ApiClient.updateNamedConfiguration(brandingConfigKey, brandingConfig).then(function () {
|
||||||
Dashboard.processServerConfigurationUpdateResult();
|
Dashboard.processServerConfigurationUpdateResult();
|
||||||
});
|
});
|
||||||
|
@ -56,10 +50,8 @@ import alert from '../../components/alert';
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
let currentBrandingOptions;
|
|
||||||
let currentLanguage;
|
|
||||||
const brandingConfigKey = 'branding';
|
const brandingConfigKey = 'branding';
|
||||||
export default function (view, params) {
|
export default function (view) {
|
||||||
$('#btnSelectCachePath', view).on('click.selectDirectory', function () {
|
$('#btnSelectCachePath', view).on('click.selectDirectory', function () {
|
||||||
import('../../components/directorybrowser/directorybrowser').then(({default: directoryBrowser}) => {
|
import('../../components/directorybrowser/directorybrowser').then(({default: directoryBrowser}) => {
|
||||||
const picker = new directoryBrowser();
|
const picker = new directoryBrowser();
|
||||||
|
@ -110,7 +102,6 @@ import alert from '../../components/alert';
|
||||||
loadPage(view, responses[0], responses[1], responses[2]);
|
loadPage(view, responses[0], responses[1], responses[2]);
|
||||||
});
|
});
|
||||||
ApiClient.getNamedConfiguration(brandingConfigKey).then(function (config) {
|
ApiClient.getNamedConfiguration(brandingConfigKey).then(function (config) {
|
||||||
currentBrandingOptions = config;
|
|
||||||
view.querySelector('#txtLoginDisclaimer').value = config.LoginDisclaimer || '';
|
view.querySelector('#txtLoginDisclaimer').value = config.LoginDisclaimer || '';
|
||||||
view.querySelector('#txtCustomCss').value = config.CustomCss || '';
|
view.querySelector('#txtCustomCss').value = config.CustomCss || '';
|
||||||
});
|
});
|
||||||
|
|
|
@ -23,7 +23,7 @@ import Dashboard from '../../scripts/clientUtils';
|
||||||
}];
|
}];
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function(view, params) {
|
export default function(view) {
|
||||||
function loadData() {
|
function loadData() {
|
||||||
ApiClient.getServerConfiguration().then(function(config) {
|
ApiClient.getServerConfiguration().then(function(config) {
|
||||||
view.querySelector('.chkFolderView').checked = config.EnableFolderView;
|
view.querySelector('.chkFolderView').checked = config.EnableFolderView;
|
||||||
|
|
|
@ -6,7 +6,7 @@ import '../../assets/css/flexstyles.scss';
|
||||||
|
|
||||||
/* eslint-disable indent */
|
/* eslint-disable indent */
|
||||||
|
|
||||||
export default function(view, params) {
|
export default function(view) {
|
||||||
view.addEventListener('viewbeforeshow', function() {
|
view.addEventListener('viewbeforeshow', function() {
|
||||||
loading.show();
|
loading.show();
|
||||||
const apiClient = ApiClient;
|
const apiClient = ApiClient;
|
||||||
|
|
|
@ -31,13 +31,13 @@ import alert from '../../components/alert';
|
||||||
config.EnableExtraThumbsDuplication = form.querySelector('#chkEnableExtraThumbs').checked;
|
config.EnableExtraThumbsDuplication = form.querySelector('#chkEnableExtraThumbs').checked;
|
||||||
ApiClient.updateNamedConfiguration(metadataKey, config).then(function () {
|
ApiClient.updateNamedConfiguration(metadataKey, config).then(function () {
|
||||||
Dashboard.processServerConfigurationUpdateResult();
|
Dashboard.processServerConfigurationUpdateResult();
|
||||||
showConfirmMessage(config);
|
showConfirmMessage();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
function showConfirmMessage(config) {
|
function showConfirmMessage() {
|
||||||
const msg = [];
|
const msg = [];
|
||||||
msg.push(globalize.translate('MetadataSettingChangeHelp'));
|
msg.push(globalize.translate('MetadataSettingChangeHelp'));
|
||||||
alert({
|
alert({
|
||||||
|
|
|
@ -131,7 +131,7 @@ import alert from '../../components/alert';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function (view, params) {
|
export default function (view) {
|
||||||
function loadPage(page, config) {
|
function loadPage(page, config) {
|
||||||
page.querySelector('#txtPortNumber').value = config.HttpServerPortNumber;
|
page.querySelector('#txtPortNumber').value = config.HttpServerPortNumber;
|
||||||
page.querySelector('#txtPublicPort').value = config.PublicPort;
|
page.querySelector('#txtPublicPort').value = config.PublicPort;
|
||||||
|
@ -198,7 +198,7 @@ import alert from '../../components/alert';
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
view.querySelector('.dashboardHostingForm').addEventListener('submit', onSubmit);
|
view.querySelector('.dashboardHostingForm').addEventListener('submit', onSubmit);
|
||||||
view.addEventListener('viewshow', function (e) {
|
view.addEventListener('viewshow', function () {
|
||||||
loading.show();
|
loading.show();
|
||||||
ApiClient.getNamedConfiguration('network').then(function (config) {
|
ApiClient.getNamedConfiguration('network').then(function (config) {
|
||||||
loadPage(view, config);
|
loadPage(view, config);
|
||||||
|
|
|
@ -91,7 +91,7 @@ function save(page) {
|
||||||
}).map(function (c) {
|
}).map(function (c) {
|
||||||
return c.getAttribute('data-itemid');
|
return c.getAttribute('data-itemid');
|
||||||
});
|
});
|
||||||
ApiClient.updateNamedConfiguration(notificationsConfigurationKey, notificationOptions).then(function (r) {
|
ApiClient.updateNamedConfiguration(notificationsConfigurationKey, notificationOptions).then(function () {
|
||||||
Dashboard.processServerConfigurationUpdateResult();
|
Dashboard.processServerConfigurationUpdateResult();
|
||||||
Dashboard.navigate('notificationsettings.html');
|
Dashboard.navigate('notificationsettings.html');
|
||||||
});
|
});
|
||||||
|
|
|
@ -54,7 +54,7 @@ function reload(page) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function (view, params) {
|
export default function (view) {
|
||||||
view.addEventListener('viewshow', function () {
|
view.addEventListener('viewshow', function () {
|
||||||
reload(view);
|
reload(view);
|
||||||
});
|
});
|
||||||
|
|
|
@ -19,7 +19,7 @@ function reloadList(page) {
|
||||||
noneElement: page.querySelector('#none'),
|
noneElement: page.querySelector('#none'),
|
||||||
repositories: repositories
|
repositories: repositories
|
||||||
});
|
});
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
console.error('error loading repositories');
|
console.error('error loading repositories');
|
||||||
page.querySelector('#none').classList.remove('hide');
|
page.querySelector('#none').classList.remove('hide');
|
||||||
loading.hide();
|
loading.hide();
|
||||||
|
@ -33,9 +33,9 @@ function saveList(page) {
|
||||||
url: ApiClient.getUrl('Repositories'),
|
url: ApiClient.getUrl('Repositories'),
|
||||||
data: JSON.stringify(repositories),
|
data: JSON.stringify(repositories),
|
||||||
contentType: 'application/json'
|
contentType: 'application/json'
|
||||||
}).then(response => {
|
}).then(() => {
|
||||||
reloadList(page);
|
reloadList(page);
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
console.error('error saving repositories');
|
console.error('error saving repositories');
|
||||||
loading.hide();
|
loading.hide();
|
||||||
});
|
});
|
||||||
|
@ -90,7 +90,7 @@ function getTabs() {
|
||||||
}];
|
}];
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function(view, params) {
|
export default function(view) {
|
||||||
view.addEventListener('viewshow', function () {
|
view.addEventListener('viewshow', function () {
|
||||||
libraryMenu.setTabs('plugins', 2, getTabs);
|
libraryMenu.setTabs('plugins', 2, getTabs);
|
||||||
reloadList(this);
|
reloadList(this);
|
||||||
|
|
|
@ -207,7 +207,7 @@ import confirm from '../../../components/confirm/confirm';
|
||||||
return trigger;
|
return trigger;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
export default function (view, params) {
|
export default function (view) {
|
||||||
function onSubmit(e) {
|
function onSubmit(e) {
|
||||||
loading.show();
|
loading.show();
|
||||||
const id = getParameterByName('id');
|
const id = getParameterByName('id');
|
||||||
|
|
|
@ -123,7 +123,7 @@ import '../../../elements/emby-button/emby-button';
|
||||||
$(elem).parents('.listItem')[0].setAttribute('data-status', state);
|
$(elem).parents('.listItem')[0].setAttribute('data-status', state);
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function(view, params) {
|
export default function(view) {
|
||||||
function updateTasks(tasks) {
|
function updateTasks(tasks) {
|
||||||
for (let i = 0; i < tasks.length; i++) {
|
for (let i = 0; i < tasks.length; i++) {
|
||||||
const task = tasks[i];
|
const task = tasks[i];
|
||||||
|
|
|
@ -108,7 +108,7 @@ import toast from '../../../components/toast/toast';
|
||||||
loading.hide();
|
loading.hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
function onSaveComplete(page, user) {
|
function onSaveComplete() {
|
||||||
Dashboard.navigate('userprofiles.html');
|
Dashboard.navigate('userprofiles.html');
|
||||||
loading.hide();
|
loading.hide();
|
||||||
toast(globalize.translate('SettingsSaved'));
|
toast(globalize.translate('SettingsSaved'));
|
||||||
|
@ -146,7 +146,7 @@ import toast from '../../../components/toast/toast';
|
||||||
}
|
}
|
||||||
ApiClient.updateUser(user).then(function () {
|
ApiClient.updateUser(user).then(function () {
|
||||||
ApiClient.updateUserPolicy(user.Id, user.Policy).then(function () {
|
ApiClient.updateUserPolicy(user.Id, user.Policy).then(function () {
|
||||||
onSaveComplete(page, user);
|
onSaveComplete();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -91,7 +91,7 @@ import toast from '../../../components/toast/toast';
|
||||||
loading.hide();
|
loading.hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
function onSaveComplete(page) {
|
function onSaveComplete() {
|
||||||
loading.hide();
|
loading.hide();
|
||||||
toast(globalize.translate('SettingsSaved'));
|
toast(globalize.translate('SettingsSaved'));
|
||||||
}
|
}
|
||||||
|
@ -118,7 +118,7 @@ import toast from '../../../components/toast/toast';
|
||||||
user.Policy.BlockedChannels = null;
|
user.Policy.BlockedChannels = null;
|
||||||
user.Policy.BlockedMediaFolders = null;
|
user.Policy.BlockedMediaFolders = null;
|
||||||
ApiClient.updateUserPolicy(user.Id, user.Policy).then(function () {
|
ApiClient.updateUserPolicy(user.Id, user.Policy).then(function () {
|
||||||
onSaveComplete(page);
|
onSaveComplete();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -89,7 +89,7 @@ import toast from '../../../components/toast/toast';
|
||||||
ApiClient.updateUserPolicy(user.Id, user.Policy).then(function () {
|
ApiClient.updateUserPolicy(user.Id, user.Policy).then(function () {
|
||||||
Dashboard.navigate('useredit.html?userId=' + user.Id);
|
Dashboard.navigate('useredit.html?userId=' + user.Id);
|
||||||
});
|
});
|
||||||
}, function (response) {
|
}, function () {
|
||||||
toast(globalize.translate('ErrorDefault'));
|
toast(globalize.translate('ErrorDefault'));
|
||||||
loading.hide();
|
loading.hide();
|
||||||
});
|
});
|
||||||
|
|
|
@ -161,7 +161,7 @@ import toast from '../../../components/toast/toast';
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function onSaveComplete(page) {
|
function onSaveComplete() {
|
||||||
loading.hide();
|
loading.hide();
|
||||||
toast(globalize.translate('SettingsSaved'));
|
toast(globalize.translate('SettingsSaved'));
|
||||||
}
|
}
|
||||||
|
@ -176,7 +176,7 @@ import toast from '../../../components/toast/toast';
|
||||||
user.Policy.AccessSchedules = getSchedulesFromPage(page);
|
user.Policy.AccessSchedules = getSchedulesFromPage(page);
|
||||||
user.Policy.BlockedTags = getBlockedTagsFromPage(page);
|
user.Policy.BlockedTags = getBlockedTagsFromPage(page);
|
||||||
ApiClient.updateUserPolicy(user.Id, user.Policy).then(function () {
|
ApiClient.updateUserPolicy(user.Id, user.Policy).then(function () {
|
||||||
onSaveComplete(page);
|
onSaveComplete();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -82,7 +82,7 @@ import cardBuilder from '../../../components/cardbuilder/cardBuilder';
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function getUserHtml(user, addConnectIndicator) {
|
function getUserHtml(user) {
|
||||||
let html = '';
|
let html = '';
|
||||||
let cssClass = 'card squareCard scalableCard squareCard-scalable';
|
let cssClass = 'card squareCard scalableCard squareCard-scalable';
|
||||||
|
|
||||||
|
@ -146,14 +146,14 @@ import cardBuilder from '../../../components/cardbuilder/cardBuilder';
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
function getUserSectionHtml(users, addConnectIndicator) {
|
function getUserSectionHtml(users) {
|
||||||
return users.map(function (u__q) {
|
return users.map(function (u__q) {
|
||||||
return getUserHtml(u__q, addConnectIndicator);
|
return getUserHtml(u__q);
|
||||||
}).join('');
|
}).join('');
|
||||||
}
|
}
|
||||||
|
|
||||||
function renderUsers(page, users) {
|
function renderUsers(page, users) {
|
||||||
page.querySelector('.localUsers').innerHTML = getUserSectionHtml(users, true);
|
page.querySelector('.localUsers').innerHTML = getUserSectionHtml(users);
|
||||||
}
|
}
|
||||||
|
|
||||||
function loadData(page) {
|
function loadData(page) {
|
||||||
|
|
|
@ -14,7 +14,7 @@ function reload(context, itemId) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function (view, params) {
|
export default function (view) {
|
||||||
view.addEventListener('viewshow', function () {
|
view.addEventListener('viewshow', function () {
|
||||||
reload(this, MetadataEditor.getCurrentItemId());
|
reload(this, MetadataEditor.getCurrentItemId());
|
||||||
});
|
});
|
||||||
|
|
|
@ -1795,7 +1795,7 @@ function renderMusicVideos(page, item, user) {
|
||||||
}).then(function (result) {
|
}).then(function (result) {
|
||||||
if (result.Items.length) {
|
if (result.Items.length) {
|
||||||
page.querySelector('#musicVideosCollapsible').classList.remove('hide');
|
page.querySelector('#musicVideosCollapsible').classList.remove('hide');
|
||||||
const musicVideosContent = page.querySelector('.musicVideosContent');
|
const musicVideosContent = page.querySelector('#musicVideosContent');
|
||||||
musicVideosContent.innerHTML = getVideosHtml(result.Items);
|
musicVideosContent.innerHTML = getVideosHtml(result.Items);
|
||||||
imageLoader.lazyChildren(musicVideosContent);
|
imageLoader.lazyChildren(musicVideosContent);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -817,7 +817,7 @@ class ItemsView {
|
||||||
itemsContainer: self.itemsContainer
|
itemsContainer: self.itemsContainer
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
view.addEventListener('viewhide', function (e) {
|
view.addEventListener('viewhide', function () {
|
||||||
const itemsContainer = self.itemsContainer;
|
const itemsContainer = self.itemsContainer;
|
||||||
|
|
||||||
if (itemsContainer) {
|
if (itemsContainer) {
|
||||||
|
|
|
@ -104,7 +104,7 @@ export default function (view, params, tabContent) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function reloadItems(context, save) {
|
function reloadItems(context) {
|
||||||
loading.show();
|
loading.show();
|
||||||
isLoading = true;
|
isLoading = true;
|
||||||
const query = getQuery();
|
const query = getQuery();
|
||||||
|
|
|
@ -64,7 +64,7 @@ function renderRecordingFolders(context, promise) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function onMoreClick(e) {
|
function onMoreClick() {
|
||||||
const type = this.getAttribute('data-type');
|
const type = this.getAttribute('data-type');
|
||||||
const serverId = ApiClient.serverId();
|
const serverId = ApiClient.serverId();
|
||||||
|
|
||||||
|
|
|
@ -246,7 +246,7 @@ function addProvider(button) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function addDevice(button) {
|
function addDevice() {
|
||||||
Dashboard.navigate('livetvtuner.html');
|
Dashboard.navigate('livetvtuner.html');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -296,7 +296,7 @@ function onDevicesListClick(e) {
|
||||||
$(document).on('pageinit', '#liveTvStatusPage', function () {
|
$(document).on('pageinit', '#liveTvStatusPage', function () {
|
||||||
const page = this;
|
const page = this;
|
||||||
$('.btnAddDevice', page).on('click', function () {
|
$('.btnAddDevice', page).on('click', function () {
|
||||||
addDevice(this);
|
addDevice();
|
||||||
});
|
});
|
||||||
$('.formAddDevice', page).on('submit', function () {
|
$('.formAddDevice', page).on('submit', function () {
|
||||||
submitAddDeviceForm(page);
|
submitAddDeviceForm(page);
|
||||||
|
|
|
@ -91,7 +91,7 @@ function submitForm(page) {
|
||||||
url: ApiClient.getUrl('LiveTv/TunerHosts'),
|
url: ApiClient.getUrl('LiveTv/TunerHosts'),
|
||||||
data: JSON.stringify(info),
|
data: JSON.stringify(info),
|
||||||
contentType: 'application/json'
|
contentType: 'application/json'
|
||||||
}).then(function (result) {
|
}).then(function () {
|
||||||
Dashboard.processServerConfigurationUpdateResult();
|
Dashboard.processServerConfigurationUpdateResult();
|
||||||
Dashboard.navigate('livetvstatus.html');
|
Dashboard.navigate('livetvstatus.html');
|
||||||
}, function () {
|
}, function () {
|
||||||
|
|
|
@ -155,7 +155,7 @@ import Dashboard from '../../scripts/clientUtils';
|
||||||
return html;
|
return html;
|
||||||
}
|
}
|
||||||
|
|
||||||
function loadSuggestions(page, userId, parentId) {
|
function loadSuggestions(page, userId) {
|
||||||
const screenWidth = dom.getWindowSize().innerWidth;
|
const screenWidth = dom.getWindowSize().innerWidth;
|
||||||
const url = ApiClient.getUrl('Movies/Recommendations', {
|
const url = ApiClient.getUrl('Movies/Recommendations', {
|
||||||
userId: userId,
|
userId: userId,
|
||||||
|
@ -222,7 +222,7 @@ import Dashboard from '../../scripts/clientUtils';
|
||||||
const userId = ApiClient.getCurrentUserId();
|
const userId = ApiClient.getCurrentUserId();
|
||||||
loadResume(tabContent, userId, parentId);
|
loadResume(tabContent, userId, parentId);
|
||||||
loadLatest(tabContent, userId, parentId);
|
loadLatest(tabContent, userId, parentId);
|
||||||
loadSuggestions(tabContent, userId, parentId);
|
loadSuggestions(tabContent, userId);
|
||||||
}
|
}
|
||||||
|
|
||||||
function getTabs() {
|
function getTabs() {
|
||||||
|
@ -389,7 +389,7 @@ import Dashboard from '../../scripts/clientUtils';
|
||||||
|
|
||||||
const tabControllers = [];
|
const tabControllers = [];
|
||||||
let renderedTabs = [];
|
let renderedTabs = [];
|
||||||
view.addEventListener('viewshow', function (e) {
|
view.addEventListener('viewshow', function () {
|
||||||
initTabs();
|
initTabs();
|
||||||
if (!view.getAttribute('data-title')) {
|
if (!view.getAttribute('data-title')) {
|
||||||
const parentId = params.topParentId;
|
const parentId = params.topParentId;
|
||||||
|
|
|
@ -24,7 +24,7 @@ import '../../elements/emby-itemscontainer/emby-itemscontainer';
|
||||||
function shuffle() {
|
function shuffle() {
|
||||||
ApiClient.getItem(ApiClient.getCurrentUserId(), params.topParentId).then(function (item) {
|
ApiClient.getItem(ApiClient.getCurrentUserId(), params.topParentId).then(function (item) {
|
||||||
getQuery();
|
getQuery();
|
||||||
playbackManager.shuffle(item, null);
|
playbackManager.shuffle(item);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -84,7 +84,7 @@ import '../../elements/emby-itemscontainer/emby-itemscontainer';
|
||||||
itemsContainer.innerHTML = '';
|
itemsContainer.innerHTML = '';
|
||||||
};
|
};
|
||||||
|
|
||||||
const reloadItems = (page) => {
|
const reloadItems = () => {
|
||||||
loading.show();
|
loading.show();
|
||||||
isLoading = true;
|
isLoading = true;
|
||||||
const query = getQuery();
|
const query = getQuery();
|
||||||
|
@ -97,7 +97,7 @@ import '../../elements/emby-itemscontainer/emby-itemscontainer';
|
||||||
if (userSettings.libraryPageSize() > 0) {
|
if (userSettings.libraryPageSize() > 0) {
|
||||||
query.StartIndex += query.Limit;
|
query.StartIndex += query.Limit;
|
||||||
}
|
}
|
||||||
reloadItems(tabContent);
|
reloadItems();
|
||||||
}
|
}
|
||||||
|
|
||||||
function onPreviousPageClick() {
|
function onPreviousPageClick() {
|
||||||
|
@ -108,11 +108,11 @@ import '../../elements/emby-itemscontainer/emby-itemscontainer';
|
||||||
if (userSettings.libraryPageSize() > 0) {
|
if (userSettings.libraryPageSize() > 0) {
|
||||||
query.StartIndex = Math.max(0, query.StartIndex - query.Limit);
|
query.StartIndex = Math.max(0, query.StartIndex - query.Limit);
|
||||||
}
|
}
|
||||||
reloadItems(tabContent);
|
reloadItems();
|
||||||
}
|
}
|
||||||
|
|
||||||
window.scrollTo(0, 0);
|
window.scrollTo(0, 0);
|
||||||
updateFilterControls(page);
|
updateFilterControls();
|
||||||
let html;
|
let html;
|
||||||
const pagingHtml = libraryBrowser.getQueryPagingHtml({
|
const pagingHtml = libraryBrowser.getQueryPagingHtml({
|
||||||
startIndex: query.StartIndex,
|
startIndex: query.StartIndex,
|
||||||
|
@ -185,7 +185,7 @@ import '../../elements/emby-itemscontainer/emby-itemscontainer';
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const updateFilterControls = (tabContent) => {
|
const updateFilterControls = () => {
|
||||||
const query = getQuery();
|
const query = getQuery();
|
||||||
|
|
||||||
if (this.alphaPicker) {
|
if (this.alphaPicker) {
|
||||||
|
@ -212,7 +212,7 @@ import '../../elements/emby-itemscontainer/emby-itemscontainer';
|
||||||
});
|
});
|
||||||
Events.on(filterDialog, 'filterchange', function () {
|
Events.on(filterDialog, 'filterchange', function () {
|
||||||
getQuery().StartIndex = 0;
|
getQuery().StartIndex = 0;
|
||||||
reloadItems(tabContent);
|
reloadItems();
|
||||||
});
|
});
|
||||||
|
|
||||||
filterDialog.show();
|
filterDialog.show();
|
||||||
|
@ -232,7 +232,7 @@ import '../../elements/emby-itemscontainer/emby-itemscontainer';
|
||||||
const query = getQuery();
|
const query = getQuery();
|
||||||
query.NameStartsWith = newValue;
|
query.NameStartsWith = newValue;
|
||||||
query.StartIndex = 0;
|
query.StartIndex = 0;
|
||||||
reloadItems(tabContent);
|
reloadItems();
|
||||||
});
|
});
|
||||||
|
|
||||||
this.alphaPicker = new AlphaPicker({
|
this.alphaPicker = new AlphaPicker({
|
||||||
|
@ -274,7 +274,7 @@ import '../../elements/emby-itemscontainer/emby-itemscontainer';
|
||||||
}],
|
}],
|
||||||
callback: function () {
|
callback: function () {
|
||||||
getQuery().StartIndex = 0;
|
getQuery().StartIndex = 0;
|
||||||
reloadItems(tabContent);
|
reloadItems();
|
||||||
},
|
},
|
||||||
query: getQuery(),
|
query: getQuery(),
|
||||||
button: e.target
|
button: e.target
|
||||||
|
@ -292,7 +292,7 @@ import '../../elements/emby-itemscontainer/emby-itemscontainer';
|
||||||
libraryBrowser.saveViewSetting(getSavedQueryKey(), viewStyle);
|
libraryBrowser.saveViewSetting(getSavedQueryKey(), viewStyle);
|
||||||
getQuery().StartIndex = 0;
|
getQuery().StartIndex = 0;
|
||||||
onViewStyleChange();
|
onViewStyleChange();
|
||||||
reloadItems(tabContent);
|
reloadItems();
|
||||||
});
|
});
|
||||||
|
|
||||||
tabContent.querySelector('.btnPlayAll').addEventListener('click', playAll);
|
tabContent.querySelector('.btnPlayAll').addEventListener('click', playAll);
|
||||||
|
@ -303,8 +303,8 @@ import '../../elements/emby-itemscontainer/emby-itemscontainer';
|
||||||
onViewStyleChange();
|
onViewStyleChange();
|
||||||
|
|
||||||
this.renderTab = function () {
|
this.renderTab = function () {
|
||||||
reloadItems(tabContent);
|
reloadItems();
|
||||||
updateFilterControls(tabContent);
|
updateFilterControls();
|
||||||
};
|
};
|
||||||
|
|
||||||
this.destroy = function () {};
|
this.destroy = function () {};
|
||||||
|
|
|
@ -373,7 +373,7 @@ import Dashboard from '../../scripts/clientUtils';
|
||||||
|
|
||||||
const tabControllers = [];
|
const tabControllers = [];
|
||||||
const renderedTabs = [];
|
const renderedTabs = [];
|
||||||
view.addEventListener('viewshow', function (e) {
|
view.addEventListener('viewshow', function () {
|
||||||
initTabs();
|
initTabs();
|
||||||
if (!view.getAttribute('data-title')) {
|
if (!view.getAttribute('data-title')) {
|
||||||
const parentId = params.topParentId;
|
const parentId = params.topParentId;
|
||||||
|
@ -391,10 +391,10 @@ import Dashboard from '../../scripts/clientUtils';
|
||||||
|
|
||||||
inputManager.on(window, onInputCommand);
|
inputManager.on(window, onInputCommand);
|
||||||
});
|
});
|
||||||
view.addEventListener('viewbeforehide', function (e) {
|
view.addEventListener('viewbeforehide', function () {
|
||||||
inputManager.off(window, onInputCommand);
|
inputManager.off(window, onInputCommand);
|
||||||
});
|
});
|
||||||
view.addEventListener('viewdestroy', function (e) {
|
view.addEventListener('viewdestroy', function () {
|
||||||
tabControllers.forEach(function (t) {
|
tabControllers.forEach(function (t) {
|
||||||
if (t.destroy) {
|
if (t.destroy) {
|
||||||
t.destroy();
|
t.destroy();
|
||||||
|
|
|
@ -2,17 +2,17 @@ import remotecontrolFactory from '../../../components/remotecontrol/remotecontro
|
||||||
import libraryMenu from '../../../scripts/libraryMenu';
|
import libraryMenu from '../../../scripts/libraryMenu';
|
||||||
import '../../../elements/emby-button/emby-button';
|
import '../../../elements/emby-button/emby-button';
|
||||||
|
|
||||||
export default function (view, params) {
|
export default function (view) {
|
||||||
const remoteControl = new remotecontrolFactory();
|
const remoteControl = new remotecontrolFactory();
|
||||||
remoteControl.init(view, view.querySelector('.remoteControlContent'));
|
remoteControl.init(view, view.querySelector('.remoteControlContent'));
|
||||||
view.addEventListener('viewshow', function (e) {
|
view.addEventListener('viewshow', function () {
|
||||||
libraryMenu.setTransparentMenu(true);
|
libraryMenu.setTransparentMenu(true);
|
||||||
|
|
||||||
if (remoteControl) {
|
if (remoteControl) {
|
||||||
remoteControl.onShow();
|
remoteControl.onShow();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
view.addEventListener('viewbeforehide', function (e) {
|
view.addEventListener('viewbeforehide', function () {
|
||||||
libraryMenu.setTransparentMenu(false);
|
libraryMenu.setTransparentMenu(false);
|
||||||
|
|
||||||
if (remoteControl) {
|
if (remoteControl) {
|
||||||
|
|
|
@ -28,7 +28,7 @@ import { appRouter } from '../../../components/appRouter';
|
||||||
return document.querySelector('.dialogContainer .dialog.opened');
|
return document.querySelector('.dialogContainer .dialog.opened');
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function (view, params) {
|
export default function (view) {
|
||||||
function getDisplayItem(item) {
|
function getDisplayItem(item) {
|
||||||
if (item.Type === 'TvChannel') {
|
if (item.Type === 'TvChannel') {
|
||||||
const apiClient = ServerConnections.getApiClient(item.ServerId);
|
const apiClient = ServerConnections.getApiClient(item.ServerId);
|
||||||
|
@ -426,18 +426,18 @@ import { appRouter } from '../../../components/appRouter';
|
||||||
if (state.NowPlayingItem) {
|
if (state.NowPlayingItem) {
|
||||||
isEnabled = true;
|
isEnabled = true;
|
||||||
updatePlayerStateInternal(event, player, state);
|
updatePlayerStateInternal(event, player, state);
|
||||||
updatePlaylist(player);
|
updatePlaylist();
|
||||||
enableStopOnBack(true);
|
enableStopOnBack(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function onPlayPauseStateChanged(e) {
|
function onPlayPauseStateChanged() {
|
||||||
if (isEnabled) {
|
if (isEnabled) {
|
||||||
updatePlayPauseState(this.paused());
|
updatePlayPauseState(this.paused());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function onVolumeChanged(e) {
|
function onVolumeChanged() {
|
||||||
if (isEnabled) {
|
if (isEnabled) {
|
||||||
const player = this;
|
const player = this;
|
||||||
updatePlayerVolumeState(player, player.isMuted(), player.getVolume());
|
updatePlayerVolumeState(player, player.isMuted(), player.getVolume());
|
||||||
|
@ -472,7 +472,7 @@ import { appRouter } from '../../../components/appRouter';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function onMediaStreamsChanged(e) {
|
function onMediaStreamsChanged() {
|
||||||
const player = this;
|
const player = this;
|
||||||
const state = playbackManager.getPlayerState(player);
|
const state = playbackManager.getPlayerState(player);
|
||||||
onStateChanged.call(player, {
|
onStateChanged.call(player, {
|
||||||
|
@ -534,7 +534,7 @@ import { appRouter } from '../../../components/appRouter';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function onTimeUpdate(e) {
|
function onTimeUpdate() {
|
||||||
// Test for 'currentItem' is required for Firefox since its player spams 'timeupdate' events even being at breakpoint
|
// Test for 'currentItem' is required for Firefox since its player spams 'timeupdate' events even being at breakpoint
|
||||||
if (isEnabled && currentItem) {
|
if (isEnabled && currentItem) {
|
||||||
const now = new Date().getTime();
|
const now = new Date().getTime();
|
||||||
|
@ -794,7 +794,7 @@ import { appRouter } from '../../../components/appRouter';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function updatePlaylist(player) {
|
function updatePlaylist() {
|
||||||
const btnPreviousTrack = view.querySelector('.btnPreviousTrack');
|
const btnPreviousTrack = view.querySelector('.btnPreviousTrack');
|
||||||
const btnNextTrack = view.querySelector('.btnNextTrack');
|
const btnNextTrack = view.querySelector('.btnNextTrack');
|
||||||
btnPreviousTrack.classList.remove('hide');
|
btnPreviousTrack.classList.remove('hide');
|
||||||
|
@ -818,7 +818,7 @@ import { appRouter } from '../../../components/appRouter';
|
||||||
elem.innerHTML = html;
|
elem.innerHTML = html;
|
||||||
}
|
}
|
||||||
|
|
||||||
function onSettingsButtonClick(e) {
|
function onSettingsButtonClick() {
|
||||||
const btn = this;
|
const btn = this;
|
||||||
|
|
||||||
import('../../../components/playback/playersettingsmenu').then((playerSettingsMenu) => {
|
import('../../../components/playback/playersettingsmenu').then((playerSettingsMenu) => {
|
||||||
|
@ -1261,11 +1261,11 @@ import { appRouter } from '../../../components/appRouter';
|
||||||
nowPlayingPositionSlider.classList.add('focusable');
|
nowPlayingPositionSlider.classList.add('focusable');
|
||||||
}
|
}
|
||||||
|
|
||||||
view.addEventListener('viewbeforeshow', function (e) {
|
view.addEventListener('viewbeforeshow', function () {
|
||||||
headerElement.classList.add('osdHeader');
|
headerElement.classList.add('osdHeader');
|
||||||
appRouter.setTransparency('full');
|
appRouter.setTransparency('full');
|
||||||
});
|
});
|
||||||
view.addEventListener('viewshow', function (e) {
|
view.addEventListener('viewshow', function () {
|
||||||
try {
|
try {
|
||||||
Events.on(playbackManager, 'playerchange', onPlayerChange);
|
Events.on(playbackManager, 'playerchange', onPlayerChange);
|
||||||
bindToPlayer(playbackManager.getCurrentPlayer());
|
bindToPlayer(playbackManager.getCurrentPlayer());
|
||||||
|
|
|
@ -49,7 +49,7 @@ import ServerConnections from '../../../components/ServerConnections';
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function(view, params) {
|
export default function(view) {
|
||||||
view.querySelector('.addServerForm').addEventListener('submit', onServerSubmit);
|
view.querySelector('.addServerForm').addEventListener('submit', onServerSubmit);
|
||||||
view.querySelector('.btnCancel').addEventListener('click', goBack);
|
view.querySelector('.btnCancel').addEventListener('click', goBack);
|
||||||
|
|
||||||
|
@ -64,7 +64,7 @@ import ServerConnections from '../../../components/ServerConnections';
|
||||||
}
|
}
|
||||||
|
|
||||||
function goBack() {
|
function goBack() {
|
||||||
import('../../../components/appRouter').then(({default: appRouter}) => {
|
import('../../../components/appRouter').then(({appRouter}) => {
|
||||||
appRouter.back();
|
appRouter.back();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,7 +36,7 @@ import Dashboard from '../../../scripts/clientUtils';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function (view, params) {
|
export default function (view) {
|
||||||
function onSubmit(e) {
|
function onSubmit(e) {
|
||||||
ApiClient.ajax({
|
ApiClient.ajax({
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue