Merge main changes. (#1446)

* localisation for mediaitem context menu

* fixes removing songs issue #1442

* aids formatting no more

* ok

* stop
[ci skip]

* ci test

* stop it

* Prettified Code!

* prettier update

* chore: Prettified Code
 [ci skip]

* shit

* chore: Prettified Code
 [ci skip]

* Update stale-issues.yml

[ci skip]

* Fix LastFM Filter Types

* localisation for misc notifications

* auto language on oobe

* auto language on oobe

* attempt at fixing #982

* and this just annoys me
[ci skip]

* crowdin action

* oops

* Remove from playlist icon

* duplicate item prompt on adding songs to playlist

* moved function outside to stop redefine
[ci skip]

* add playing class to album artwork

* Play button for mediaitem-smarthints (#1445)

Co-authored-by: Core <core@coredev.uk>
Co-authored-by: coredev-uk <coredev-uk@users.noreply.github.com>
Co-authored-by: yazninja <yazlesean@gmail.com>
Co-authored-by: Monochromish <79590499+Monochromish@users.noreply.github.com>
This commit is contained in:
cryptofyre 2022-09-19 11:13:19 -05:00 committed by GitHub
parent bba3f80f53
commit 4b65480db5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
27 changed files with 341 additions and 437 deletions

View file

@ -11,7 +11,7 @@ jobs:
strategy: strategy:
matrix: matrix:
node-version: [ 18 ] node-version: [18]
permissions: permissions:
contents: write contents: write
@ -31,7 +31,7 @@ jobs:
uses: actions/setup-node@v2 uses: actions/setup-node@v2
with: with:
node-version: ${{ matrix.node-version }} node-version: ${{ matrix.node-version }}
cache: 'pnpm' cache: "pnpm"
- name: Update lockfile - name: Update lockfile
run: pnpm i --lockfile-only run: pnpm i --lockfile-only
@ -48,7 +48,7 @@ jobs:
strategy: strategy:
matrix: matrix:
node-version: [ 18 ] node-version: [18]
permissions: permissions:
contents: write contents: write
@ -61,7 +61,7 @@ jobs:
ref: ${{ github.head_ref }} ref: ${{ github.head_ref }}
- name: Prettify code - name: Prettify code
run: npm run prettier run: npm run format:write
- name: Commit Prettier Code - name: Commit Prettier Code
uses: stefanzweifel/git-auto-commit-action@v4.14.1 uses: stefanzweifel/git-auto-commit-action@v4.14.1
@ -69,3 +69,21 @@ jobs:
commit_message: "chore: Prettified Code\n [ci skip]" commit_message: "chore: Prettified Code\n [ci skip]"
commit_user_name: "cider-chore[bot]" commit_user_name: "cider-chore[bot]"
commit_user_email: "cider-chore[bot]@users.noreply.github.com" commit_user_email: "cider-chore[bot]@users.noreply.github.com"
synchronize-with-crowdin:
runs-on: ubuntu-latest
if: ${{ false }} # disable for now
steps:
- name: Checkout
uses: actions/checkout@v3
- name: crowdin action
uses: crowdin/github-action@1.4.13
with:
upload_translations: true
download_translations: true
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}

View file

@ -19,4 +19,4 @@ jobs:
stale-issue-label: "stale" stale-issue-label: "stale"
stale-pr-label: "stale" stale-pr-label: "stale"
exempt-all-assignees: true exempt-all-assignees: true
exempt-issue-labels: 'more-info,work-in-progress,accessibility-feature,help-wanted' exempt-issue-labels: 'more-info,work-in-progress,accessibility-feature,help-wanted,persist'

View file

@ -1,4 +1,4 @@
src/renderer/apple-hls* src/renderer/*hls*.js
build/* build/*
src/renderer/lib/* src/renderer/lib/*
*.min.* *.min.*

View file

@ -1,2 +1,13 @@
bracketSameLine: true {
printWidth: 240 "printWidth": 600,
"singleAttributePerLine": true,
"bracketSameLine": true,
"overrides": [
{
"files": "src/renderer/main/**/*.js",
"options": {
"singleAttributePerLine": false
}
}
]
}

View file

@ -37,7 +37,8 @@
"msft": "npm run build && electron-builder -c msft-package.json", "msft": "npm run build && electron-builder -c msft-package.json",
"mstest": "npm run build && electron-builder -c msft-test.json", "mstest": "npm run build && electron-builder -c msft-test.json",
"postinstall": "electron-builder install-app-deps", "postinstall": "electron-builder install-app-deps",
"prettier": "npx prettier --write '**/*.{js,json,ts,css,less}'" "format:check": "npx prettier --check \"src/**/*.{js,json,ts,less}\"",
"format:write": "npx prettier --write \"src/**/*.{js,json,ts,less}\""
}, },
"dependencies": { "dependencies": {
"@sentry/electron": "^4.0.2", "@sentry/electron": "^4.0.2",

View file

@ -10,6 +10,7 @@
"notification.updatingLibrarySongs": "Updating library songs...", "notification.updatingLibrarySongs": "Updating library songs...",
"notification.updatingLibraryAlbums": "Updating library albums...", "notification.updatingLibraryAlbums": "Updating library albums...",
"notification.updatingLibraryArtists": "Updating library artists...", "notification.updatingLibraryArtists": "Updating library artists...",
"notification.buildingPlaylistCache": "Building Playlist Cache...",
"term.variables": "Variables", "term.variables": "Variables",
"term.appleInc": "Apple Inc.", "term.appleInc": "Apple Inc.",
"term.appleMusic": "Apple Music", "term.appleMusic": "Apple Music",
@ -260,6 +261,7 @@
"action.removeFromQueue.success": "Removed from Queue", "action.removeFromQueue.success": "Removed from Queue",
"action.removeFromQueue.error": "Error Removing from Queue", "action.removeFromQueue.error": "Error Removing from Queue",
"action.createPlaylist": "Create a New Playlist", "action.createPlaylist": "Create a New Playlist",
"action.addToPlaylist.duplicate": "Item already exists in playlist. Do you want to continue?",
"action.addToPlaylist": "Add to Playlist", "action.addToPlaylist": "Add to Playlist",
"action.removeFromPlaylist": "Remove from Playlist", "action.removeFromPlaylist": "Remove from Playlist",
"action.addToFavorites": "Add to Favorites", "action.addToFavorites": "Add to Favorites",
@ -494,6 +496,7 @@
"settings.option.visual.theme.viewInfo": "View Info", "settings.option.visual.theme.viewInfo": "View Info",
"settings.option.visual.theme.github.available": "Available", "settings.option.visual.theme.github.available": "Available",
"settings.option.visual.theme.github.applied": "Applied", "settings.option.visual.theme.github.applied": "Applied",
"settings.notyf.visual.theme.updateAvailable": "[Themes] {{ theme }} has an update available",
"settings.notyf.visual.theme.install.success": "Theme installed successfully", "settings.notyf.visual.theme.install.success": "Theme installed successfully",
"settings.notyf.visual.theme.install.error": "Theme installation failed", "settings.notyf.visual.theme.install.error": "Theme installation failed",
"settings.header.visual.plugin": "Plugin", "settings.header.visual.plugin": "Plugin",
@ -548,6 +551,7 @@
"settings.option.connectivity.lastfmScrobble.filterLoop": "Filter looped track (Last.fm)", "settings.option.connectivity.lastfmScrobble.filterLoop": "Filter looped track (Last.fm)",
"settings.option.connectivity.lastfmScrobble.filterLoop.description": "Prevent looped tracks from being scrobbled or displayed in the Now Playing list on Last.fm.", "settings.option.connectivity.lastfmScrobble.filterLoop.description": "Prevent looped tracks from being scrobbled or displayed in the Now Playing list on Last.fm.",
"settings.option.connectivity.lastfmScrobble.filterTypes": "Filter Media Types (Last.fm)", "settings.option.connectivity.lastfmScrobble.filterTypes": "Filter Media Types (Last.fm)",
"settings.option.connectivity.lastfmScrobble.filterTypes.description": "Prevent tracks of the selected media types from being scrobbled or displayed in the Now Playing list on Last.fm.",
"settings.option.connectivity.lastfmScrobble.manualToken": "Enter Last.fm Token Manually", "settings.option.connectivity.lastfmScrobble.manualToken": "Enter Last.fm Token Manually",
"settings.option.connectivity.lastfmScrobble.manualToken.link": "Click here to get a Last.fm token", "settings.option.connectivity.lastfmScrobble.manualToken.link": "Click here to get a Last.fm token",
"settings.notyf.connectivity.lastfmScrobble.connectError": "Last.fm Connection Timed Out", "settings.notyf.connectivity.lastfmScrobble.connectError": "Last.fm Connection Timed Out",

View file

@ -10,6 +10,7 @@
"notification.updatingLibrarySongs": "Updating library songs...", "notification.updatingLibrarySongs": "Updating library songs...",
"notification.updatingLibraryAlbums": "Updating library albums...", "notification.updatingLibraryAlbums": "Updating library albums...",
"notification.updatingLibraryArtists": "Updating library artists...", "notification.updatingLibraryArtists": "Updating library artists...",
"notification.buildingPlaylistCache": "Building Playlist Cache...",
"term.variables": "Variables", "term.variables": "Variables",
"term.appleInc": "Apple Inc.", "term.appleInc": "Apple Inc.",
"term.appleMusic": "Apple Music", "term.appleMusic": "Apple Music",
@ -260,6 +261,7 @@
"action.removeFromQueue.success": "Removed from Queue", "action.removeFromQueue.success": "Removed from Queue",
"action.removeFromQueue.error": "Error Removing from Queue", "action.removeFromQueue.error": "Error Removing from Queue",
"action.createPlaylist": "Create a New Playlist", "action.createPlaylist": "Create a New Playlist",
"action.addToPlaylist.duplicate": "Item already exists in playlist. Do you want to continue?",
"action.addToPlaylist": "Add to Playlist", "action.addToPlaylist": "Add to Playlist",
"action.removeFromPlaylist": "Remove from Playlist", "action.removeFromPlaylist": "Remove from Playlist",
"action.addToFavorites": "Add to Favorites", "action.addToFavorites": "Add to Favorites",
@ -494,6 +496,7 @@
"settings.option.visual.theme.viewInfo": "View Info", "settings.option.visual.theme.viewInfo": "View Info",
"settings.option.visual.theme.github.available": "Available", "settings.option.visual.theme.github.available": "Available",
"settings.option.visual.theme.github.applied": "Applied", "settings.option.visual.theme.github.applied": "Applied",
"settings.notyf.visual.theme.updateAvailable": "[Themes] {{ theme }} has an update available",
"settings.notyf.visual.theme.install.success": "Theme installed successfully", "settings.notyf.visual.theme.install.success": "Theme installed successfully",
"settings.notyf.visual.theme.install.error": "Theme installation failed", "settings.notyf.visual.theme.install.error": "Theme installation failed",
"settings.header.visual.plugin": "Plugin", "settings.header.visual.plugin": "Plugin",
@ -548,6 +551,7 @@
"settings.option.connectivity.lastfmScrobble.filterLoop": "Filter looped track (Last.fm)", "settings.option.connectivity.lastfmScrobble.filterLoop": "Filter looped track (Last.fm)",
"settings.option.connectivity.lastfmScrobble.filterLoop.description": "Prevent looped tracks from being scrobbled or displayed in the Now Playing list on Last.fm.", "settings.option.connectivity.lastfmScrobble.filterLoop.description": "Prevent looped tracks from being scrobbled or displayed in the Now Playing list on Last.fm.",
"settings.option.connectivity.lastfmScrobble.filterTypes": "Filter Media Types (Last.fm)", "settings.option.connectivity.lastfmScrobble.filterTypes": "Filter Media Types (Last.fm)",
"settings.option.connectivity.lastfmScrobble.filterTypes.description": "Prevent tracks of the selected media types from being scrobbled or displayed in the Now Playing list on Last.fm.",
"settings.option.connectivity.lastfmScrobble.manualToken": "Enter Last.fm Token Manually", "settings.option.connectivity.lastfmScrobble.manualToken": "Enter Last.fm Token Manually",
"settings.option.connectivity.lastfmScrobble.manualToken.link": "Click here to get a Last.fm token", "settings.option.connectivity.lastfmScrobble.manualToken.link": "Click here to get a Last.fm token",
"settings.notyf.connectivity.lastfmScrobble.connectError": "Last.fm Connection Timed Out", "settings.notyf.connectivity.lastfmScrobble.connectError": "Last.fm Connection Timed Out",

View file

@ -558,15 +558,11 @@ export class BrowserWindow {
res.send("Stopped"); res.send("Stopped");
break; break;
case "next": case "next":
BrowserWindow.win.webContents.executeJavaScript( BrowserWindow.win.webContents.executeJavaScript("if (MusicKit.getInstance().queue.nextPlayableItemIndex != -1 && MusicKit.getInstance().queue.nextPlayableItemIndex != null) {MusicKit.getInstance().changeToMediaAtIndex(MusicKit.getInstance().queue.nextPlayableItemIndex);}");
"if (MusicKit.getInstance().queue.nextPlayableItemIndex != -1 && MusicKit.getInstance().queue.nextPlayableItemIndex != null) {MusicKit.getInstance().changeToMediaAtIndex(MusicKit.getInstance().queue.nextPlayableItemIndex);}"
);
res.send("Next"); res.send("Next");
break; break;
case "previous": case "previous":
BrowserWindow.win.webContents.executeJavaScript( BrowserWindow.win.webContents.executeJavaScript("if (MusicKit.getInstance().queue.previousPlayableItemIndex != -1 && MusicKit.getInstance().queue.previousPlayableItemIndex != null) {MusicKit.getInstance().changeToMediaAtIndex(MusicKit.getInstance().queue.previousPlayableItemIndex);}");
"if (MusicKit.getInstance().queue.previousPlayableItemIndex != -1 && MusicKit.getInstance().queue.previousPlayableItemIndex != null) {MusicKit.getInstance().changeToMediaAtIndex(MusicKit.getInstance().queue.previousPlayableItemIndex);}"
);
res.send("Previous"); res.send("Previous");
break; break;
default: { default: {
@ -735,18 +731,11 @@ export class BrowserWindow {
details.requestHeaders["user-agent"] = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Cider/1.0.0 Chrome/96.0.4664.45 Electron/16.0.0 Safari/537.36"; details.requestHeaders["user-agent"] = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Cider/1.0.0 Chrome/96.0.4664.45 Electron/16.0.0 Safari/537.36";
} }
if (details.url.includes("https://qq.com")) { if (details.url.includes("https://qq.com")) {
(details.requestHeaders["Accept"] = "*/*"), (details.requestHeaders["Accept"] = "*/*"), (details.requestHeaders["Accept-Encoding"] = "gzip, deflate, br"), (details.requestHeaders["Accept-Language"] = "zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6"), (details.requestHeaders["Referer"] = "https://y.qq.com/"), (details.requestHeaders["User-Agent"] = "Mozilla/5.0 (iPhone; CPU iPhone OS 13_3_1 like Mac OS X; zh-CN) AppleWebKit/537.51.1 (");
(details.requestHeaders["Accept-Encoding"] = "gzip, deflate, br"),
(details.requestHeaders["Accept-Language"] = "zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6"),
(details.requestHeaders["Referer"] = "https://y.qq.com/"),
(details.requestHeaders["User-Agent"] = "Mozilla/5.0 (iPhone; CPU iPhone OS 13_3_1 like Mac OS X; zh-CN) AppleWebKit/537.51.1 (");
("KHTML, like Gecko) Mobile/17D50 UCBrowser/12.8.2.1268 Mobile AliApp(TUnionSDK/0.1.20.3) "); ("KHTML, like Gecko) Mobile/17D50 UCBrowser/12.8.2.1268 Mobile AliApp(TUnionSDK/0.1.20.3) ");
} }
if (details.url.includes("https://c.y.qq.com/lyric/fcgi-bin/fcg_query_lyric_new.fcg")) { if (details.url.includes("https://c.y.qq.com/lyric/fcgi-bin/fcg_query_lyric_new.fcg")) {
(details.requestHeaders["Accept"] = "*/*"), (details.requestHeaders["Accept"] = "*/*"), (details.requestHeaders["Accept-Encoding"] = "gzip, deflate, br"), (details.requestHeaders["Accept-Language"] = "zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6"), (details.requestHeaders["User-Agent"] = "Mozilla/5.0 (iPhone; CPU iPhone OS 13_3_1 like Mac OS X; zh-CN) AppleWebKit/537.51.1 (");
(details.requestHeaders["Accept-Encoding"] = "gzip, deflate, br"),
(details.requestHeaders["Accept-Language"] = "zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6"),
(details.requestHeaders["User-Agent"] = "Mozilla/5.0 (iPhone; CPU iPhone OS 13_3_1 like Mac OS X; zh-CN) AppleWebKit/537.51.1 (");
("KHTML, like Gecko) Mobile/17D50 UCBrowser/12.8.2.1268 Mobile AliApp(TUnionSDK/0.1.20.3) "); ("KHTML, like Gecko) Mobile/17D50 UCBrowser/12.8.2.1268 Mobile AliApp(TUnionSDK/0.1.20.3) ");
details.requestHeaders["Referer"] = "https://y.qq.com/portal/player.html"; details.requestHeaders["Referer"] = "https://y.qq.com/portal/player.html";
} }
@ -1361,7 +1350,7 @@ export class BrowserWindow {
.then(async (buffer) => { .then(async (buffer) => {
const metadata = await mm.parseBuffer(buffer, "audio/x-m4a"); const metadata = await mm.parseBuffer(buffer, "audio/x-m4a");
let SoundCheckTag = metadata.native.iTunes[1].value; let SoundCheckTag = metadata.native.iTunes[1].value;
console.log("sc", SoundCheckTag); console.debug("sc", SoundCheckTag);
BrowserWindow.win.webContents.send("SoundCheckTag", SoundCheckTag); BrowserWindow.win.webContents.send("SoundCheckTag", SoundCheckTag);
}) })
.catch((err) => { .catch((err) => {
@ -1508,11 +1497,7 @@ export class BrowserWindow {
if (details.family === "IPv4" && !details.internal) { if (details.family === "IPv4" && !details.internal) {
if (!/(loopback|vmware|internal|hamachi|vboxnet|virtualbox)/gi.test(dev + (alias ? ":" + alias : ""))) { if (!/(loopback|vmware|internal|hamachi|vboxnet|virtualbox)/gi.test(dev + (alias ? ":" + alias : ""))) {
if (details.address.substring(0, 8) === "192.168." || details.address.substring(0, 7) === "172.16." || details.address.substring(0, 3) === "10.") { if (details.address.substring(0, 8) === "192.168." || details.address.substring(0, 7) === "172.16." || details.address.substring(0, 3) === "10.") {
if ( if (!ip.startsWith("192.168.") || (String(ip2).startsWith("192.168.") && !ip.startsWith("192.168.") && String(ip2).startsWith("172.16.") && !ip.startsWith("192.168.") && !ip.startsWith("172.16.")) || (String(ip2).startsWith("10.") && !ip.startsWith("192.168.") && !ip.startsWith("172.16.") && !ip.startsWith("10."))) {
!ip.startsWith("192.168.") ||
(String(ip2).startsWith("192.168.") && !ip.startsWith("192.168.") && String(ip2).startsWith("172.16.") && !ip.startsWith("192.168.") && !ip.startsWith("172.16.")) ||
(String(ip2).startsWith("10.") && !ip.startsWith("192.168.") && !ip.startsWith("172.16.") && !ip.startsWith("10."))
) {
ip = details.address; ip = details.address;
} }
++alias; ++alias;

View file

@ -240,7 +240,6 @@ export class Store {
}; };
constructor() { constructor() {
this.defaults.general.language = this.checkLocale(app.getLocale().replace("-", "_")) ?? "en_US";
Store.cfg = new ElectronStore({ Store.cfg = new ElectronStore({
name: "cider-config", name: "cider-config",
defaults: this.defaults, defaults: this.defaults,

View file

@ -208,9 +208,7 @@ export class wsapi {
response.message = "Next"; response.message = "Next";
break; break;
case "previous": case "previous":
this._win.webContents.executeJavaScript( this._win.webContents.executeJavaScript(`if (MusicKit.getInstance().queue.previousPlayableItemIndex != -1 && MusicKit.getInstance().queue.previousPlayableItemIndex != null) {MusicKit.getInstance().changeToMediaAtIndex(MusicKit.getInstance().queue.previousPlayableItemIndex)}`);
`if (MusicKit.getInstance().queue.previousPlayableItemIndex != -1 && MusicKit.getInstance().queue.previousPlayableItemIndex != null) {MusicKit.getInstance().changeToMediaAtIndex(MusicKit.getInstance().queue.previousPlayableItemIndex)}`
);
response.message = "Previous"; response.message = "Previous";
break; break;
case "musickit-api": case "musickit-api":

View file

@ -1,7 +1,7 @@
require("v8-compile-cache"); require("v8-compile-cache");
import { app, components, ipcMain } from "electron"; import { app, components, ipcMain } from "electron";
import { join } from "path";
import { Store } from "./base/store"; import { Store } from "./base/store";
import { AppEvents } from "./base/app"; import { AppEvents } from "./base/app";
import { Plugins } from "./base/plugins"; import { Plugins } from "./base/plugins";
@ -9,6 +9,10 @@ import { BrowserWindow } from "./base/browserwindow";
import { init as Sentry } from "@sentry/electron"; import { init as Sentry } from "@sentry/electron";
import { RewriteFrames } from "@sentry/integrations"; import { RewriteFrames } from "@sentry/integrations";
if (!app.isPackaged) {
app.setPath("userData", join(app.getPath("appData"), "Cider"));
}
// Analytics for debugging fun yeah. // Analytics for debugging fun yeah.
Sentry({ Sentry({
dsn: "https://68c422bfaaf44dea880b86aad5a820d2@o954055.ingest.sentry.io/6112214", dsn: "https://68c422bfaaf44dea880b86aad5a820d2@o954055.ingest.sentry.io/6112214",

View file

@ -200,11 +200,7 @@ export default class ChromecastPlugin {
if (details.family === "IPv4" && !details.internal) { if (details.family === "IPv4" && !details.internal) {
if (!/(loopback|vmware|internal|hamachi|vboxnet|virtualbox)/gi.test(dev + (alias ? ":" + alias : ""))) { if (!/(loopback|vmware|internal|hamachi|vboxnet|virtualbox)/gi.test(dev + (alias ? ":" + alias : ""))) {
if (details.address.substring(0, 8) === "192.168." || details.address.substring(0, 7) === "172.16." || details.address.substring(0, 3) === "10.") { if (details.address.substring(0, 8) === "192.168." || details.address.substring(0, 7) === "172.16." || details.address.substring(0, 3) === "10.") {
if ( if (!ip.startsWith("192.168.") || (ip2.startsWith("192.168.") && !ip.startsWith("192.168.") && ip2.startsWith("172.16.") && !ip.startsWith("192.168.") && !ip.startsWith("172.16.")) || (ip2.startsWith("10.") && !ip.startsWith("192.168.") && !ip.startsWith("172.16.") && !ip.startsWith("10."))) {
!ip.startsWith("192.168.") ||
(ip2.startsWith("192.168.") && !ip.startsWith("192.168.") && ip2.startsWith("172.16.") && !ip.startsWith("192.168.") && !ip.startsWith("172.16.")) ||
(ip2.startsWith("10.") && !ip.startsWith("192.168.") && !ip.startsWith("172.16.") && !ip.startsWith("10."))
) {
ip = details.address; ip = details.address;
} }
++alias; ++alias;

View file

@ -170,13 +170,7 @@ export default class lastfm {
return; return;
} }
if ( if (!this._authenticated || !attributes || this._utils.getStoreValue("connectivity.lastfm.filter_types")[attributes.playParams.kind] || this._utils.getStoreValue("connectivity.lastfm.filter_types")[attributes.type] || (this._utils.getStoreValue("connectivity.lastfm.filter_loop") && this._scrobbleCache.track === attributes.lfmTrack.name)) return;
!this._authenticated ||
!attributes ||
this._utils.getStoreValue("connectivity.lastfm.filter_types")[attributes.playParams.kind] ||
(this._utils.getStoreValue("connectivity.lastfm.filter_loop") && this._scrobbleCache.track === attributes.lfmTrack.name)
)
return;
// Scrobble // Scrobble
const scrobble = { const scrobble = {
@ -216,13 +210,9 @@ export default class lastfm {
return; return;
} }
if ( if (!this._authenticated || !attributes || this._utils.getStoreValue("connectivity.lastfm.filter_types")[attributes.playParams.kind] || this._utils.getStoreValue("connectivity.lastfm.filter_types")[attributes.type] || (this._utils.getStoreValue("connectivity.lastfm.filter_loop") && this._nowPlayingCache.track === attributes.lfmTrack.name)) return;
!this._authenticated ||
!attributes || console.log(this._utils.getStoreValue("connectivity.lastfm.filter_types"));
this._utils.getStoreValue("connectivity.lastfm.filter_types")[attributes.playParams.kind] ||
(this._utils.getStoreValue("connectivity.lastfm.filter_loop") && this._nowPlayingCache.track === attributes.lfmTrack.name)
)
return;
const nowPlaying = { const nowPlaying = {
artist: attributes.lfmTrack.artist.name, artist: attributes.lfmTrack.artist.name,

View file

@ -53,20 +53,7 @@ export default class Thumbar {
{ {
label: utils.getLocale(utils.getStoreValue("general.language"), "menubar.options.view"), label: utils.getLocale(utils.getStoreValue("general.language"), "menubar.options.view"),
submenu: [ submenu: [
...(this.isMac ...(this.isMac ? [{ role: "reload" }, { role: "forceReload" }, { role: "toggleDevTools" }, { type: "separator" }, { role: "resetZoom" }, { role: "zoomIn" }, { role: "zoomOut" }, { type: "separator" }, { role: "togglefullscreen" }, { type: "separator" }] : []),
? [
{ role: "reload" },
{ role: "forceReload" },
{ role: "toggleDevTools" },
{ type: "separator" },
{ role: "resetZoom" },
{ role: "zoomIn" },
{ role: "zoomOut" },
{ type: "separator" },
{ role: "togglefullscreen" },
{ type: "separator" },
]
: []),
{ {
label: utils.getLocale(utils.getStoreValue("general.language"), "term.search"), label: utils.getLocale(utils.getStoreValue("general.language"), "term.search"),
accelerator: utils.getStoreValue("general.keybindings.search").join("+"), accelerator: utils.getStoreValue("general.keybindings.search").join("+"),

View file

@ -159,7 +159,7 @@ export default class RAOP {
electron.ipcMain.on("getAirplayDevice", (event, data) => { electron.ipcMain.on("getAirplayDevice", (event, data) => {
this.castDevices = []; this.castDevices = [];
console.log("scan for airplay devices"); console.debug("scan for airplay devices");
const browser = this.mdns.createBrowser(this.mdns.tcp("raop")); const browser = this.mdns.createBrowser(this.mdns.tcp("raop"));
browser.on("ready", browser.discover); browser.on("ready", browser.discover);
@ -168,7 +168,7 @@ export default class RAOP {
if (service.addresses && service.fullname && service.fullname.includes("_raop._tcp")) { if (service.addresses && service.fullname && service.fullname.includes("_raop._tcp")) {
// console.log(service.txt) // console.log(service.txt)
this._win.webContents.executeJavaScript(`console.log( this._win.webContents.executeJavaScript(`console.log(
"${service.name} ${service.host}:${service.port} ${service.addresses} ${service.fullname}" "${service.name} ${service.host}:${service.port} ${service.addresses} ${service.fullname}"
)`); )`);
let itemname = service.fullname.substring(service.fullname.indexOf("@") + 1, service.fullname.indexOf("._raop._tcp")); let itemname = service.fullname.substring(service.fullname.indexOf("@") + 1, service.fullname.indexOf("._raop._tcp"));
this.ondeviceup(itemname, service.host, service.port, service.addresses, service.txt); this.ondeviceup(itemname, service.host, service.port, service.addresses, service.txt);
@ -259,8 +259,7 @@ export default class RAOP {
// this.airtunes.stopAll(() => { // this.airtunes.stopAll(() => {
// console.log("end"); // console.log("end");
// }); // });
if (this.devices[idx]?.state != null && this.devices[idx].state != -1) if (this.devices[idx]?.state != null && this.devices[idx].state != -1) this._win.webContents.executeJavaScript(`app.airplayDisconnect(true, ${JSON.stringify([ipv4, ipport, sepassword, title, artist, album, artworkURL, txt, airplay2dv])})`).catch((err: any) => console.error(err));
this._win.webContents.executeJavaScript(`app.airplayDisconnect(true, ${JSON.stringify([ipv4, ipport, sepassword, title, artist, album, artworkURL, txt, airplay2dv])})`).catch((err: any) => console.error(err));
// this.airtunes = null; // this.airtunes = null;
// this.device = null; // this.device = null;
// this.ipairplay = ""; // this.ipairplay = "";

View file

@ -301,9 +301,7 @@ const CiderAudio = {
filterlessGain = filterlessGain * spatialProfile.gainComp; filterlessGain = filterlessGain * spatialProfile.gainComp;
} }
filterlessGain = Math.pow(10, (-1 * (20 * Math.log10(filterlessGain))) / 20).toFixed(4); filterlessGain = Math.pow(10, (-1 * (20 * Math.log10(filterlessGain))) / 20).toFixed(4);
filterlessGain > 1.0 filterlessGain > 1.0 ? CiderAudio.audioNodes.intelliGainComp.gain.exponentialRampToValueAtTime(1.0, CiderAudio.context.currentTime + 0.3) : CiderAudio.audioNodes.intelliGainComp.gain.exponentialRampToValueAtTime(filterlessGain, CiderAudio.context.currentTime + 0.3);
? CiderAudio.audioNodes.intelliGainComp.gain.exponentialRampToValueAtTime(1.0, CiderAudio.context.currentTime + 0.3)
: CiderAudio.audioNodes.intelliGainComp.gain.exponentialRampToValueAtTime(filterlessGain, CiderAudio.context.currentTime + 0.3);
console.debug(`[Cider][Audio] IntelliGainComp: ${filterlessGain > 1.0 ? 0 : (20 * Math.log10(filterlessGain)).toFixed(2)} dB (${filterlessGain > 1.0 ? 1 : filterlessGain})`); console.debug(`[Cider][Audio] IntelliGainComp: ${filterlessGain > 1.0 ? 0 : (20 * Math.log10(filterlessGain)).toFixed(2)} dB (${filterlessGain > 1.0 ? 1 : filterlessGain})`);
return; return;
} }
@ -358,9 +356,7 @@ const CiderAudio = {
maxGain = maxGain * spatialProfile.gainComp; maxGain = maxGain * spatialProfile.gainComp;
} }
maxGain = Math.pow(10, (-1 * (20 * Math.log10(maxGain))) / 20).toFixed(4); maxGain = Math.pow(10, (-1 * (20 * Math.log10(maxGain))) / 20).toFixed(4);
maxGain > 1.0 maxGain > 1.0 ? CiderAudio.audioNodes.intelliGainComp.gain.exponentialRampToValueAtTime(1.0, CiderAudio.context.currentTime + 0.3) : CiderAudio.audioNodes.intelliGainComp.gain.exponentialRampToValueAtTime(maxGain, CiderAudio.context.currentTime + 0.3);
? CiderAudio.audioNodes.intelliGainComp.gain.exponentialRampToValueAtTime(1.0, CiderAudio.context.currentTime + 0.3)
: CiderAudio.audioNodes.intelliGainComp.gain.exponentialRampToValueAtTime(maxGain, CiderAudio.context.currentTime + 0.3);
console.debug(`[Cider][Audio] IntelliGainComp: ${maxGain > 1.0 ? 0 : (20 * Math.log10(maxGain)).toFixed(2)} dB (${maxGain > 1.0 ? 1 : maxGain})`); console.debug(`[Cider][Audio] IntelliGainComp: ${maxGain > 1.0 ? 0 : (20 * Math.log10(maxGain)).toFixed(2)} dB (${maxGain > 1.0 ? 1 : maxGain})`);
}, },
sendAudio: function () { sendAudio: function () {

View file

@ -171,9 +171,7 @@ const CiderAudioRenderer = {
maxGain = maxGain * spatialProfile.gainComp; maxGain = maxGain * spatialProfile.gainComp;
} }
maxGain = Math.pow(10, (-1 * (20 * Math.log10(maxGain))) / 20).toFixed(4); maxGain = Math.pow(10, (-1 * (20 * Math.log10(maxGain))) / 20).toFixed(4);
maxGain > 1.0 maxGain > 1.0 ? CiderAudioRenderer.audioNodes.intelliGainComp.gain.exponentialRampToValueAtTime(1.0, CiderAudioRenderer.context.currentTime + 0.3) : CiderAudioRenderer.audioNodes.intelliGainComp.gain.exponentialRampToValueAtTime(maxGain, CiderAudioRenderer.context.currentTime + 0.3);
? CiderAudioRenderer.audioNodes.intelliGainComp.gain.exponentialRampToValueAtTime(1.0, CiderAudioRenderer.context.currentTime + 0.3)
: CiderAudioRenderer.audioNodes.intelliGainComp.gain.exponentialRampToValueAtTime(maxGain, CiderAudioRenderer.context.currentTime + 0.3);
console.debug(`[Cider][Audio] IntelliGainComp: ${maxGain > 1.0 ? 0 : (20 * Math.log10(maxGain)).toFixed(2)} dB (${maxGain > 1.0 ? 1 : maxGain})`); console.debug(`[Cider][Audio] IntelliGainComp: ${maxGain > 1.0 ? 0 : (20 * Math.log10(maxGain)).toFixed(2)} dB (${maxGain > 1.0 ? 1 : maxGain})`);
}, },
atmosphereRealizer2_n6: function (status, destination) { atmosphereRealizer2_n6: function (status, destination) {

View file

@ -1589,9 +1589,7 @@ typeof window !== "undefined" &&
} }
var levelDetails = levelInfo.details; var levelDetails = levelInfo.details;
var avgDuration = var avgDuration = (partCurrent ? (levelDetails === null || levelDetails === void 0 ? void 0 : levelDetails.partTarget) : levelDetails === null || levelDetails === void 0 ? void 0 : levelDetails.averagetargetduration) || currentFragDuration;
(partCurrent ? (levelDetails === null || levelDetails === void 0 ? void 0 : levelDetails.partTarget) : levelDetails === null || levelDetails === void 0 ? void 0 : levelDetails.averagetargetduration) ||
currentFragDuration;
var adjustedbw = void 0; // follow algorithm captured from stagefright : var adjustedbw = void 0; // follow algorithm captured from stagefright :
// https://android.googlesource.com/platform/frameworks/av/+/master/media/libstagefright/httplive/LiveSession.cpp // https://android.googlesource.com/platform/frameworks/av/+/master/media/libstagefright/httplive/LiveSession.cpp
// Pick the highest bandwidth stream below or equal to estimated bandwidth. // Pick the highest bandwidth stream below or equal to estimated bandwidth.
@ -1607,9 +1605,7 @@ typeof window !== "undefined" &&
var bitrate = levels[i].maxBitrate; var bitrate = levels[i].maxBitrate;
var fetchDuration = (bitrate * avgDuration) / adjustedbw; var fetchDuration = (bitrate * avgDuration) / adjustedbw;
_utils_logger__WEBPACK_IMPORTED_MODULE_6__["logger"].trace( _utils_logger__WEBPACK_IMPORTED_MODULE_6__["logger"].trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: " + i + "/" + Math.round(adjustedbw) + "/" + bitrate + "/" + avgDuration + "/" + maxFetchDuration + "/" + fetchDuration); // if adjusted bw is greater than level bitrate AND
"level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: " + i + "/" + Math.round(adjustedbw) + "/" + bitrate + "/" + avgDuration + "/" + maxFetchDuration + "/" + fetchDuration
); // if adjusted bw is greater than level bitrate AND
if ( if (
adjustedbw > bitrate && // fragment fetchDuration unknown OR live stream OR fragment fetchDuration less than max allowed fetch duration, then this level matches adjustedbw > bitrate && // fragment fetchDuration unknown OR live stream OR fragment fetchDuration less than max allowed fetch duration, then this level matches
@ -1971,11 +1967,7 @@ typeof window !== "undefined" &&
if (this.bufferFlushed) { if (this.bufferFlushed) {
this.bufferFlushed = false; this.bufferFlushed = false;
this.afterBufferFlushed( this.afterBufferFlushed(this.mediaBuffer ? this.mediaBuffer : this.media, _loader_fragment__WEBPACK_IMPORTED_MODULE_7__["ElementaryStreamTypes"].AUDIO, _types_loader__WEBPACK_IMPORTED_MODULE_6__["PlaylistLevelType"].AUDIO);
this.mediaBuffer ? this.mediaBuffer : this.media,
_loader_fragment__WEBPACK_IMPORTED_MODULE_7__["ElementaryStreamTypes"].AUDIO,
_types_loader__WEBPACK_IMPORTED_MODULE_6__["PlaylistLevelType"].AUDIO
);
} }
var bufferInfo = this.getFwdBufferInfo(this.mediaBuffer ? this.mediaBuffer : this.media, _types_loader__WEBPACK_IMPORTED_MODULE_6__["PlaylistLevelType"].AUDIO); var bufferInfo = this.getFwdBufferInfo(this.mediaBuffer ? this.mediaBuffer : this.media, _types_loader__WEBPACK_IMPORTED_MODULE_6__["PlaylistLevelType"].AUDIO);
@ -2024,10 +2016,7 @@ typeof window !== "undefined" &&
return; return;
} }
if ( if (((_frag$decryptdata = frag.decryptdata) === null || _frag$decryptdata === void 0 ? void 0 : _frag$decryptdata.keyFormat) === "identity" && !((_frag$decryptdata2 = frag.decryptdata) !== null && _frag$decryptdata2 !== void 0 && _frag$decryptdata2.key)) {
((_frag$decryptdata = frag.decryptdata) === null || _frag$decryptdata === void 0 ? void 0 : _frag$decryptdata.keyFormat) === "identity" &&
!((_frag$decryptdata2 = frag.decryptdata) !== null && _frag$decryptdata2 !== void 0 && _frag$decryptdata2.key)
) {
this.loadKey(frag, trackDetails); this.loadKey(frag, trackDetails);
} else { } else {
this.loadFragment(frag, trackDetails, targetBufferTime); this.loadFragment(frag, trackDetails, targetBufferTime);
@ -2176,12 +2165,7 @@ typeof window !== "undefined" &&
var transmuxer = this.transmuxer; var transmuxer = this.transmuxer;
if (!transmuxer) { if (!transmuxer) {
transmuxer = this.transmuxer = new _demux_transmuxer_interface__WEBPACK_IMPORTED_MODULE_9__["default"]( transmuxer = this.transmuxer = new _demux_transmuxer_interface__WEBPACK_IMPORTED_MODULE_9__["default"](this.CiderHls, _types_loader__WEBPACK_IMPORTED_MODULE_6__["PlaylistLevelType"].AUDIO, this._handleTransmuxComplete.bind(this), this._handleTransmuxerFlush.bind(this));
this.CiderHls,
_types_loader__WEBPACK_IMPORTED_MODULE_6__["PlaylistLevelType"].AUDIO,
this._handleTransmuxComplete.bind(this),
this._handleTransmuxerFlush.bind(this)
);
} // Check if we have video initPTS } // Check if we have video initPTS
// If not we need to wait for it // If not we need to wait for it
@ -2198,9 +2182,7 @@ typeof window !== "undefined" &&
var chunkMeta = new _types_transmuxer__WEBPACK_IMPORTED_MODULE_10__["ChunkMetadata"](frag.level, frag.sn, frag.stats.chunkCount, payload.byteLength, partIndex, partial); var chunkMeta = new _types_transmuxer__WEBPACK_IMPORTED_MODULE_10__["ChunkMetadata"](frag.level, frag.sn, frag.stats.chunkCount, payload.byteLength, partIndex, partial);
transmuxer.push(payload, initSegmentData, audioCodec, "", frag, part, details.totalduration, accurateTimeOffset, chunkMeta, initPTS); transmuxer.push(payload, initSegmentData, audioCodec, "", frag, part, details.totalduration, accurateTimeOffset, chunkMeta, initPTS);
} else { } else {
_utils_logger__WEBPACK_IMPORTED_MODULE_14__["logger"].log( _utils_logger__WEBPACK_IMPORTED_MODULE_14__["logger"].log("Unknown video PTS for cc " + frag.cc + ", waiting for video PTS before demuxing audio frag " + frag.sn + " of [" + details.startSN + " ," + details.endSN + "],track " + trackId);
"Unknown video PTS for cc " + frag.cc + ", waiting for video PTS before demuxing audio frag " + frag.sn + " of [" + details.startSN + " ," + details.endSN + "],track " + trackId
);
var _this$waitingData = (this.waitingData = this.waitingData || { var _this$waitingData = (this.waitingData = this.waitingData || {
frag: frag, frag: frag,
@ -3267,9 +3249,7 @@ typeof window !== "undefined" &&
state = this.state; state = this.state;
var currentTime = media ? media.currentTime : 0; var currentTime = media ? media.currentTime : 0;
var bufferInfo = _utils_buffer_helper__WEBPACK_IMPORTED_MODULE_3__["BufferHelper"].bufferInfo(mediaBuffer || media, currentTime, config.maxBufferHole); var bufferInfo = _utils_buffer_helper__WEBPACK_IMPORTED_MODULE_3__["BufferHelper"].bufferInfo(mediaBuffer || media, currentTime, config.maxBufferHole);
this.log( this.log("media seeking to " + (Object(_home_runner_work_CiderHls_js_CiderHls_js_src_polyfills_number__WEBPACK_IMPORTED_MODULE_0__["isFiniteNumber"])(currentTime) ? currentTime.toFixed(3) : currentTime) + ", state: " + state);
"media seeking to " + (Object(_home_runner_work_CiderHls_js_CiderHls_js_src_polyfills_number__WEBPACK_IMPORTED_MODULE_0__["isFiniteNumber"])(currentTime) ? currentTime.toFixed(3) : currentTime) + ", state: " + state
);
if (state === State.ENDED) { if (state === State.ENDED) {
this.resetLoadingState(); this.resetLoadingState();
@ -3619,19 +3599,7 @@ typeof window !== "undefined" &&
} }
} }
this.log( this.log("Loading fragment " + frag.sn + " cc: " + frag.cc + " " + (details ? "of [" + details.startSN + "-" + details.endSN + "] " : "") + (this.logPrefix === "[stream-controller]" ? "level" : "track") + ": " + frag.level + ", target: " + parseFloat(targetBufferTime.toFixed(3))); // Don't update nextLoadPosition for fragments which are not buffered
"Loading fragment " +
frag.sn +
" cc: " +
frag.cc +
" " +
(details ? "of [" + details.startSN + "-" + details.endSN + "] " : "") +
(this.logPrefix === "[stream-controller]" ? "level" : "track") +
": " +
frag.level +
", target: " +
parseFloat(targetBufferTime.toFixed(3))
); // Don't update nextLoadPosition for fragments which are not buffered
if (Object(_home_runner_work_CiderHls_js_CiderHls_js_src_polyfills_number__WEBPACK_IMPORTED_MODULE_0__["isFiniteNumber"])(frag.sn) && !this.bitrateTest) { if (Object(_home_runner_work_CiderHls_js_CiderHls_js_src_polyfills_number__WEBPACK_IMPORTED_MODULE_0__["isFiniteNumber"])(frag.sn) && !this.bitrateTest) {
this.nextLoadPosition = frag.start + frag.duration; this.nextLoadPosition = frag.start + frag.duration;
@ -4099,18 +4067,7 @@ typeof window !== "undefined" &&
if (firstLevelLoad || (!aligned && !slidingStart)) { if (firstLevelLoad || (!aligned && !slidingStart)) {
Object(_utils_discontinuities__WEBPACK_IMPORTED_MODULE_9__["alignStream"])(fragPrevious, lastLevel, details); Object(_utils_discontinuities__WEBPACK_IMPORTED_MODULE_9__["alignStream"])(fragPrevious, lastLevel, details);
var alignedSlidingStart = details.fragments[0].start; var alignedSlidingStart = details.fragments[0].start;
this.log( this.log("Live playlist sliding: " + alignedSlidingStart.toFixed(2) + " start-sn: " + (previousDetails ? previousDetails.startSN : "na") + "->" + details.startSN + " prev-sn: " + (fragPrevious ? fragPrevious.sn : "na") + " fragments: " + length);
"Live playlist sliding: " +
alignedSlidingStart.toFixed(2) +
" start-sn: " +
(previousDetails ? previousDetails.startSN : "na") +
"->" +
details.startSN +
" prev-sn: " +
(fragPrevious ? fragPrevious.sn : "na") +
" fragments: " +
length
);
return alignedSlidingStart; return alignedSlidingStart;
} }
@ -5767,11 +5724,7 @@ typeof window !== "undefined" &&
ot: ot, ot: ot,
}; };
if ( if (ot === _types_cmcd__WEBPACK_IMPORTED_MODULE_1__["CMCDObjectType"].VIDEO || ot === _types_cmcd__WEBPACK_IMPORTED_MODULE_1__["CMCDObjectType"].AUDIO || ot == _types_cmcd__WEBPACK_IMPORTED_MODULE_1__["CMCDObjectType"].MUXED) {
ot === _types_cmcd__WEBPACK_IMPORTED_MODULE_1__["CMCDObjectType"].VIDEO ||
ot === _types_cmcd__WEBPACK_IMPORTED_MODULE_1__["CMCDObjectType"].AUDIO ||
ot == _types_cmcd__WEBPACK_IMPORTED_MODULE_1__["CMCDObjectType"].MUXED
) {
data.br = level.bitrate / 1000; data.br = level.bitrate / 1000;
data.tb = _this.getTopBandwidth(ot); data.tb = _this.getTopBandwidth(ot);
data.bl = _this.getBufferLength(ot); data.bl = _this.getBufferLength(ot);
@ -5871,10 +5824,7 @@ typeof window !== "undefined" &&
// apply baseline data // apply baseline data
_extends(data, this.createData()); _extends(data, this.createData());
var isVideo = var isVideo = data.ot === _types_cmcd__WEBPACK_IMPORTED_MODULE_1__["CMCDObjectType"].INIT || data.ot === _types_cmcd__WEBPACK_IMPORTED_MODULE_1__["CMCDObjectType"].VIDEO || data.ot === _types_cmcd__WEBPACK_IMPORTED_MODULE_1__["CMCDObjectType"].MUXED;
data.ot === _types_cmcd__WEBPACK_IMPORTED_MODULE_1__["CMCDObjectType"].INIT ||
data.ot === _types_cmcd__WEBPACK_IMPORTED_MODULE_1__["CMCDObjectType"].VIDEO ||
data.ot === _types_cmcd__WEBPACK_IMPORTED_MODULE_1__["CMCDObjectType"].MUXED;
if (this.starved && isVideo) { if (this.starved && isVideo) {
data.bs = true; data.bs = true;
@ -8610,10 +8560,7 @@ typeof window !== "undefined" &&
levels = levels.filter(function (_ref2) { levels = levels.filter(function (_ref2) {
var audioCodec = _ref2.audioCodec, var audioCodec = _ref2.audioCodec,
videoCodec = _ref2.videoCodec; videoCodec = _ref2.videoCodec;
return ( return (!audioCodec || Object(_utils_codecs__WEBPACK_IMPORTED_MODULE_3__["isCodecSupportedInMp4"])(audioCodec, "audio")) && (!videoCodec || Object(_utils_codecs__WEBPACK_IMPORTED_MODULE_3__["isCodecSupportedInMp4"])(videoCodec, "video"));
(!audioCodec || Object(_utils_codecs__WEBPACK_IMPORTED_MODULE_3__["isCodecSupportedInMp4"])(audioCodec, "audio")) &&
(!videoCodec || Object(_utils_codecs__WEBPACK_IMPORTED_MODULE_3__["isCodecSupportedInMp4"])(videoCodec, "video"))
);
}); });
if (data.audioTracks) { if (data.audioTracks) {
@ -9319,10 +9266,7 @@ typeof window !== "undefined" &&
ccOffset = oldFrag.cc - newFrag.cc; ccOffset = oldFrag.cc - newFrag.cc;
} }
if ( if (Object(_home_runner_work_CiderHls_js_CiderHls_js_src_polyfills_number__WEBPACK_IMPORTED_MODULE_0__["isFiniteNumber"])(oldFrag.startPTS) && Object(_home_runner_work_CiderHls_js_CiderHls_js_src_polyfills_number__WEBPACK_IMPORTED_MODULE_0__["isFiniteNumber"])(oldFrag.endPTS)) {
Object(_home_runner_work_CiderHls_js_CiderHls_js_src_polyfills_number__WEBPACK_IMPORTED_MODULE_0__["isFiniteNumber"])(oldFrag.startPTS) &&
Object(_home_runner_work_CiderHls_js_CiderHls_js_src_polyfills_number__WEBPACK_IMPORTED_MODULE_0__["isFiniteNumber"])(oldFrag.endPTS)
) {
newFrag.start = newFrag.startPTS = oldFrag.startPTS; newFrag.start = newFrag.startPTS = oldFrag.startPTS;
newFrag.startDTS = oldFrag.startDTS; newFrag.startDTS = oldFrag.startDTS;
newFrag.appendedPTS = oldFrag.appendedPTS; newFrag.appendedPTS = oldFrag.appendedPTS;
@ -9902,10 +9846,7 @@ typeof window !== "undefined" &&
} // We want to load the key if we're dealing with an identity key, because we will decrypt } // We want to load the key if we're dealing with an identity key, because we will decrypt
// this content using the key we fetch. Other keys will be handled by the DRM CDM via EME. // this content using the key we fetch. Other keys will be handled by the DRM CDM via EME.
if ( if (((_frag$decryptdata = frag.decryptdata) === null || _frag$decryptdata === void 0 ? void 0 : _frag$decryptdata.keyFormat) === "identity" && !((_frag$decryptdata2 = frag.decryptdata) !== null && _frag$decryptdata2 !== void 0 && _frag$decryptdata2.key)) {
((_frag$decryptdata = frag.decryptdata) === null || _frag$decryptdata === void 0 ? void 0 : _frag$decryptdata.keyFormat) === "identity" &&
!((_frag$decryptdata2 = frag.decryptdata) !== null && _frag$decryptdata2 !== void 0 && _frag$decryptdata2.key)
) {
this.loadKey(frag, levelDetails); this.loadKey(frag, levelDetails);
} else { } else {
this.loadFragment(frag, levelDetails, targetBufferTime); this.loadFragment(frag, levelDetails, targetBufferTime);
@ -10257,13 +10198,7 @@ typeof window !== "undefined" &&
// this.log(`Transmuxing ${frag.sn} of [${details.startSN} ,${details.endSN}],level ${frag.level}, cc ${frag.cc}`); // this.log(`Transmuxing ${frag.sn} of [${details.startSN} ,${details.endSN}],level ${frag.level}, cc ${frag.cc}`);
var transmuxer = (this.transmuxer = var transmuxer = (this.transmuxer =
this.transmuxer || this.transmuxer || new _demux_transmuxer_interface__WEBPACK_IMPORTED_MODULE_8__["default"](this.CiderHls, _types_loader__WEBPACK_IMPORTED_MODULE_6__["PlaylistLevelType"].MAIN, this._handleTransmuxComplete.bind(this), this._handleTransmuxerFlush.bind(this)));
new _demux_transmuxer_interface__WEBPACK_IMPORTED_MODULE_8__["default"](
this.CiderHls,
_types_loader__WEBPACK_IMPORTED_MODULE_6__["PlaylistLevelType"].MAIN,
this._handleTransmuxComplete.bind(this),
this._handleTransmuxerFlush.bind(this)
));
var partIndex = part ? part.index : -1; var partIndex = part ? part.index : -1;
var partial = partIndex !== -1; var partial = partIndex !== -1;
var chunkMeta = new _types_transmuxer__WEBPACK_IMPORTED_MODULE_9__["ChunkMetadata"](frag.level, frag.sn, frag.stats.chunkCount, payload.byteLength, partIndex, partial); var chunkMeta = new _types_transmuxer__WEBPACK_IMPORTED_MODULE_9__["ChunkMetadata"](frag.level, frag.sn, frag.stats.chunkCount, payload.byteLength, partIndex, partial);
@ -14779,8 +14714,8 @@ typeof window !== "undefined" &&
*/ */
var chromeVersion = null; var chromeVersion = null;
var BitratesMap = [ var BitratesMap = [
32, 64, 96, 128, 160, 192, 224, 256, 288, 320, 352, 384, 416, 448, 32, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, 384, 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, 32, 48, 56, 64, 80, 96, 112, 32, 64, 96, 128, 160, 192, 224, 256, 288, 320, 352, 384, 416, 448, 32, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, 384, 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, 32, 48, 56, 64, 80, 96, 112, 128, 144, 160, 176, 192, 224, 256, 8, 16, 24, 32, 40, 48, 56,
128, 144, 160, 176, 192, 224, 256, 8, 16, 24, 32, 40, 48, 56, 64, 80, 96, 112, 128, 144, 160, 64, 80, 96, 112, 128, 144, 160,
]; ];
var SamplingRateMap = [44100, 48000, 32000, 22050, 24000, 16000, 11025, 12000, 8000]; var SamplingRateMap = [44100, 48000, 32000, 22050, 24000, 16000, 11025, 12000, 8000];
var SamplesCoefficients = [ var SamplesCoefficients = [
@ -18354,9 +18289,7 @@ typeof window !== "undefined" &&
var _sourceBuffer$prototy; var _sourceBuffer$prototy;
var sourceBuffer = getSourceBuffer(); var sourceBuffer = getSourceBuffer();
return ( return typeof (sourceBuffer === null || sourceBuffer === void 0 ? void 0 : (_sourceBuffer$prototy = sourceBuffer.prototype) === null || _sourceBuffer$prototy === void 0 ? void 0 : _sourceBuffer$prototy.changeType) === "function";
typeof (sourceBuffer === null || sourceBuffer === void 0 ? void 0 : (_sourceBuffer$prototy = sourceBuffer.prototype) === null || _sourceBuffer$prototy === void 0 ? void 0 : _sourceBuffer$prototy.changeType) === "function"
);
} }
/***/ /***/
@ -18743,10 +18676,7 @@ typeof window !== "undefined" &&
var start = segment.byteRangeStartOffset; var start = segment.byteRangeStartOffset;
var end = segment.byteRangeEndOffset; var end = segment.byteRangeEndOffset;
if ( if (Object(_home_runner_work_CiderHls_js_CiderHls_js_src_polyfills_number__WEBPACK_IMPORTED_MODULE_0__["isFiniteNumber"])(start) && Object(_home_runner_work_CiderHls_js_CiderHls_js_src_polyfills_number__WEBPACK_IMPORTED_MODULE_0__["isFiniteNumber"])(end)) {
Object(_home_runner_work_CiderHls_js_CiderHls_js_src_polyfills_number__WEBPACK_IMPORTED_MODULE_0__["isFiniteNumber"])(start) &&
Object(_home_runner_work_CiderHls_js_CiderHls_js_src_polyfills_number__WEBPACK_IMPORTED_MODULE_0__["isFiniteNumber"])(end)
) {
loaderContext.rangeStart = start; loaderContext.rangeStart = start;
loaderContext.rangeEnd = end; loaderContext.rangeEnd = end;
} }
@ -18854,12 +18784,7 @@ typeof window !== "undefined" &&
this._url = null; this._url = null;
this.baseurl = void 0; this.baseurl = void 0;
this.relurl = void 0; this.relurl = void 0;
this.elementaryStreams = this.elementaryStreams = ((_this$elementaryStrea = {}), (_this$elementaryStrea[ElementaryStreamTypes.AUDIO] = null), (_this$elementaryStrea[ElementaryStreamTypes.VIDEO] = null), (_this$elementaryStrea[ElementaryStreamTypes.AUDIOVIDEO] = null), _this$elementaryStrea);
((_this$elementaryStrea = {}),
(_this$elementaryStrea[ElementaryStreamTypes.AUDIO] = null),
(_this$elementaryStrea[ElementaryStreamTypes.VIDEO] = null),
(_this$elementaryStrea[ElementaryStreamTypes.AUDIOVIDEO] = null),
_this$elementaryStrea);
this.baseurl = baseurl; this.baseurl = baseurl;
} // setByteRange converts a EXT-X-BYTERANGE attribute into a two element array } // setByteRange converts a EXT-X-BYTERANGE attribute into a two element array
@ -19730,11 +19655,7 @@ typeof window !== "undefined" &&
function isMP4Url(url) { function isMP4Url(url) {
var _URLToolkit$parseURL$, _URLToolkit$parseURL; var _URLToolkit$parseURL$, _URLToolkit$parseURL;
return MP4_REGEX_SUFFIX.test( return MP4_REGEX_SUFFIX.test((_URLToolkit$parseURL$ = (_URLToolkit$parseURL = url_toolkit__WEBPACK_IMPORTED_MODULE_1__["parseURL"](url)) === null || _URLToolkit$parseURL === void 0 ? void 0 : _URLToolkit$parseURL.path) != null ? _URLToolkit$parseURL$ : "");
(_URLToolkit$parseURL$ = (_URLToolkit$parseURL = url_toolkit__WEBPACK_IMPORTED_MODULE_1__["parseURL"](url)) === null || _URLToolkit$parseURL === void 0 ? void 0 : _URLToolkit$parseURL.path) != null
? _URLToolkit$parseURL$
: ""
);
} }
var M3U8Parser = /*#__PURE__*/ (function () { var M3U8Parser = /*#__PURE__*/ (function () {
@ -20819,9 +20740,7 @@ typeof window !== "undefined" &&
timeout = false; timeout = false;
} }
_utils_logger__WEBPACK_IMPORTED_MODULE_3__["logger"].warn( _utils_logger__WEBPACK_IMPORTED_MODULE_3__["logger"].warn("[playlist-loader]: A network " + (timeout ? "timeout" : "error") + " occurred while loading " + context.type + " level: " + context.level + " id: " + context.id + ' group-id: "' + context.groupId + '"');
"[playlist-loader]: A network " + (timeout ? "timeout" : "error") + " occurred while loading " + context.type + " level: " + context.level + " id: " + context.id + ' group-id: "' + context.groupId + '"'
);
var details = _errors__WEBPACK_IMPORTED_MODULE_2__["ErrorDetails"].UNKNOWN; var details = _errors__WEBPACK_IMPORTED_MODULE_2__["ErrorDetails"].UNKNOWN;
var fatal = false; var fatal = false;
var loader = this.getInternalLoader(context); var loader = this.getInternalLoader(context);
@ -21004,20 +20923,20 @@ typeof window !== "undefined" &&
if (channelCount === 1) { if (channelCount === 1) {
// ffmpeg -y -f lavfi -i "aevalsrc=0:d=0.05" -c:a libfdk_aac -profile:a aac_he -b:a 4k output.aac && hexdump -v -e '16/1 "0x%x," "\n"' -v output.aac // ffmpeg -y -f lavfi -i "aevalsrc=0:d=0.05" -c:a libfdk_aac -profile:a aac_he -b:a 4k output.aac && hexdump -v -e '16/1 "0x%x," "\n"' -v output.aac
return new Uint8Array([ return new Uint8Array([
0x1, 0x40, 0x22, 0x80, 0xa3, 0x4e, 0xe6, 0x80, 0xba, 0x8, 0x0, 0x0, 0x0, 0x1c, 0x6, 0xf1, 0xc1, 0xa, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x1, 0x40, 0x22, 0x80, 0xa3, 0x4e, 0xe6, 0x80, 0xba, 0x8, 0x0, 0x0, 0x0, 0x1c, 0x6, 0xf1, 0xc1, 0xa, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a,
0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5e, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5e,
]); ]);
} else if (channelCount === 2) { } else if (channelCount === 2) {
// ffmpeg -y -f lavfi -i "aevalsrc=0|0:d=0.05" -c:a libfdk_aac -profile:a aac_he_v2 -b:a 4k output.aac && hexdump -v -e '16/1 "0x%x," "\n"' -v output.aac // ffmpeg -y -f lavfi -i "aevalsrc=0|0:d=0.05" -c:a libfdk_aac -profile:a aac_he_v2 -b:a 4k output.aac && hexdump -v -e '16/1 "0x%x," "\n"' -v output.aac
return new Uint8Array([ return new Uint8Array([
0x1, 0x40, 0x22, 0x80, 0xa3, 0x5e, 0xe6, 0x80, 0xba, 0x8, 0x0, 0x0, 0x0, 0x0, 0x95, 0x0, 0x6, 0xf1, 0xa1, 0xa, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x1, 0x40, 0x22, 0x80, 0xa3, 0x5e, 0xe6, 0x80, 0xba, 0x8, 0x0, 0x0, 0x0, 0x0, 0x95, 0x0, 0x6, 0xf1, 0xa1, 0xa, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a,
0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5e, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5e,
]); ]);
} else if (channelCount === 3) { } else if (channelCount === 3) {
// ffmpeg -y -f lavfi -i "aevalsrc=0|0|0:d=0.05" -c:a libfdk_aac -profile:a aac_he_v2 -b:a 4k output.aac && hexdump -v -e '16/1 "0x%x," "\n"' -v output.aac // ffmpeg -y -f lavfi -i "aevalsrc=0|0|0:d=0.05" -c:a libfdk_aac -profile:a aac_he_v2 -b:a 4k output.aac && hexdump -v -e '16/1 "0x%x," "\n"' -v output.aac
return new Uint8Array([ return new Uint8Array([
0x1, 0x40, 0x22, 0x80, 0xa3, 0x5e, 0xe6, 0x80, 0xba, 0x8, 0x0, 0x0, 0x0, 0x0, 0x95, 0x0, 0x6, 0xf1, 0xa1, 0xa, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x1, 0x40, 0x22, 0x80, 0xa3, 0x5e, 0xe6, 0x80, 0xba, 0x8, 0x0, 0x0, 0x0, 0x0, 0x95, 0x0, 0x6, 0xf1, 0xa1, 0xa, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a,
0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5e, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5e,
]); ]);
} }
@ -22334,13 +22253,7 @@ typeof window !== "undefined" &&
initSegment = this.generateIS(audioTrack, videoTrack, timeOffset); initSegment = this.generateIS(audioTrack, videoTrack, timeOffset);
} }
audio = this.remuxAudio( audio = this.remuxAudio(audioTrack, audioTimeOffset, this.isAudioContiguous, accurateTimeOffset, hasVideo || enoughVideoSamples || playlistType === _types_loader__WEBPACK_IMPORTED_MODULE_6__["PlaylistLevelType"].AUDIO ? videoTimeOffset : undefined);
audioTrack,
audioTimeOffset,
this.isAudioContiguous,
accurateTimeOffset,
hasVideo || enoughVideoSamples || playlistType === _types_loader__WEBPACK_IMPORTED_MODULE_6__["PlaylistLevelType"].AUDIO ? videoTimeOffset : undefined
);
if (enoughVideoSamples) { if (enoughVideoSamples) {
var audioTrackLength = audio ? audio.endPTS - audio.startPTS : 0; // if initSegment was generated without video samples, regenerate it again var audioTrackLength = audio ? audio.endPTS - audio.startPTS : 0; // if initSegment was generated without video samples, regenerate it again
@ -22531,9 +22444,7 @@ typeof window !== "undefined" &&
if (ptsDtsShift < averageSampleDuration * -2) { if (ptsDtsShift < averageSampleDuration * -2) {
// Fix for "CNN special report, with CC" in test-streams (including Safari browser) // Fix for "CNN special report, with CC" in test-streams (including Safari browser)
// With large PTS < DTS errors such as this, we want to correct CTS while maintaining increasing DTS values // With large PTS < DTS errors such as this, we want to correct CTS while maintaining increasing DTS values
_utils_logger__WEBPACK_IMPORTED_MODULE_5__["logger"].warn( _utils_logger__WEBPACK_IMPORTED_MODULE_5__["logger"].warn("PTS < DTS detected in video samples, offsetting DTS from PTS by " + Object(_utils_timescale_conversion__WEBPACK_IMPORTED_MODULE_7__["toMsFromMpegTsClock"])(-averageSampleDuration, true) + " ms");
"PTS < DTS detected in video samples, offsetting DTS from PTS by " + Object(_utils_timescale_conversion__WEBPACK_IMPORTED_MODULE_7__["toMsFromMpegTsClock"])(-averageSampleDuration, true) + " ms"
);
var lastDts = ptsDtsShift; var lastDts = ptsDtsShift;
for (var _i = 0; _i < nbSamples; _i++) { for (var _i = 0; _i < nbSamples; _i++) {
@ -22543,9 +22454,7 @@ typeof window !== "undefined" &&
} else { } else {
// Fix for "Custom IV with bad PTS DTS" in test-streams // Fix for "Custom IV with bad PTS DTS" in test-streams
// With smaller PTS < DTS errors we can simply move all DTS back. This increases CTS without causing buffer gaps or decode errors in Safari // With smaller PTS < DTS errors we can simply move all DTS back. This increases CTS without causing buffer gaps or decode errors in Safari
_utils_logger__WEBPACK_IMPORTED_MODULE_5__["logger"].warn( _utils_logger__WEBPACK_IMPORTED_MODULE_5__["logger"].warn("PTS < DTS detected in video samples, shifting DTS by " + Object(_utils_timescale_conversion__WEBPACK_IMPORTED_MODULE_7__["toMsFromMpegTsClock"])(ptsDtsShift, true) + " ms to overcome this issue");
"PTS < DTS detected in video samples, shifting DTS by " + Object(_utils_timescale_conversion__WEBPACK_IMPORTED_MODULE_7__["toMsFromMpegTsClock"])(ptsDtsShift, true) + " ms to overcome this issue"
);
for (var _i2 = 0; _i2 < nbSamples; _i2++) { for (var _i2 = 0; _i2 < nbSamples; _i2++) {
inputSamples[_i2].dts = inputSamples[_i2].dts + ptsDtsShift; inputSamples[_i2].dts = inputSamples[_i2].dts + ptsDtsShift;
@ -22563,13 +22472,9 @@ typeof window !== "undefined" &&
if (foundHole || foundOverlap) { if (foundHole || foundOverlap) {
if (foundHole) { if (foundHole) {
_utils_logger__WEBPACK_IMPORTED_MODULE_5__["logger"].warn( _utils_logger__WEBPACK_IMPORTED_MODULE_5__["logger"].warn("AVC: " + Object(_utils_timescale_conversion__WEBPACK_IMPORTED_MODULE_7__["toMsFromMpegTsClock"])(delta, true) + " ms (" + delta + "dts) hole between fragments detected, filling it");
"AVC: " + Object(_utils_timescale_conversion__WEBPACK_IMPORTED_MODULE_7__["toMsFromMpegTsClock"])(delta, true) + " ms (" + delta + "dts) hole between fragments detected, filling it"
);
} else { } else {
_utils_logger__WEBPACK_IMPORTED_MODULE_5__["logger"].warn( _utils_logger__WEBPACK_IMPORTED_MODULE_5__["logger"].warn("AVC: " + Object(_utils_timescale_conversion__WEBPACK_IMPORTED_MODULE_7__["toMsFromMpegTsClock"])(-delta, true) + " ms (" + delta + "dts) overlapping between fragments detected");
"AVC: " + Object(_utils_timescale_conversion__WEBPACK_IMPORTED_MODULE_7__["toMsFromMpegTsClock"])(-delta, true) + " ms (" + delta + "dts) overlapping between fragments detected"
);
} }
firstDTS = nextAvcDts; firstDTS = nextAvcDts;
@ -22682,9 +22587,7 @@ typeof window !== "undefined" &&
mp4SampleDuration = lastFrameDuration; mp4SampleDuration = lastFrameDuration;
} }
_utils_logger__WEBPACK_IMPORTED_MODULE_5__["logger"].log( _utils_logger__WEBPACK_IMPORTED_MODULE_5__["logger"].log("[mp4-remuxer]: It is approximately " + deltaToFrameEnd / 90 + " ms to the next segment; using duration " + mp4SampleDuration / 90 + " ms for the last video frame.");
"[mp4-remuxer]: It is approximately " + deltaToFrameEnd / 90 + " ms to the next segment; using duration " + mp4SampleDuration / 90 + " ms for the last video frame."
);
} else { } else {
mp4SampleDuration = lastFrameDuration; mp4SampleDuration = lastFrameDuration;
} }
@ -22759,10 +22662,7 @@ typeof window !== "undefined" &&
var timeOffsetMpegTS = timeOffset * inputTimeScale; var timeOffsetMpegTS = timeOffset * inputTimeScale;
this.isAudioContiguous = contiguous = this.isAudioContiguous = contiguous =
contiguous || contiguous || (inputSamples.length && nextAudioPts > 0 && ((accurateTimeOffset && Math.abs(timeOffsetMpegTS - nextAudioPts) < 9000) || Math.abs(normalizePts(inputSamples[0].pts - initPTS, timeOffsetMpegTS) - nextAudioPts) < 20 * inputSampleDuration)); // compute normalized PTS
(inputSamples.length &&
nextAudioPts > 0 &&
((accurateTimeOffset && Math.abs(timeOffsetMpegTS - nextAudioPts) < 9000) || Math.abs(normalizePts(inputSamples[0].pts - initPTS, timeOffsetMpegTS) - nextAudioPts) < 20 * inputSampleDuration)); // compute normalized PTS
inputSamples.forEach(function (sample) { inputSamples.forEach(function (sample) {
sample.pts = normalizePts(sample.pts - initPTS, timeOffsetMpegTS); sample.pts = normalizePts(sample.pts - initPTS, timeOffsetMpegTS);
@ -22833,9 +22733,7 @@ typeof window !== "undefined" &&
this.nextAudioPts = nextAudioPts = nextPts; this.nextAudioPts = nextAudioPts = nextPts;
} }
_utils_logger__WEBPACK_IMPORTED_MODULE_5__["logger"].warn( _utils_logger__WEBPACK_IMPORTED_MODULE_5__["logger"].warn("[mp4-remuxer]: Injecting " + missing + " audio frame @ " + (nextPts / inputTimeScale).toFixed(3) + "s due to " + Math.round((1000 * delta) / inputTimeScale) + " ms gap.");
"[mp4-remuxer]: Injecting " + missing + " audio frame @ " + (nextPts / inputTimeScale).toFixed(3) + "s due to " + Math.round((1000 * delta) / inputTimeScale) + " ms gap."
);
for (var j = 0; j < missing; j++) { for (var j = 0; j < missing; j++) {
var newStamp = Math.max(nextPts, 0); var newStamp = Math.max(nextPts, 0);

View file

@ -410,6 +410,10 @@
&:hover { &:hover {
background: var(--selected); background: var(--selected);
border-radius: 6px; border-radius: 6px;
.circular-play-button {
opacity: 1;
}
} }
&:active { &:active {
background: var(--selected-click); background: var(--selected-click);
@ -418,6 +422,22 @@
} }
} }
/* Circle Play Button */
.circular-play-button {
position: relative;
opacity: 0;
top: -34px;
z-index: 5;
left: 8px;
align-items: center;
background: rgba(100, 100, 100, 0.5);
border: none;
cursor: pointer;
border-radius: 100%;
height: 26px;
box-shadow: var(--ciderShadow-Generic);
}
/* horizontal media scroller */ /* horizontal media scroller */
.cd-hmedia-scroller { .cd-hmedia-scroller {
&::-webkit-scrollbar-thumb { &::-webkit-scrollbar-thumb {

View file

@ -294,6 +294,12 @@ const app = new Vue({
}, },
async oobeInit() { async oobeInit() {
this.appMode = "oobe"; this.appMode = "oobe";
for (const [k, v] of Object.entries(ipcRenderer.sendSync("get-i18n-listing"))) {
if (v.code === navigator.language.replace("-", "_")) {
this.cfg.general.language = v.code;
break;
}
}
this.setLz(this.cfg.general.language); this.setLz(this.cfg.general.language);
this.setLzManual(); this.setLzManual();
clearTimeout(this.hangtimer); clearTimeout(this.hangtimer);
@ -657,9 +663,46 @@ const app = new Vue({
this.modals.addToPlaylist = false; this.modals.addToPlaylist = false;
app.newPlaylist(app.getLz("term.newPlaylist"), pl_items); app.newPlaylist(app.getLz("term.newPlaylist"), pl_items);
}, },
async isSongInPlaylist(song_ids, playlist_id) {
let isInPlaylist = false;
const playlistTracks = (
await app.mk.api.v3.music(`/v1/me/library/playlists/${playlist_id}/tracks`, {
platform: "web",
l: app.mklang,
})
).data?.data;
playlistTracks.forEach((track) => {
if (song_ids.includes(track.id)) {
isInPlaylist = true;
}
});
return isInPlaylist;
},
addToPlaylist(pid, pitems) {
app.mk.api.v3
.music(
`/v1/me/library/playlists/${pid}/tracks`,
{},
{
fetchOptions: {
method: "POST",
body: JSON.stringify({
data: pitems,
}),
},
}
)
.then(() => {
if (app.page === "playlist_" + pid) {
app.getPlaylistFromID(app.showingPlaylist.id, true);
}
});
},
async addSelectedToPlaylist(playlist_id) { async addSelectedToPlaylist(playlist_id) {
let self = this; let self = this;
let pl_items = []; let pl_items = [];
const song_ids = [];
for (let i = 0; i < self.selectedMediaItems.length; i++) { for (let i = 0; i < self.selectedMediaItems.length; i++) {
if (self.selectedMediaItems[i].kind == "song" || self.selectedMediaItems[i].kind == "songs") { if (self.selectedMediaItems[i].kind == "song" || self.selectedMediaItems[i].kind == "songs") {
self.selectedMediaItems[i].kind = "songs"; self.selectedMediaItems[i].kind = "songs";
@ -667,6 +710,7 @@ const app = new Vue({
id: self.selectedMediaItems[i].id, id: self.selectedMediaItems[i].id,
type: self.selectedMediaItems[i].kind, type: self.selectedMediaItems[i].kind,
}); });
song_ids.push(self.selectedMediaItems[i].id);
} else if ((self.selectedMediaItems[i].kind == "album" || self.selectedMediaItems[i].kind == "albums") && self.selectedMediaItems[i].isLibrary != true) { } else if ((self.selectedMediaItems[i].kind == "album" || self.selectedMediaItems[i].kind == "albums") && self.selectedMediaItems[i].isLibrary != true) {
self.selectedMediaItems[i].kind = "albums"; self.selectedMediaItems[i].kind = "albums";
let res = await self.mk.api.v3.music(`/v1/catalog/${app.mk.storefrontId}/albums/${self.selectedMediaItems[i].id}/tracks`); let res = await self.mk.api.v3.music(`/v1/catalog/${app.mk.storefrontId}/albums/${self.selectedMediaItems[i].id}/tracks`);
@ -674,12 +718,14 @@ const app = new Vue({
return { id: i.id, type: i.type }; return { id: i.id, type: i.type };
}); });
pl_items = pl_items.concat(ids); pl_items = pl_items.concat(ids);
song_ids.push(...ids.map((id) => id.id));
} else if (self.selectedMediaItems[i].kind == "library-song" || self.selectedMediaItems[i].kind == "library-songs") { } else if (self.selectedMediaItems[i].kind == "library-song" || self.selectedMediaItems[i].kind == "library-songs") {
self.selectedMediaItems[i].kind = "library-songs"; self.selectedMediaItems[i].kind = "library-songs";
pl_items.push({ pl_items.push({
id: self.selectedMediaItems[i].id, id: self.selectedMediaItems[i].id,
type: self.selectedMediaItems[i].kind, type: self.selectedMediaItems[i].kind,
}); });
song_ids.push(self.selectedMediaItems[i].id);
} else if (self.selectedMediaItems[i].kind == "library-album" || self.selectedMediaItems[i].kind == "library-albums" || (self.selectedMediaItems[i].kind == "album" && self.selectedMediaItems[i].isLibrary == true)) { } else if (self.selectedMediaItems[i].kind == "library-album" || self.selectedMediaItems[i].kind == "library-albums" || (self.selectedMediaItems[i].kind == "album" && self.selectedMediaItems[i].isLibrary == true)) {
self.selectedMediaItems[i].kind = "library-albums"; self.selectedMediaItems[i].kind = "library-albums";
let res = await self.mk.api.v3.music(`/v1/me/library/albums/${self.selectedMediaItems[i].id}/tracks`); let res = await self.mk.api.v3.music(`/v1/me/library/albums/${self.selectedMediaItems[i].id}/tracks`);
@ -687,32 +733,26 @@ const app = new Vue({
return { id: i.id, type: i.type }; return { id: i.id, type: i.type };
}); });
pl_items = pl_items.concat(ids); pl_items = pl_items.concat(ids);
song_ids.push(...ids.map((id) => id.id));
} else { } else {
pl_items.push({ pl_items.push({
id: self.selectedMediaItems[i].id, id: self.selectedMediaItems[i].id,
type: self.selectedMediaItems[i].kind, type: self.selectedMediaItems[i].kind,
}); });
song_ids.push(self.selectedMediaItems[i].id);
} }
} }
this.modals.addToPlaylist = false; this.modals.addToPlaylist = false;
await app.mk.api.v3
.music( if (await this.isSongInPlaylist(song_ids, playlist_id)) {
`/v1/me/library/playlists/${playlist_id}/tracks`, app.confirm(app.getLz("action.addToPlaylist.duplicate"), (result) => {
{}, if (result === true) {
{ app.addToPlaylist(playlist_id, pl_items);
fetchOptions: {
method: "POST",
body: JSON.stringify({
data: pl_items,
}),
},
}
)
.then(() => {
if (this.page == "playlist_" + this.showingPlaylist.id) {
this.getPlaylistFromID(this.showingPlaylist.id, true);
} }
}); });
} else {
app.addToPlaylist(playlist_id, pl_items);
}
}, },
async init() { async init() {
let self = this; let self = this;
@ -1210,7 +1250,7 @@ const app = new Vue({
const notify = notyf.open({ const notify = notyf.open({
className: "notyf-info", className: "notyf-info",
type: "info", type: "info",
message: `[Themes] ${theme.name} has an update available.`, message: app.stringTemplateParser(app.getLz("settings.notyf.visual.theme.updateAvailable"), { theme: theme.name }),
}); });
notify.on("click", () => { notify.on("click", () => {
app.openSettingsPage("github-themes"); app.openSettingsPage("github-themes");
@ -1486,15 +1526,15 @@ const app = new Vue({
const cachedTrackMapping = await CiderCache.getCache("library-playlists-tracks"); const cachedTrackMapping = await CiderCache.getCache("library-playlists-tracks");
if (cachedPlaylist) { if (cachedPlaylist) {
console.debug("using cached playlists"); console.debug("[CiderCache] Using cached playlist");
this.playlists.listing = cachedPlaylist; this.playlists.listing = cachedPlaylist;
self.sortPlaylists(); self.sortPlaylists();
} else { } else {
console.debug("playlist has no cache"); console.debug("[CiderCache] Playlist has no cache");
} }
if (cachedTrackMapping) { if (cachedTrackMapping) {
console.debug("using cached track mapping"); console.debug("[CiderCache] Using cached track mapping");
this.playlists.trackMapping = cachedTrackMapping; this.playlists.trackMapping = cachedTrackMapping;
} }
if (localOnly) { if (localOnly) {
@ -1502,7 +1542,7 @@ const app = new Vue({
} }
} }
this.library.backgroundNotification.message = "Building playlist cache..."; this.library.backgroundNotification.message = app.getLz("notification.buildingPlaylistCache");
this.library.backgroundNotification.show = true; this.library.backgroundNotification.show = true;
async function deepScan(parent = "p.playlistsroot") { async function deepScan(parent = "p.playlistsroot") {
@ -2427,12 +2467,26 @@ const app = new Vue({
self.library.songs.displayListing.sort((a, b) => { self.library.songs.displayListing.sort((a, b) => {
let aa = a.attributes[prefs.sort]; let aa = a.attributes[prefs.sort];
let bb = b.attributes[prefs.sort]; let bb = b.attributes[prefs.sort];
if (prefs.sort == "genre") { if (prefs.sort === "genre") {
aa = a.attributes.genreNames[0]; aa = a.attributes.genreNames[0];
bb = b.attributes.genreNames[0]; bb = b.attributes.genreNames[0];
} else if (prefs.sort == "dateAdded") { } else if (prefs.sort === "dateAdded") {
aa = a.relationships?.albums?.data[0]?.attributes?.dateAdded; aa = a.relationships?.albums?.data[0]?.attributes?.dateAdded;
bb = b.relationships?.albums?.data[0]?.attributes?.dateAdded; bb = b.relationships?.albums?.data[0]?.attributes?.dateAdded;
} else if (prefs.sort === "artistName") {
if (a.relationships?.artists?.data[0]?.id === b.relationships?.artists?.data[0]?.id) {
aa = a.attributes.albumName;
bb = b.attributes.albumName;
}
if (a.relationships?.albums?.data[0]?.id === b.relationships?.albums?.data[0]?.id) {
aa = a.attributes.trackNumber;
bb = b.attributes.trackNumber;
}
} else if (prefs.sort === "albumName") {
if (a.relationships?.albums?.data[0]?.id === b.relationships?.albums?.data[0]?.id) {
aa = a.attributes.trackNumber;
bb = b.attributes.trackNumber;
}
} }
if (aa == null) { if (aa == null) {
aa = ""; aa = "";
@ -2440,13 +2494,13 @@ const app = new Vue({
if (bb == null) { if (bb == null) {
bb = ""; bb = "";
} }
if (prefs.sortOrder == "asc") { if (prefs.sortOrder === "asc") {
if (aa.toString().match(/^\d+$/) && bb.toString().match(/^\d+$/)) { if (aa.toString().match(/^\d+$/) && bb.toString().match(/^\d+$/)) {
return aa - bb; return aa - bb;
} else { } else {
return aa.toString().toLowerCase().localeCompare(bb.toString().toLowerCase()); return aa.toString().toLowerCase().localeCompare(bb.toString().toLowerCase());
} }
} else if (prefs.sortOrder == "desc") { } else if (prefs.sortOrder === "desc") {
if (aa.toString().match(/^\d+$/) && bb.toString().match(/^\d+$/)) { if (aa.toString().match(/^\d+$/) && bb.toString().match(/^\d+$/)) {
return bb - aa; return bb - aa;
} else { } else {
@ -3104,9 +3158,7 @@ const app = new Vue({
return; return;
} }
try { try {
let mfu = await app.mk.api.v3.music( let mfu = await app.mk.api.v3.music("/v1/me/library/playlists?platform=web&extend=editorialVideo&fields%5Bplaylists%5D=lastModifiedDate&filter%5Bfeatured%5D=made-for-you&include%5Blibrary-playlists%5D=catalog&fields%5Blibrary-playlists%5D=artwork%2Cname%2CplayParams%2CdateAdded");
"/v1/me/library/playlists?platform=web&extend=editorialVideo&fields%5Bplaylists%5D=lastModifiedDate&filter%5Bfeatured%5D=made-for-you&include%5Blibrary-playlists%5D=catalog&fields%5Blibrary-playlists%5D=artwork%2Cname%2CplayParams%2CdateAdded"
);
this.madeforyou = mfu.data; this.madeforyou = mfu.data;
} catch (e) { } catch (e) {
console.log(e); console.log(e);
@ -3286,10 +3338,7 @@ const app = new Vue({
let id, let id,
songLang = ""; songLang = "";
try { try {
if ( if (jsonResponse["message"]["body"]["macro_calls"]["matcher.track.get"]["message"]["header"]["status_code"] == 200 && jsonResponse["message"]["body"]["macro_calls"]["track.subtitles.get"]["message"]["header"]["status_code"] == 200) {
jsonResponse["message"]["body"]["macro_calls"]["matcher.track.get"]["message"]["header"]["status_code"] == 200 &&
jsonResponse["message"]["body"]["macro_calls"]["track.subtitles.get"]["message"]["header"]["status_code"] == 200
) {
id = jsonResponse["message"]["body"]["macro_calls"]["matcher.track.get"]["message"]["body"]["track"]["track_id"] ?? ""; id = jsonResponse["message"]["body"]["macro_calls"]["matcher.track.get"]["message"]["body"]["track"]["track_id"] ?? "";
lrcfile = jsonResponse["message"]["body"]["macro_calls"]["track.subtitles.get"]["message"]["body"]["subtitle_list"][0]["subtitle"]["subtitle_body"]; lrcfile = jsonResponse["message"]["body"]["macro_calls"]["track.subtitles.get"]["message"]["body"]["subtitle_list"][0]["subtitle"]["subtitle_body"];
vanity_id = jsonResponse["message"]["body"]["macro_calls"]["matcher.track.get"]["message"]["body"]["track"]["commontrack_vanity_id"]; vanity_id = jsonResponse["message"]["body"]["macro_calls"]["matcher.track.get"]["message"]["body"]["track"]["commontrack_vanity_id"];
@ -4202,13 +4251,7 @@ const app = new Vue({
} }
this.currentArtUrl = ""; this.currentArtUrl = "";
this.currentArtUrlRaw = ""; this.currentArtUrlRaw = "";
if ( if (app.mk.nowPlayingItem != null && app.mk.nowPlayingItem.attributes != null && app.mk.nowPlayingItem.attributes.artwork != null && app.mk.nowPlayingItem.attributes.artwork.url != null && app.mk.nowPlayingItem.attributes.artwork.url != "") {
app.mk.nowPlayingItem != null &&
app.mk.nowPlayingItem.attributes != null &&
app.mk.nowPlayingItem.attributes.artwork != null &&
app.mk.nowPlayingItem.attributes.artwork.url != null &&
app.mk.nowPlayingItem.attributes.artwork.url != ""
) {
this.currentArtUrlRaw = this.mk["nowPlayingItem"]["attributes"]["artwork"]["url"] ?? ""; this.currentArtUrlRaw = this.mk["nowPlayingItem"]["attributes"]["artwork"]["url"] ?? "";
this.currentArtUrl = (this.mk["nowPlayingItem"]["attributes"]["artwork"]["url"] ?? "").replace("{w}", artworkSize).replace("{h}", artworkSize); this.currentArtUrl = (this.mk["nowPlayingItem"]["attributes"]["artwork"]["url"] ?? "").replace("{w}", artworkSize).replace("{h}", artworkSize);
if (this.mk.nowPlayingItem._assets[0].artworkURL) { if (this.mk.nowPlayingItem._assets[0].artworkURL) {
@ -4595,7 +4638,7 @@ const app = new Vue({
name: app.getLz("action.removeFromLibrary"), name: app.getLz("action.removeFromLibrary"),
hidden: true, hidden: true,
action: function () { action: function () {
self.removeFromLibrary(); self.removeFromLibrary(app.mk.nowPlayingItem.type, MusicKitInterop.getAttributes().songId);
}, },
}, },
{ {

View file

@ -39,7 +39,7 @@
</div> </div>
<div class="row fs-row" v-if="tabMode != 'catalog'"> <div class="row fs-row" v-if="tabMode != 'catalog'">
<div class="col artwork-col"> <div class="col artwork-col">
<div class="artwork" @click="app.fullscreen(false)"> <div class="artwork" :class="$root.mk.isPlaying && 'playing'" @click="app.fullscreen(false)">
<mediaitem-artwork <mediaitem-artwork
:size="600" :size="600"
:video="video" :video="video"

View file

@ -1118,11 +1118,12 @@
<div class="md-option-line" v-show="app.cfg.connectivity.lastfm.enabled"> <div class="md-option-line" v-show="app.cfg.connectivity.lastfm.enabled">
<div class="md-option-segment"> <div class="md-option-segment">
{{$root.getLz('settings.option.connectivity.lastfmScrobble.filterTypes')}} {{$root.getLz('settings.option.connectivity.lastfmScrobble.filterTypes')}}
<small>{{$root.getLz('settings.option.connectivity.lastfmScrobble.filterTypes.description')}}</small>
</div> </div>
<div class="md-option-segment md-option-segment_auto"> <div class="md-option-segment md-option-segment_auto">
<label> <label>
<input type="checkbox" @change="filterChange" value="song">{{$root.getLz('term.songs')}}<br> <input type="checkbox" v-model="app.cfg.connectivity.lastfm.filter_types['song']">{{$root.getLz('term.songs')}}<br>
<input type="checkbox" @change="filterChange" value="musicVideo">{{$root.getLz('term.musicVideos')}}<br> <input type="checkbox" v-model="app.cfg.connectivity.lastfm.filter_types['musicVideo']">{{$root.getLz('term.musicVideos')}}
</label> </label>
</div> </div>
</div> </div>

View file

@ -5,8 +5,14 @@
<div class="col-auto cider-flex-center" @contextmenu="$root.hintscontext = true;getContextMenu()"> <div class="col-auto cider-flex-center" @contextmenu="$root.hintscontext = true;getContextMenu()">
<div class="artwork" :class="{'circle': item.type == 'artists'}"> <div class="artwork" :class="{'circle': item.type == 'artists'}">
<mediaitem-artwork <mediaitem-artwork
:url="item.attributes.artwork ? item.attributes.artwork.url : ''" :url="item.attributes.artwork ? item.attributes.artwork.url : ''"
:size="32"></mediaitem-artwork> :size="32"
:style="{'position': 'relative', 'z-index': '-1'}"
></mediaitem-artwork>
<button class="circular-play-button" @click.stop="playTrack(item)">
<div class="_svg-icon" style="--icon:url(\.\/assets\/play\.svg); width: 15px;">
</div>
</button>
</div> </div>
</div> </div>
<div class="col queue-info" @contextmenu="$root.hintscontext = true;getContextMenu()"> <div class="col queue-info" @contextmenu="$root.hintscontext = true;getContextMenu()">
@ -92,7 +98,7 @@
return this.contextMenu(event) return this.contextMenu(event)
} }
},{once: true})} },{once: true})}
}, },
async contextMenu(event) { async contextMenu(event) {
let self = this let self = this
@ -296,7 +302,7 @@
menus.normal.items.find(x => x.id == 'addToLibrary').disabled = false menus.normal.items.find(x => x.id == 'addToLibrary').disabled = false
} }
}) })
} catch (e) { } catch (e) {
console.log(e) console.log(e)
} }
@ -313,9 +319,9 @@
menus.normal.headerItems.find(x => x.id == 'dislike').hidden = true menus.normal.headerItems.find(x => x.id == 'dislike').hidden = true
} }
} catch (err) { } catch (err) {
} }
if (this.contextExt) { if (this.contextExt) {
if (this.contextExt.normal) { if (this.contextExt.normal) {
menus.normal.items = menus.normal.items.concat(this.contextExt.normal) menus.normal.items = menus.normal.items.concat(this.contextExt.normal)
@ -373,7 +379,7 @@
window.open(app.getMediaItemArtwork(this.getArtworkUrl(), 1024, 1024)) window.open(app.getMediaItemArtwork(this.getArtworkUrl(), 1024, 1024))
} }
}, },
] ]
}, event) }, event)
}, },
@ -393,6 +399,87 @@
return `url("${artwork}")` return `url("${artwork}")`
} }
}, },
playTrack(item) {
let parent = this.parent
let childIndex = this.index
let kind = (item.attributes.playParams ? (item.attributes.playParams?.kind ?? (item.type ?? '')) : (item.type ?? ''));
let id = (item.attributes.playParams ? (item.attributes.playParams?.id ?? (item.id ?? '')) : (item.id ?? ''));
;
let isLibrary = item.attributes.playParams ? (item.attributes.playParams?.isLibrary ?? false) : false;
let truekind = (!kind.endsWith("s")) ? (kind + "s") : kind;
console.log(item, parent, childIndex, kind, id, isLibrary, kind == "playlists", id.startsWith("p.") || id.startsWith("pl.u"))
app.mk.stop().then(() => {
if (parent != null && childIndex != null) {
app.queueParentandplayChild(parent, childIndex, item);
} else if (kind.includes("playlist") && (id.startsWith("p.") || id.startsWith("pl."))) {
function shuffleArray(array) {
for (var i = array.length - 1; i > 0; i--) {
var j = Math.floor(Math.random() * (i + 1));
var temp = array[i];
array[i] = array[j];
array[j] = temp;
}
}
app.mk.setQueue({
[truekind]: [item.attributes.playParams?.id ?? item.id],
parameters: { l: this.app.mklang }
}).then(function() {
app.mk.play().then(function() {
var playlistId = id
function getPlaylist(id, isLibrary) {
if (isLibrary) {
return this.app.mk.api.v3.music(`/v1/me/library/playlists/${id}`)
} else {
return this.app.mk.api.v3.music(`/v1/catalog/${app.mk.storefrontId}/playlists/${id}`)
}
}
try {
getPlaylist(id, isLibrary).then(res => {
//let query = res.relationships.tracks.data.map(item => new MusicKit.MediaItem(item));
//if (app.mk.shuffleMode == 1){shuffleArray(query); }
// console.log(query)
// app.mk.queue.append(query)
if (!res.data.relationships.tracks.next) {
return
} else {
getPlaylistTracks(res.data.relationships.tracks.next)
}
function getPlaylistTracks(next) {
app.apiCall(app.musicBaseUrl + next, res => {
// if (res.id != playlistId || next.includes(playlistId)) {
// return
// }
console.log('nextres', res)
let query = res.data.map(item => new MusicKit.MediaItem(item))
if (app.mk.shuffleMode == 1) {
shuffleArray(query);
console.log('shf')
}
app.mk.queue.append(query)
if (res.next) {
getPlaylistTracks(res.next)
}
})
}
})
} catch (e) {
}
})
})
} else {
app.playMediaItemById(item.attributes.playParams?.id ?? item.id, item.attributes.playParams?.kind ?? item.type, item.attributes.playParams?.isLibrary ?? false, item.attributes.url)
}
})
},
}, },
beforeDestroy: function () { beforeDestroy: function () {
// this.item = null; // this.item = null;
@ -401,4 +488,3 @@
} }
}); });
</script> </script>

View file

@ -647,6 +647,7 @@
return { return {
normal: [ normal: [
{ {
icon: "./assets/feather/x-circle.svg",
name: app.getLz('action.removeFromPlaylist'), name: app.getLz('action.removeFromPlaylist'),
action: () => { action: () => {
self.remove() self.remove()
@ -655,6 +656,7 @@
], ],
multiple: [ multiple: [
{ {
icon: "./assets/feather/x-circle.svg",
name: app.getLz('action.removeFromPlaylist'), name: app.getLz('action.removeFromPlaylist'),
action: () => { action: () => {
self.remove() self.remove()

View file

@ -446,6 +446,7 @@
return { return {
normal: [ normal: [
{ {
icon: "./assets/feather/x-circle.svg",
name: app.getLz('action.removeFromPlaylist'), name: app.getLz('action.removeFromPlaylist'),
action: () => { action: () => {
self.remove() self.remove()
@ -454,6 +455,7 @@
], ],
multiple: [ multiple: [
{ {
icon: "./assets/feather/x-circle.svg",
name: app.getLz('action.removeFromPlaylist'), name: app.getLz('action.removeFromPlaylist'),
action: () => { action: () => {
self.remove() self.remove()

View file

@ -320,7 +320,7 @@
{ {
"icon": "./assets/feather/heart.svg", "icon": "./assets/feather/heart.svg",
"id": "love", "id": "love",
"name": "Love", "name": app.getLz("action.love"),
"hidden": false, "hidden": false,
"disabled": true, "disabled": true,
"action": function() { "action": function() {
@ -331,7 +331,7 @@
"icon": "./assets/feather/heart.svg", "icon": "./assets/feather/heart.svg",
"id": "unlove", "id": "unlove",
"active": true, "active": true,
"name": "Unlove", "name": app.getLz("action.unlove"),
"hidden": true, "hidden": true,
"action": function() { "action": function() {
app.unlove(self.item) app.unlove(self.item)
@ -340,7 +340,7 @@
{ {
"icon": "./assets/feather/thumbs-down.svg", "icon": "./assets/feather/thumbs-down.svg",
"id": "dislike", "id": "dislike",
"name": "Dislike", "name": app.getLz("action.dislike"),
"hidden": false, "hidden": false,
"disabled": true, "disabled": true,
"action": function() { "action": function() {
@ -350,7 +350,7 @@
{ {
"icon": "./assets/feather/thumbs-down.svg", "icon": "./assets/feather/thumbs-down.svg",
"id": "undo_dislike", "id": "undo_dislike",
"name": "Undo dislike", "name": app.getLz("action.undoDislike"),
"active": true, "active": true,
"hidden": true, "hidden": true,
"action": function() { "action": function() {
@ -362,7 +362,7 @@
{ {
"icon": "./assets/feather/list.svg", "icon": "./assets/feather/list.svg",
"id": "addToPlaylist", "id": "addToPlaylist",
"name": "Add to Playlist...", "name": app.getLz("action.addToPlaylist") + " ...",
"action": function() { "action": function() {
app.promptAddToPlaylist() app.promptAddToPlaylist()
} }
@ -370,7 +370,7 @@
{ {
"id": "addToLibrary", "id": "addToLibrary",
"icon": "./assets/feather/plus.svg", "icon": "./assets/feather/plus.svg",
"name": "Add to library", "name": app.getLz("action.addToLibrary") + " ...",
"hidden": false, "hidden": false,
"disabled": true, "disabled": true,
"action": function() { "action": function() {
@ -383,7 +383,7 @@
{ {
"id": "removeFromLibrary", "id": "removeFromLibrary",
"icon": "./assets/feather/x-circle.svg", "icon": "./assets/feather/x-circle.svg",
"name": "Remove from library", "name": app.getLz("action.removeFromLibrary"),
"hidden": true, "hidden": true,
"action": async function() { "action": async function() {
console.log("remove"); console.log("remove");
@ -394,7 +394,7 @@
} }
}, },
{ {
"name": "Play Next", "name": app.getLz("action.playNext"),
"icon": "./assets/arrow-bend-up.svg", "icon": "./assets/arrow-bend-up.svg",
"action": function() { "action": function() {
app.mk.playNext({ [self.item.attributes.playParams.kind ?? self.item.type]: self.item.attributes.playParams.id ?? self.item.id }) app.mk.playNext({ [self.item.attributes.playParams.kind ?? self.item.type]: self.item.attributes.playParams.id ?? self.item.id })
@ -403,7 +403,7 @@
} }
}, },
{ {
"name": "Play Later", "name": app.getLz("action.playLater"),
"icon": "./assets/arrow-bend-down.svg", "icon": "./assets/arrow-bend-down.svg",
"action": function() { "action": function() {
app.mk.playLater({ [self.item.attributes.playParams.kind ?? self.item.type]: self.item.attributes.playParams.id ?? self.item.id }) app.mk.playLater({ [self.item.attributes.playParams.kind ?? self.item.type]: self.item.attributes.playParams.id ?? self.item.id })
@ -413,7 +413,7 @@
}, },
{ {
"icon": "./assets/feather/share.svg", "icon": "./assets/feather/share.svg",
"name": "Share", "name": app.getLz("action.share"),
"action": function() { "action": function() {
self.app.copyToClipboard(self.item.attributes.url) self.app.copyToClipboard(self.item.attributes.url)
} }

View file

@ -262,29 +262,7 @@
ue.pop(), (ce.target = ue[ue.length - 1]); ue.pop(), (ce.target = ue[ue.length - 1]);
} }
var pe = function (e, t, n, r, i, o, a, s) { var pe = function (e, t, n, r, i, o, a, s) {
(this.tag = e), (this.tag = e), (this.data = t), (this.children = n), (this.text = r), (this.elm = i), (this.ns = void 0), (this.context = o), (this.fnContext = void 0), (this.fnOptions = void 0), (this.fnScopeId = void 0), (this.key = t && t.key), (this.componentOptions = a), (this.componentInstance = void 0), (this.parent = void 0), (this.raw = !1), (this.isStatic = !1), (this.isRootInsert = !0), (this.isComment = !1), (this.isCloned = !1), (this.isOnce = !1), (this.asyncFactory = s), (this.asyncMeta = void 0), (this.isAsyncPlaceholder = !1);
(this.data = t),
(this.children = n),
(this.text = r),
(this.elm = i),
(this.ns = void 0),
(this.context = o),
(this.fnContext = void 0),
(this.fnOptions = void 0),
(this.fnScopeId = void 0),
(this.key = t && t.key),
(this.componentOptions = a),
(this.componentInstance = void 0),
(this.parent = void 0),
(this.raw = !1),
(this.isStatic = !1),
(this.isRootInsert = !0),
(this.isComment = !1),
(this.isCloned = !1),
(this.isOnce = !1),
(this.asyncFactory = s),
(this.asyncMeta = void 0),
(this.isAsyncPlaceholder = !1);
}, },
de = { child: { configurable: !0 } }; de = { child: { configurable: !0 } };
(de.child.get = function () { (de.child.get = function () {
@ -696,8 +674,7 @@
} }
function it(e, n, i, o, a, s) { function it(e, n, i, o, a, s) {
var c, u, l, f; var c, u, l, f;
for (c in e) for (c in e) (u = e[c]), (l = n[c]), (f = nt(c)), t(u) || (t(l) ? (t(u.fns) && (u = e[c] = rt(u, s)), r(f.once) && (u = e[c] = a(f.name, u, f.capture)), i(f.name, u, f.capture, f.passive, f.params)) : u !== l && ((l.fns = u), (e[c] = l)));
(u = e[c]), (l = n[c]), (f = nt(c)), t(u) || (t(l) ? (t(u.fns) && (u = e[c] = rt(u, s)), r(f.once) && (u = e[c] = a(f.name, u, f.capture)), i(f.name, u, f.capture, f.passive, f.params)) : u !== l && ((l.fns = u), (e[c] = l)));
for (c in n) t(e[c]) && o((f = nt(c)).name, n[c], f.capture); for (c in n) t(e[c]) && o((f = nt(c)).name, n[c], f.capture);
} }
function ot(e, i, o) { function ot(e, i, o) {
@ -723,20 +700,7 @@
? (function e(o, a) { ? (function e(o, a) {
var s = []; var s = [];
var c, u, l, f; var c, u, l, f;
for (c = 0; c < o.length; c++) for (c = 0; c < o.length; c++) t((u = o[c])) || "boolean" == typeof u || ((l = s.length - 1), (f = s[l]), Array.isArray(u) ? u.length > 0 && (ct((u = e(u, (a || "") + "_" + c))[0]) && ct(f) && ((s[l] = he(f.text + u[0].text)), u.shift()), s.push.apply(s, u)) : i(u) ? (ct(f) ? (s[l] = he(f.text + u)) : "" !== u && s.push(he(u))) : ct(u) && ct(f) ? (s[l] = he(f.text + u.text)) : (r(o._isVList) && n(u.tag) && t(u.key) && n(a) && (u.key = "__vlist" + a + "_" + c + "__"), s.push(u)));
t((u = o[c])) ||
"boolean" == typeof u ||
((l = s.length - 1),
(f = s[l]),
Array.isArray(u)
? u.length > 0 && (ct((u = e(u, (a || "") + "_" + c))[0]) && ct(f) && ((s[l] = he(f.text + u[0].text)), u.shift()), s.push.apply(s, u))
: i(u)
? ct(f)
? (s[l] = he(f.text + u))
: "" !== u && s.push(he(u))
: ct(u) && ct(f)
? (s[l] = he(f.text + u.text))
: (r(o._isVList) && n(u.tag) && t(u.key) && n(a) && (u.key = "__vlist" + a + "_" + c + "__"), s.push(u)));
return s; return s;
})(e) })(e)
: void 0; : void 0;
@ -1166,8 +1130,7 @@
var u, l; var u, l;
if ("string" == typeof i) { if ("string" == typeof i) {
var f; var f;
(l = (e.$vnode && e.$vnode.ns) || F.getTagNamespace(i)), (l = (e.$vnode && e.$vnode.ns) || F.getTagNamespace(i)), (u = F.isReservedTag(i) ? new pe(F.parsePlatformTagName(i), a, s, void 0, void 0, e) : (a && a.pre) || !n((f = Le(e.$options, "components", i))) ? new pe(i, a, s, void 0, void 0, e) : Mt(f, a, e, s, i));
(u = F.isReservedTag(i) ? new pe(F.parsePlatformTagName(i), a, s, void 0, void 0, e) : (a && a.pre) || !n((f = Le(e.$options, "components", i))) ? new pe(i, a, s, void 0, void 0, e) : Mt(f, a, e, s, i));
} else u = Mt(i, a, e, s); } else u = Mt(i, a, e, s);
return Array.isArray(u) return Array.isArray(u)
? u ? u
@ -1862,9 +1825,7 @@
(function (e) { (function (e) {
I.forEach(function (t) { I.forEach(function (t) {
e[t] = function (e, n) { e[t] = function (e, n) {
return n return n ? ("component" === t && s(n) && ((n.name = n.name || e), (n = this.options._base.extend(n))), "directive" === t && "function" == typeof n && (n = { bind: n, update: n }), (this.options[t + "s"][e] = n), n) : this.options[t + "s"][e];
? ("component" === t && s(n) && ((n.name = n.name || e), (n = this.options._base.extend(n))), "directive" === t && "function" == typeof n && (n = { bind: n, update: n }), (this.options[t + "s"][e] = n), n)
: this.options[t + "s"][e];
}; };
}); });
})(e); })(e);
@ -1887,9 +1848,7 @@
Mn = function (e, t) { Mn = function (e, t) {
return Bn(t) || "false" === t ? "false" : "contenteditable" === e && In(t) ? t : "true"; return Bn(t) || "false" === t ? "false" : "contenteditable" === e && In(t) ? t : "true";
}, },
Fn = p( Fn = p("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,truespeed,typemustmatch,visible"),
"allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,truespeed,typemustmatch,visible"
),
Pn = "http://www.w3.org/1999/xlink", Pn = "http://www.w3.org/1999/xlink",
Rn = function (e) { Rn = function (e) {
return ":" === e.charAt(5) && "xlink" === e.slice(0, 5); return ":" === e.charAt(5) && "xlink" === e.slice(0, 5);
@ -2109,19 +2068,7 @@
} }
} }
function hr(e, t, n, r) { function hr(e, t, n, r) {
r || e.tagName.indexOf("-") > -1 r || e.tagName.indexOf("-") > -1 ? mr(e, t, n) : Fn(t) ? (Bn(n) ? e.removeAttribute(t) : ((n = "allowfullscreen" === t && "EMBED" === e.tagName ? "true" : t), e.setAttribute(t, n))) : Ln(t) ? e.setAttribute(t, Mn(t, n)) : Rn(t) ? (Bn(n) ? e.removeAttributeNS(Pn, Hn(t)) : e.setAttributeNS(Pn, t, n)) : mr(e, t, n);
? mr(e, t, n)
: Fn(t)
? Bn(n)
? e.removeAttribute(t)
: ((n = "allowfullscreen" === t && "EMBED" === e.tagName ? "true" : t), e.setAttribute(t, n))
: Ln(t)
? e.setAttribute(t, Mn(t, n))
: Rn(t)
? Bn(n)
? e.removeAttributeNS(Pn, Hn(t))
: e.setAttributeNS(Pn, t, n)
: mr(e, t, n);
} }
function mr(e, t, n) { function mr(e, t, n) {
if (Bn(n)) e.removeAttribute(t); if (Bn(n)) e.removeAttribute(t);
@ -2264,15 +2211,7 @@
} }
function Mr(t, n, r, i, o, a, s, c) { function Mr(t, n, r, i, o, a, s, c) {
var u; var u;
(i = i || e).right (i = i || e).right ? (c ? (n = "(" + n + ")==='click'?'contextmenu':(" + n + ")") : "click" === n && ((n = "contextmenu"), delete i.right)) : i.middle && (c ? (n = "(" + n + ")==='click'?'mouseup':(" + n + ")") : "click" === n && (n = "mouseup")), i.capture && (delete i.capture, (n = Ir("!", n, c))), i.once && (delete i.once, (n = Ir("~", n, c))), i.passive && (delete i.passive, (n = Ir("&", n, c))), i.native ? (delete i.native, (u = t.nativeEvents || (t.nativeEvents = {}))) : (u = t.events || (t.events = {}));
? c
? (n = "(" + n + ")==='click'?'contextmenu':(" + n + ")")
: "click" === n && ((n = "contextmenu"), delete i.right)
: i.middle && (c ? (n = "(" + n + ")==='click'?'mouseup':(" + n + ")") : "click" === n && (n = "mouseup")),
i.capture && (delete i.capture, (n = Ir("!", n, c))),
i.once && (delete i.once, (n = Ir("~", n, c))),
i.passive && (delete i.passive, (n = Ir("&", n, c))),
i.native ? (delete i.native, (u = t.nativeEvents || (t.nativeEvents = {}))) : (u = t.events || (t.events = {}));
var l = Hr({ value: r.trim(), dynamic: c }, s); var l = Hr({ value: r.trim(), dynamic: c }, s);
i !== e && (l.modifiers = i); i !== e && (l.modifiers = i);
var f = u[n]; var f = u[n];
@ -2558,9 +2497,7 @@
Oi = "transitionend", Oi = "transitionend",
Si = "animation", Si = "animation",
Ti = "animationend"; Ti = "animationend";
Ci && Ci && (void 0 === window.ontransitionend && void 0 !== window.onwebkittransitionend && ((Ai = "WebkitTransition"), (Oi = "webkitTransitionEnd")), void 0 === window.onanimationend && void 0 !== window.onwebkitanimationend && ((Si = "WebkitAnimation"), (Ti = "webkitAnimationEnd")));
(void 0 === window.ontransitionend && void 0 !== window.onwebkittransitionend && ((Ai = "WebkitTransition"), (Oi = "webkitTransitionEnd")),
void 0 === window.onanimationend && void 0 !== window.onwebkitanimationend && ((Si = "WebkitAnimation"), (Ti = "webkitAnimationEnd")));
var Ni = V var Ni = V
? window.requestAnimationFrame ? window.requestAnimationFrame
? window.requestAnimationFrame.bind(window) ? window.requestAnimationFrame.bind(window)
@ -2638,30 +2575,7 @@
n(i._leaveCb) && ((i._leaveCb.cancelled = !0), i._leaveCb()); n(i._leaveCb) && ((i._leaveCb.cancelled = !0), i._leaveCb());
var a = $i(e.data.transition); var a = $i(e.data.transition);
if (!t(a) && !n(i._enterCb) && 1 === i.nodeType) { if (!t(a) && !n(i._enterCb) && 1 === i.nodeType) {
for ( for (var s = a.css, c = a.type, u = a.enterClass, l = a.enterToClass, p = a.enterActiveClass, d = a.appearClass, v = a.appearToClass, h = a.appearActiveClass, m = a.beforeEnter, y = a.enter, g = a.afterEnter, _ = a.enterCancelled, b = a.beforeAppear, $ = a.appear, w = a.afterAppear, C = a.appearCancelled, x = a.duration, k = Zt, A = Zt.$vnode; A && A.parent; ) (k = A.context), (A = A.parent);
var s = a.css,
c = a.type,
u = a.enterClass,
l = a.enterToClass,
p = a.enterActiveClass,
d = a.appearClass,
v = a.appearToClass,
h = a.appearActiveClass,
m = a.beforeEnter,
y = a.enter,
g = a.afterEnter,
_ = a.enterCancelled,
b = a.beforeAppear,
$ = a.appear,
w = a.afterAppear,
C = a.appearCancelled,
x = a.duration,
k = Zt,
A = Zt.$vnode;
A && A.parent;
)
(k = A.context), (A = A.parent);
var O = !k._isMounted || !e.isRootInsert; var O = !k._isMounted || !e.isRootInsert;
if (!O || $ || "" === $) { if (!O || $ || "" === $) {
var S = O && d ? d : u, var S = O && d ? d : u,
@ -2786,11 +2700,7 @@
var f = e.data, var f = e.data,
p = e.children, p = e.children,
m = e.tag; m = e.tag;
n(m) n(m) ? ((e.elm = e.ns ? u.createElementNS(e.ns, m) : u.createElement(m, e)), g(e), h(e, p, t), n(f) && y(e, t), v(i, e.elm, o)) : r(e.isComment) ? ((e.elm = u.createComment(e.text)), v(i, e.elm, o)) : ((e.elm = u.createTextNode(e.text)), v(i, e.elm, o));
? ((e.elm = e.ns ? u.createElementNS(e.ns, m) : u.createElement(m, e)), g(e), h(e, p, t), n(f) && y(e, t), v(i, e.elm, o))
: r(e.isComment)
? ((e.elm = u.createComment(e.text)), v(i, e.elm, o))
: ((e.elm = u.createTextNode(e.text)), v(i, e.elm, o));
} }
} }
function d(e, t) { function d(e, t) {
@ -2894,9 +2804,7 @@
? (x(h, b, o, i, y), w && u.insertBefore(e, h.elm, u.nextSibling(m.elm)), (h = r[++p]), (b = i[--y])) ? (x(h, b, o, i, y), w && u.insertBefore(e, h.elm, u.nextSibling(m.elm)), (h = r[++p]), (b = i[--y]))
: or(m, g) : or(m, g)
? (x(m, g, o, i, d), w && u.insertBefore(e, m.elm, h.elm), (m = r[--v]), (g = i[++d])) ? (x(m, g, o, i, d), w && u.insertBefore(e, m.elm, h.elm), (m = r[--v]), (g = i[++d]))
: (t(s) && (s = ar(r, p, v)), : (t(s) && (s = ar(r, p, v)), t((c = n(g.key) ? s[g.key] : C(g, r, p, v))) ? f(g, o, e, h.elm, !1, i, d) : or((l = r[c]), g) ? (x(l, g, o, i, d), (r[c] = void 0), w && u.insertBefore(e, l.elm, h.elm)) : f(g, o, e, h.elm, !1, i, d), (g = i[++d]));
t((c = n(g.key) ? s[g.key] : C(g, r, p, v))) ? f(g, o, e, h.elm, !1, i, d) : or((l = r[c]), g) ? (x(l, g, o, i, d), (r[c] = void 0), w && u.insertBefore(e, l.elm, h.elm)) : f(g, o, e, h.elm, !1, i, d),
(g = i[++d]));
p > v ? _(e, t(i[y + 1]) ? null : i[y + 1].elm, i, d, y, o) : d > y && $(r, p, v); p > v ? _(e, t(i[y + 1]) ? null : i[y + 1].elm, i, d, y, o) : d > y && $(r, p, v);
})(p, h, y, o, l) })(p, h, y, o, l)
: n(y) : n(y)
@ -3015,8 +2923,7 @@
}) })
: Ji(e, t, n.context), : Ji(e, t, n.context),
(e._vOptions = [].map.call(e.options, Zi))) (e._vOptions = [].map.call(e.options, Zi)))
: ("textarea" === n.tag || Yn(e.type)) && : ("textarea" === n.tag || Yn(e.type)) && ((e._vModifiers = t.modifiers), t.modifiers.lazy || (e.addEventListener("compositionstart", Gi), e.addEventListener("compositionend", Xi), e.addEventListener("change", Xi), W && (e.vmodel = !0)));
((e._vModifiers = t.modifiers), t.modifiers.lazy || (e.addEventListener("compositionstart", Gi), e.addEventListener("compositionend", Xi), e.addEventListener("change", Xi), W && (e.vmodel = !0)));
}, },
componentUpdated: function (e, t, n) { componentUpdated: function (e, t, n) {
if ("select" === n.tag) { if ("select" === n.tag) {
@ -3378,9 +3285,7 @@
}, },
$o = p("area,base,br,col,embed,frame,hr,img,input,isindex,keygen,link,meta,param,source,track,wbr"), $o = p("area,base,br,col,embed,frame,hr,img,input,isindex,keygen,link,meta,param,source,track,wbr"),
wo = p("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source"), wo = p("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source"),
Co = p( Co = p("address,article,aside,base,blockquote,body,caption,col,colgroup,dd,details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,legend,li,menuitem,meta,optgroup,option,param,rp,rt,source,style,summary,tbody,td,tfoot,th,thead,title,tr,track"),
"address,article,aside,base,blockquote,body,caption,col,colgroup,dd,details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,legend,li,menuitem,meta,optgroup,option,param,rp,rt,source,style,summary,tbody,td,tfoot,th,thead,title,tr,track"
),
xo = /^\s*([^\s"'<>\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/, xo = /^\s*([^\s"'<>\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,
ko = /^\s*((?:v-[\w-]+:|@|:|#)\[[^=]+?\][^\s"'<>\/=]*)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/, ko = /^\s*((?:v-[\w-]+:|@|:|#)\[[^=]+?\][^\s"'<>\/=]*)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,
Ao = "[a-zA-Z_][\\-\\.0-9_a-zA-Z" + P.source + "]*", Ao = "[a-zA-Z_][\\-\\.0-9_a-zA-Z" + P.source + "]*",
@ -3782,14 +3687,7 @@
for (t = 0, n = u.length; t < n; t++) for (t = 0, n = u.length; t < n; t++)
if (((r = i = u[t].name), (o = u[t].value), Xo.test(r))) if (((r = i = u[t].name), (o = u[t].value), Xo.test(r)))
if (((e.hasBindings = !0), (a = ma(r.replace(Xo, ""))) && (r = r.replace(ia, "")), ra.test(r))) if (((e.hasBindings = !0), (a = ma(r.replace(Xo, ""))) && (r = r.replace(ia, "")), ra.test(r)))
(r = r.replace(ra, "")), (r = r.replace(ra, "")), (o = Or(o)), (c = ta.test(r)) && (r = r.slice(1, -1)), a && (a.prop && !c && "innerHtml" === (r = b(r)) && (r = "innerHTML"), a.camel && !c && (r = b(r)), a.sync && ((s = Ur(o, "$event")), c ? Mr(e, '"update:"+(' + r + ")", s, null, !1, 0, u[t], !0) : (Mr(e, "update:" + b(r), s, null, !1, 0, u[t]), C(r) !== b(r) && Mr(e, "update:" + C(r), s, null, !1, 0, u[t])))), (a && a.prop) || (!e.component && Wo(e.tag, e.attrsMap.type, r)) ? Er(e, r, o, u[t], c) : jr(e, r, o, u[t], c);
(o = Or(o)),
(c = ta.test(r)) && (r = r.slice(1, -1)),
a &&
(a.prop && !c && "innerHtml" === (r = b(r)) && (r = "innerHTML"),
a.camel && !c && (r = b(r)),
a.sync && ((s = Ur(o, "$event")), c ? Mr(e, '"update:"+(' + r + ")", s, null, !1, 0, u[t], !0) : (Mr(e, "update:" + b(r), s, null, !1, 0, u[t]), C(r) !== b(r) && Mr(e, "update:" + C(r), s, null, !1, 0, u[t])))),
(a && a.prop) || (!e.component && Wo(e.tag, e.attrsMap.type, r)) ? Er(e, r, o, u[t], c) : jr(e, r, o, u[t], c);
else if (Go.test(r)) (r = r.replace(Go, "")), (c = ta.test(r)) && (r = r.slice(1, -1)), Mr(e, r, o, a, !1, 0, u[t], c); else if (Go.test(r)) (r = r.replace(Go, "")), (c = ta.test(r)) && (r = r.slice(1, -1)), Mr(e, r, o, a, !1, 0, u[t], c);
else { else {
var l = (r = r.replace(Xo, "")).match(na), var l = (r = r.replace(Xo, "")).match(na),
@ -3884,8 +3782,7 @@
if (e.component) return Br(e, r, i), !1; if (e.component) return Br(e, r, i), !1;
if ("select" === o) if ("select" === o)
!(function (e, t, n) { !(function (e, t, n) {
var r = var r = 'var $$selectedVal = Array.prototype.filter.call($event.target.options,function(o){return o.selected}).map(function(o){var val = "_value" in o ? o._value : o.value;return ' + (n && n.number ? "_n(val)" : "val") + "});";
'var $$selectedVal = Array.prototype.filter.call($event.target.options,function(o){return o.selected}).map(function(o){var val = "_value" in o ? o._value : o.value;return ' + (n && n.number ? "_n(val)" : "val") + "});";
(r = r + " " + Ur(t, "$event.target.multiple ? $$selectedVal : $$selectedVal[0]")), Mr(e, "change", r, null, !0); (r = r + " " + Ur(t, "$event.target.multiple ? $$selectedVal : $$selectedVal[0]")), Mr(e, "change", r, null, !0);
})(e, r, i); })(e, r, i);
else if ("input" === o && "checkbox" === a) else if ("input" === o && "checkbox" === a)
@ -3894,28 +3791,7 @@
i = Fr(e, "value") || "null", i = Fr(e, "value") || "null",
o = Fr(e, "true-value") || "true", o = Fr(e, "true-value") || "true",
a = Fr(e, "false-value") || "false"; a = Fr(e, "false-value") || "false";
Er(e, "checked", "Array.isArray(" + t + ")?_i(" + t + "," + i + ")>-1" + ("true" === o ? ":(" + t + ")" : ":_q(" + t + "," + o + ")")), Er(e, "checked", "Array.isArray(" + t + ")?_i(" + t + "," + i + ")>-1" + ("true" === o ? ":(" + t + ")" : ":_q(" + t + "," + o + ")")), Mr(e, "change", "var $$a=" + t + ",$$el=$event.target,$$c=$$el.checked?(" + o + "):(" + a + ");if(Array.isArray($$a)){var $$v=" + (r ? "_n(" + i + ")" : i) + ",$$i=_i($$a,$$v);if($$el.checked){$$i<0&&(" + Ur(t, "$$a.concat([$$v])") + ")}else{$$i>-1&&(" + Ur(t, "$$a.slice(0,$$i).concat($$a.slice($$i+1))") + ")}}else{" + Ur(t, "$$c") + "}", null, !0);
Mr(
e,
"change",
"var $$a=" +
t +
",$$el=$event.target,$$c=$$el.checked?(" +
o +
"):(" +
a +
");if(Array.isArray($$a)){var $$v=" +
(r ? "_n(" + i + ")" : i) +
",$$i=_i($$a,$$v);if($$el.checked){$$i<0&&(" +
Ur(t, "$$a.concat([$$v])") +
")}else{$$i>-1&&(" +
Ur(t, "$$a.slice(0,$$i).concat($$a.slice($$i+1))") +
")}}else{" +
Ur(t, "$$c") +
"}",
null,
!0
);
})(e, r, i); })(e, r, i);
else if ("input" === o && "radio" === a) else if ("input" === o && "radio" === a)
!(function (e, t, n) { !(function (e, t, n) {
@ -4243,19 +4119,7 @@
for (r = 0, i = n.length; r < i; r++) { for (r = 0, i = n.length; r < i; r++) {
(o = n[r]), (a = !0); (o = n[r]), (a = !0);
var u = t.directives[o.name]; var u = t.directives[o.name];
u && (a = !!u(e, o, t.warn)), u && (a = !!u(e, o, t.warn)), a && ((c = !0), (s += '{name:"' + o.name + '",rawName:"' + o.rawName + '"' + (o.value ? ",value:(" + o.value + "),expression:" + JSON.stringify(o.value) : "") + (o.arg ? ",arg:" + (o.isDynamicArg ? o.arg : '"' + o.arg + '"') : "") + (o.modifiers ? ",modifiers:" + JSON.stringify(o.modifiers) : "") + "},"));
a &&
((c = !0),
(s +=
'{name:"' +
o.name +
'",rawName:"' +
o.rawName +
'"' +
(o.value ? ",value:(" + o.value + "),expression:" + JSON.stringify(o.value) : "") +
(o.arg ? ",arg:" + (o.isDynamicArg ? o.arg : '"' + o.arg + '"') : "") +
(o.modifiers ? ",modifiers:" + JSON.stringify(o.modifiers) : "") +
"},"));
} }
if (c) return s.slice(0, -1) + "]"; if (c) return s.slice(0, -1) + "]";
})(e, t); })(e, t);
@ -4408,9 +4272,7 @@
function Ya(e) { function Ya(e) {
return e.replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029"); return e.replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029");
} }
new RegExp( new RegExp("\\b" + "do,if,for,let,new,try,var,case,else,with,await,break,catch,class,const,super,throw,while,yield,delete,export,import,return,switch,default,extends,finally,continue,debugger,function,arguments".split(",").join("\\b|\\b") + "\\b");
"\\b" + "do,if,for,let,new,try,var,case,else,with,await,break,catch,class,const,super,throw,while,yield,delete,export,import,return,switch,default,extends,finally,continue,debugger,function,arguments".split(",").join("\\b|\\b") + "\\b"
);
function Qa(e, t) { function Qa(e, t) {
try { try {
return new Function(e); return new Function(e);