oobe progress
This commit is contained in:
parent
f4a30fbe11
commit
af76dff3b6
10 changed files with 526 additions and 236 deletions
|
@ -571,5 +571,44 @@
|
||||||
"share.platform.email": "Email",
|
"share.platform.email": "Email",
|
||||||
"share.platform.songLink": "Copy with song.link",
|
"share.platform.songLink": "Copy with song.link",
|
||||||
"share.platform.clipboard": "Copy Link",
|
"share.platform.clipboard": "Copy Link",
|
||||||
"about.thanks": "Major thanks to the Cider Collective Team and all of our contributors."
|
"about.thanks": "Major thanks to the Cider Collective Team and all of our contributors.",
|
||||||
|
"oobe.yes": "Yes",
|
||||||
|
"oobe.no": "No",
|
||||||
|
"oobe.next": "Next",
|
||||||
|
"oobe.previous": "Previous",
|
||||||
|
"oobe.done": "Done",
|
||||||
|
"oobe.amupsell.title": "Before we start",
|
||||||
|
"oobe.amupsell.text": "Cider requires an active, paid Apple Music subscription\nCider will not work with Apple Music Voice Plan or some promotional trial subscriptions. If you already have a qualified Apple Music subscription click Next to continue.",
|
||||||
|
"oobe.amupsell.subscribeBtn": "Subscribe to Apple Music",
|
||||||
|
"oobe.amupsell.explainBtn": "Explain",
|
||||||
|
"oobe.amupsell.subscribeUrl": "https://apple.co/3MdqJVQ",
|
||||||
|
"oobe.amupsell.amWebUrl": "https://beta.music.apple.com/",
|
||||||
|
"oobe.amupsell.promoExplained": "Some promotional and non US Apple Music trial subscriptions do not have access to the required Apple Music Web Player API's needed for Cider to function. To verify if your active trial will work with Cider go to <a href='{{ amWebUrl }}'>{{ amWebUrl }}</a> log in and try to play some music. If it works, great! You're ready to use Cider, however if it does not consider subscribing to Apple Music here: <a href='{{ subscribeUrl }}'>{{ subscribeUrl }}</a>",
|
||||||
|
"oobe.intro.title": "Welcome to Cider",
|
||||||
|
"oobe.intro.subtitle": "",
|
||||||
|
"oobe.intro.text": "Let's get a few things set up so you can use Cider, how you'd like. You can always change these settings later.",
|
||||||
|
"oobe.general.title": "General",
|
||||||
|
"oobe.general.subtitle": "",
|
||||||
|
"oobe.general.text": "",
|
||||||
|
"oobe.audio.title": "Audio",
|
||||||
|
"oobe.audio.subtitle": "",
|
||||||
|
"oobe.audio.text": "Cider features a custom tuned and designed audio stack that delivers a rich high quality audio experience.\nFeaturing Cider Adrenaline, Atmosphere Realizer, and Spatialized Audio.\nTo enable this functionality \"Advanced Audio Functionality\" must be enabled.\nEnabling Advanced Audio Functionality will give you access to these enhancements in the Cider Audio Labs, found in the app settings.",
|
||||||
|
"oobe.audio.advancedFunctionality": "",
|
||||||
|
"oobe.visual.title": "Visual",
|
||||||
|
"oobe.visual.subtitle": "",
|
||||||
|
"oobe.visual.text": "",
|
||||||
|
"oobe.visual.layout.text": "Cider features two window different layouts.\nMaverick is an iTunes like layout with the player at the top of the window.\nMojave is a new spin created by the Cider Collective.\n\nYou can change the layout any time in the settings.",
|
||||||
|
"oobe.visual.suggestingThemes": "Theming is a great way to personalize your experience. Here are a few we suggest: ",
|
||||||
|
"oobe.visual.suggestingThemes.subtext": "(These themes will be downloaded from GitHub)",
|
||||||
|
"oobe.visual.suggestingThemes.default": "Cider",
|
||||||
|
"oobe.visual.suggestingThemes.default.text": "The classic Cider theme.",
|
||||||
|
"oobe.visual.suggestingThemes.dark": "Dark",
|
||||||
|
"oobe.visual.suggestingThemes.dark.text": "Darkness.",
|
||||||
|
"oobe.visual.suggestingThemes.community1": "Groovy",
|
||||||
|
"oobe.visual.suggestingThemes.community1.text": "A WinUI influenced theme",
|
||||||
|
"oobe.visual.suggestingThemes.community2": "iTheme",
|
||||||
|
"oobe.visual.suggestingThemes.community2.text": "The classic big fruit layout.",
|
||||||
|
"oobe.visual.suggestingThemes.community3": "Dracula",
|
||||||
|
"oobe.visual.suggestingThemes.community3.text": "The iconic Dracula color scheme.",
|
||||||
|
"oobe.amsignin.title": ""
|
||||||
}
|
}
|
||||||
|
|
|
@ -263,6 +263,7 @@
|
||||||
"action.tray.playpause": "Play/Pause",
|
"action.tray.playpause": "Play/Pause",
|
||||||
"action.tray.next": "Next",
|
"action.tray.next": "Next",
|
||||||
"action.tray.previous": "Previous",
|
"action.tray.previous": "Previous",
|
||||||
|
"action.tray.listento": "Listen To:",
|
||||||
"action.update": "Update",
|
"action.update": "Update",
|
||||||
"action.install": "Install",
|
"action.install": "Install",
|
||||||
"action.copy": "Copy",
|
"action.copy": "Copy",
|
||||||
|
@ -366,6 +367,7 @@
|
||||||
"settings.header.audio": "Audio",
|
"settings.header.audio": "Audio",
|
||||||
"settings.header.audio.description": "Adjust the audio settings for Cider.",
|
"settings.header.audio.description": "Adjust the audio settings for Cider.",
|
||||||
"settings.option.audio.volumeStep": "Volume Step",
|
"settings.option.audio.volumeStep": "Volume Step",
|
||||||
|
"settings.option.audio.advanced": "Advanced Volume Control",
|
||||||
"settings.option.audio.maxVolume": "Max Volume",
|
"settings.option.audio.maxVolume": "Max Volume",
|
||||||
"settings.option.audio.changePlaybackRate": "Change Playback Rate",
|
"settings.option.audio.changePlaybackRate": "Change Playback Rate",
|
||||||
"settings.option.audio.playbackRate": "Playback Rate",
|
"settings.option.audio.playbackRate": "Playback Rate",
|
||||||
|
@ -398,20 +400,29 @@
|
||||||
"settings.option.audio.enableAdvancedFunctionality.atmosphereRealizer.description": "Realizes a different musical atmosphere modelled after the state of the art audio setups.",
|
"settings.option.audio.enableAdvancedFunctionality.atmosphereRealizer.description": "Realizes a different musical atmosphere modelled after the state of the art audio setups.",
|
||||||
"settings.option.audio.enableAdvancedFunctionality.atmosphereRealizerMode": "Cider Atmosphere Realizer™️ Mode",
|
"settings.option.audio.enableAdvancedFunctionality.atmosphereRealizerMode": "Cider Atmosphere Realizer™️ Mode",
|
||||||
"settings.option.audio.enableAdvancedFunctionality.atmosphereRealizerMode.description": "Changes the mode of operation of the Atmosphere Realizer module.",
|
"settings.option.audio.enableAdvancedFunctionality.atmosphereRealizerMode.description": "Changes the mode of operation of the Atmosphere Realizer module.",
|
||||||
"settings.option.audio.enableAdvancedFunctionality.atmosphereRealizerMode.NATURAL_STANDARD": "Natural (Standard)",
|
"settings.option.audio.enableAdvancedFunctionality.atmosphereRealizerMode.NATURAL_STANDARD": "Hōjicha Cheese Foam Tea",
|
||||||
"settings.option.audio.enableAdvancedFunctionality.atmosphereRealizerMode.NATURAL_PLUS": "Natural (Plus)",
|
"settings.option.audio.enableAdvancedFunctionality.atmosphereRealizerMode.NATURAL_PLUS": "Genmaicha Tapioca Milk Tea",
|
||||||
|
"settings.option.audio.enableAdvancedFunctionality.atmosphereRealizerMode.E68_1": "Rock Salt Cheese Foam Tea",
|
||||||
|
"settings.option.audio.enableAdvancedFunctionality.atmosphereRealizerMode.E68_2": "Uji Matcha Milk Tea",
|
||||||
|
"settings.option.audio.enableAdvancedFunctionality.atmosphereRealizerMode.E168_1": "Jasmine Macchiato",
|
||||||
|
"settings.option.audio.enableAdvancedFunctionality.atmosphereRealizerMode.Z3600": "Hokkaido Milk Tea",
|
||||||
|
"settings.option.audio.enableAdvancedFunctionality.atmosphereRealizerMode.Z8500": "Moonlight Softcake",
|
||||||
|
"settings.option.audio.enableAdvancedFunctionality.atmosphereRealizerMode.BSCBM": "Brown Sugar Creme Brûlée Milk",
|
||||||
|
"settings.option.audio.enableAdvancedFunctionality.atmosphereRealizerMode.CUDDLE": "Cuddle Warmth",
|
||||||
"settings.option.audio.enableAdvancedFunctionality.ciderPPE": "Cider Adrenaline Processor™️",
|
"settings.option.audio.enableAdvancedFunctionality.ciderPPE": "Cider Adrenaline Processor™️",
|
||||||
"settings.option.audio.enableAdvancedFunctionality.ciderPPE.description": "Enhances the perceived audio quality of 256 kbps AAC audio by using a real-time algorithm that takes advantage of both psychoacoustic models of human hearing and AAC encoding characteristics.",
|
"settings.option.audio.enableAdvancedFunctionality.ciderPPE.description": "Enhances the perceived audio quality of AAC encoded audio by using a real-time algorithm that takes advantage of both psychoacoustic models of human hearing and AAC encoding characteristics.",
|
||||||
"settings.warn.audio.enableAdvancedFunctionality.ciderPPE.compatibility": "CAP is not compatible with Spatialization. Please disable Spatialization to continue.",
|
"settings.warn.audio.enableAdvancedFunctionality.ciderPPE.compatibility": "CAP is not compatible with Spatialization. Please disable Spatialization to continue.",
|
||||||
"settings.option.audio.enableAdvancedFunctionality.ciderPPEStrength": "CAP Strength",
|
"settings.option.audio.enableAdvancedFunctionality.ciderPPEStrength": "CAP Strength",
|
||||||
"settings.option.audio.enableAdvancedFunctionality.ciderPPEStrength.description": "Changes the strength of the processing done to the audio. (Aggressive may yield undesirable results)",
|
"settings.option.audio.enableAdvancedFunctionality.ciderPPEStrength.description": "Changes the strength of the processing done to the audio. (Aggressive may yield undesirable results)",
|
||||||
"settings.option.audio.enableAdvancedFunctionality.ciderPPEStrength.standard": "Standard",
|
"settings.option.audio.enableAdvancedFunctionality.ciderPPEStrength.standard": "Standard",
|
||||||
|
"settings.option.audio.enableAdvancedFunctionality.ciderPPEStrength.adaptive": "Adaptive",
|
||||||
|
"settings.option.audio.enableAdvancedFunctionality.ciderPPEStrength.legacy": "Legacy",
|
||||||
"settings.option.audio.enableAdvancedFunctionality.ciderPPEStrength.aggressive": "Aggressive",
|
"settings.option.audio.enableAdvancedFunctionality.ciderPPEStrength.aggressive": "Aggressive",
|
||||||
"settings.option.audio.enableAdvancedFunctionality.audioNormalization": "Audio Normalization",
|
"settings.option.audio.enableAdvancedFunctionality.audioNormalization": "Audio Normalization",
|
||||||
"settings.option.audio.enableAdvancedFunctionality.audioNormalization.description": "Normalizes peak volume for individual tracks to create a more uniform listening experience. (Does not work on user uploaded tracks)",
|
"settings.option.audio.enableAdvancedFunctionality.audioNormalization.description": "Normalizes peak volume for individual tracks to create a more uniform listening experience. (Does not work on user uploaded tracks)",
|
||||||
"settings.option.audio.enableAdvancedFunctionality.audioNormalization.disabled": "Managed by Audio Lab",
|
"settings.option.audio.enableAdvancedFunctionality.audioNormalization.disabled": "Managed by Audio Lab",
|
||||||
"settings.option.audio.enableAdvancedFunctionality.tunedAudioSpatialization": "Cider Tuned Spatialization",
|
"settings.option.audio.enableAdvancedFunctionality.tunedAudioSpatialization": "Cider Tuned Spatialization",
|
||||||
"settings.option.audio.enableAdvancedFunctionality.tunedAudioSpatialization.description": "Pre-tuned Spatializing Effect, disables the customizable settings of Audio Spatialization. Spatialization must be enabled as a prerequisite.",
|
"settings.option.audio.enableAdvancedFunctionality.tunedAudioSpatialization.description": "Pre-tuned Spatializing Effect, disables the customizable settings of Audio Spatialization.",
|
||||||
"settings.option.audio.enableAdvancedFunctionality.tunedAudioSpatialization.profile": "Cider Spatialization Profile",
|
"settings.option.audio.enableAdvancedFunctionality.tunedAudioSpatialization.profile": "Cider Spatialization Profile",
|
||||||
"settings.option.audio.enableAdvancedFunctionality.tunedAudioSpatialization.profile.description": "Changes the Tuning Profile of the Spatialization.",
|
"settings.option.audio.enableAdvancedFunctionality.tunedAudioSpatialization.profile.description": "Changes the Tuning Profile of the Spatialization.",
|
||||||
"settings.option.audio.enableAdvancedFunctionality.tunedAudioSpatialization.profile.standard": "Standard",
|
"settings.option.audio.enableAdvancedFunctionality.tunedAudioSpatialization.profile.standard": "Standard",
|
||||||
|
@ -419,6 +430,9 @@
|
||||||
"settings.option.audio.enableAdvancedFunctionality.tunedAudioSpatialization.profile.separation": "Separation",
|
"settings.option.audio.enableAdvancedFunctionality.tunedAudioSpatialization.profile.separation": "Separation",
|
||||||
"settings.option.audio.enableAdvancedFunctionality.tunedAudioSpatialization.profile.minimal": "Minimal",
|
"settings.option.audio.enableAdvancedFunctionality.tunedAudioSpatialization.profile.minimal": "Minimal",
|
||||||
"settings.option.audio.enableAdvancedFunctionality.tunedAudioSpatialization.profile.audiophile": "Audiophile",
|
"settings.option.audio.enableAdvancedFunctionality.tunedAudioSpatialization.profile.audiophile": "Audiophile",
|
||||||
|
"settings.option.audio.enableAdvancedFunctionality.tunedAudioSpatialization.profile.diffused": "Diffused",
|
||||||
|
"settings.option.audio.enableAdvancedFunctionality.tunedAudioSpatialization.profile.bplk": "Encore",
|
||||||
|
"settings.option.audio.enableAdvancedFunctionality.tunedAudioSpatialization.profile.hw2k": "Expanded Encore",
|
||||||
"settings.warn.audio.enableAdvancedFunctionality.audioSpatialization.compatibility": "Spatialization is not compatible with CAP. Please disable CAP to continue.",
|
"settings.warn.audio.enableAdvancedFunctionality.audioSpatialization.compatibility": "Spatialization is not compatible with CAP. Please disable CAP to continue.",
|
||||||
"settings.option.audio.dbspl.display": "dB SPL Display",
|
"settings.option.audio.dbspl.display": "dB SPL Display",
|
||||||
"settings.option.audio.dbspl.description": "(Advanced users only) Display dB SPL instead of dBFS on the volume slider.",
|
"settings.option.audio.dbspl.description": "(Advanced users only) Display dB SPL instead of dBFS on the volume slider.",
|
||||||
|
@ -557,5 +571,43 @@
|
||||||
"share.platform.email": "Email",
|
"share.platform.email": "Email",
|
||||||
"share.platform.songLink": "Copy with song.link",
|
"share.platform.songLink": "Copy with song.link",
|
||||||
"share.platform.clipboard": "Copy Link",
|
"share.platform.clipboard": "Copy Link",
|
||||||
"about.thanks": "Major thanks to the Cider Collective Team and all of our contributors."
|
"about.thanks": "Major thanks to the Cider Collective Team and all of our contributors.",
|
||||||
|
"oobe.yes": "Yes",
|
||||||
|
"oobe.no": "No",
|
||||||
|
"oobe.next": "Next",
|
||||||
|
"oobe.previous": "Previous",
|
||||||
|
"oobe.done": "Done",
|
||||||
|
"oobe.amupsell.title": "Before we start",
|
||||||
|
"oobe.amupsell.text": "Cider requires an active, paid Apple Music subscription\nCider will not work with Apple Music Voice Plan or some promotional trial subscriptions. If you already have a qualified Apple Music subscription click Next to continue.",
|
||||||
|
"oobe.amupsell.subscribeBtn": "Subscribe to Apple Music",
|
||||||
|
"oobe.amupsell.explainBtn": "Explain",
|
||||||
|
"oobe.amupsell.subscribeUrl": "https://apple.co/3MdqJVQ",
|
||||||
|
"oobe.amupsell.amWebUrl": "https://beta.music.apple.com/",
|
||||||
|
"oobe.amupsell.promoExplained": "Some promotional and non US Apple Music trial subscriptions do not have access to the required Apple Music Web Player API's needed for Cider to function. To verify if your active trial will work with Cider go to <a href='{{ amWebUrl }}'>{{ amWebUrl }}</a> log in and try to play some music. If it works, great! You're ready to use Cider, however if it does not consider subscribing to Apple Music here: <a href='{{ subscribeUrl }}'>{{ subscribeUrl }}</a>",
|
||||||
|
"oobe.intro.title": "Welcome to Cider",
|
||||||
|
"oobe.intro.subtitle": "",
|
||||||
|
"oobe.intro.text": "Let's get a few things set up so you can use Cider, how you'd like. You can always change these settings later.",
|
||||||
|
"oobe.general.title": "General",
|
||||||
|
"oobe.general.subtitle": "",
|
||||||
|
"oobe.general.text": "",
|
||||||
|
"oobe.audio.title": "Audio",
|
||||||
|
"oobe.audio.subtitle": "",
|
||||||
|
"oobe.audio.text": "",
|
||||||
|
"oobe.audio.advancedFunctionality": "",
|
||||||
|
"oobe.visual.title": "Visual",
|
||||||
|
"oobe.visual.subtitle": "",
|
||||||
|
"oobe.visual.text": "",
|
||||||
|
"oobe.visual.suggestingThemes": "Theming is a great way to personalize your experience. Here are a few we suggest: ",
|
||||||
|
"oobe.visual.suggestingThemes.subtext": "(These themes will be downloaded from GitHub)",
|
||||||
|
"oobe.visual.suggestingThemes.default": "Cider",
|
||||||
|
"oobe.visual.suggestingThemes.default.text": "The classic Cider theme.",
|
||||||
|
"oobe.visual.suggestingThemes.dark": "Dark",
|
||||||
|
"oobe.visual.suggestingThemes.dark.text": "Darkness.",
|
||||||
|
"oobe.visual.suggestingThemes.community1": "Groovy",
|
||||||
|
"oobe.visual.suggestingThemes.community1.text": "A WinUI influenced theme",
|
||||||
|
"oobe.visual.suggestingThemes.community2": "iTheme",
|
||||||
|
"oobe.visual.suggestingThemes.community2.text": "The classic big fruit layout.",
|
||||||
|
"oobe.visual.suggestingThemes.community3": "Dracula",
|
||||||
|
"oobe.visual.suggestingThemes.community3.text": "The iconic Dracula color scheme.",
|
||||||
|
"oobe.amsignin.title": ""
|
||||||
}
|
}
|
||||||
|
|
|
@ -83,6 +83,7 @@ export class BrowserWindow {
|
||||||
"pages/zoo",
|
"pages/zoo",
|
||||||
"pages/plugin-renderer",
|
"pages/plugin-renderer",
|
||||||
"pages/keybinds",
|
"pages/keybinds",
|
||||||
|
"pages/oobe",
|
||||||
"components/mediaitem-artwork",
|
"components/mediaitem-artwork",
|
||||||
"components/artwork-material",
|
"components/artwork-material",
|
||||||
"components/menu-panel",
|
"components/menu-panel",
|
||||||
|
|
BIN
src/renderer/assets/oobe/ss1.png
Normal file
BIN
src/renderer/assets/oobe/ss1.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 168 KiB |
BIN
src/renderer/assets/oobe/ss2.png
Normal file
BIN
src/renderer/assets/oobe/ss2.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 164 KiB |
|
@ -115,7 +115,6 @@ function fallbackinitMusicKit() {
|
||||||
request.open("GET", "https://raw.githubusercontent.com/lujjjh/LitoMusic/main/token.json");
|
request.open("GET", "https://raw.githubusercontent.com/lujjjh/LitoMusic/main/token.json");
|
||||||
request.send();
|
request.send();
|
||||||
}
|
}
|
||||||
|
|
||||||
document.addEventListener('musickitloaded', function () {
|
document.addEventListener('musickitloaded', function () {
|
||||||
console.log('MusicKit loaded')
|
console.log('MusicKit loaded')
|
||||||
// MusicKit global is now defined
|
// MusicKit global is now defined
|
||||||
|
@ -288,7 +287,6 @@ webGPU().then()
|
||||||
let screenWidth = screen.width;
|
let screenWidth = screen.width;
|
||||||
let screenHeight = screen.height;
|
let screenHeight = screen.height;
|
||||||
|
|
||||||
// window.onerror = function (error) {
|
document.addEventListener('DOMContentLoaded', async function () {
|
||||||
// console.log(error)
|
// app.oobeInit()
|
||||||
// bootbox.alert("Error occurred: " + error)
|
})
|
||||||
// };
|
|
|
@ -119,11 +119,13 @@
|
||||||
&.search-page {
|
&.search-page {
|
||||||
|
|
||||||
.searchToggle {
|
.searchToggle {
|
||||||
float:right;
|
float: right;
|
||||||
>button {
|
|
||||||
|
> button {
|
||||||
min-width: 120px;
|
min-width: 120px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.cd-mediaitem-square.mediaitem-brick {
|
.cd-mediaitem-square.mediaitem-brick {
|
||||||
width: 530px !important;
|
width: 530px !important;
|
||||||
|
|
||||||
|
@ -1661,31 +1663,87 @@
|
||||||
.content-inner.oobe {
|
.content-inner.oobe {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
|
display: grid;
|
||||||
|
place-items: center;
|
||||||
|
width: 100%;
|
||||||
|
background: #1e1e1e;
|
||||||
|
|
||||||
.oobe-view {
|
.oobe-view {
|
||||||
display: flex;
|
display: flex;
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
bottom: 0;
|
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin: 32px;
|
|
||||||
gap: 32px;
|
gap: 32px;
|
||||||
|
max-width: 1280px;
|
||||||
|
max-height: 720px;
|
||||||
|
align-self: center;
|
||||||
|
justify-self: center;
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
|
|
||||||
.oobe-header {
|
.oobe-header {
|
||||||
font-size: 3em;
|
font-size: 3em;
|
||||||
text-shadow: var(--replayTextShadow);
|
text-shadow: var(--replayTextShadow);
|
||||||
|
font-weight: 600;
|
||||||
}
|
}
|
||||||
|
|
||||||
.oobe-body {
|
.oobe-body {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
background: #ffffff0d;
|
||||||
|
border-radius: 20px;
|
||||||
|
padding: 3em;
|
||||||
|
|
||||||
|
&.text {
|
||||||
|
white-space: pre-wrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.blurb {
|
||||||
|
white-space: pre-wrap;
|
||||||
|
margin: 16px;
|
||||||
|
line-height: 1.5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.visual {
|
||||||
|
padding: 1em;
|
||||||
|
|
||||||
|
.stylePicker {
|
||||||
|
border-radius: 10px;
|
||||||
|
overflow: hidden;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: .25s all;
|
||||||
|
box-shadow: 0px 2px 6px rgb(0 0 0 / 25%);
|
||||||
|
|
||||||
|
.visualPreview {
|
||||||
|
pointer-events: none;
|
||||||
|
transition: .25s all;
|
||||||
|
width: 100%;
|
||||||
|
filter: drop-shadow(0px 8px 6px rgb(0 0 0 / 30%));
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-footer {
|
||||||
|
font-size: 1.25em;
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
transform: scale(1.10) translateZ(-1px);
|
||||||
|
z-index: 1;
|
||||||
|
box-shadow: 0px 12px 16px rgb(0 0 0 / 25%);
|
||||||
|
|
||||||
|
.visualPreview {
|
||||||
|
transform: scale(1.5) translateZ(-1px);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.oobe-footer {
|
.oobe-footer {
|
||||||
|
@ -1694,6 +1752,12 @@
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 16px;
|
padding: 16px;
|
||||||
|
|
||||||
|
.md-btn {
|
||||||
|
font-size: 18px;
|
||||||
|
min-width: 128px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { store } from './vuex-store.js';
|
import {store} from './vuex-store.js';
|
||||||
|
|
||||||
Vue.use(VueHorizontal);
|
Vue.use(VueHorizontal);
|
||||||
Vue.use(VueObserveVisibility);
|
Vue.use(VueObserveVisibility);
|
||||||
|
@ -80,7 +80,7 @@ const app = new Vue({
|
||||||
sorting: "name",
|
sorting: "name",
|
||||||
sortOrder: "asc",
|
sortOrder: "asc",
|
||||||
listing: [],
|
listing: [],
|
||||||
meta: { total: 0, progress: 0 },
|
meta: {total: 0, progress: 0},
|
||||||
search: "",
|
search: "",
|
||||||
displayListing: [],
|
displayListing: [],
|
||||||
downloadState: 0 // 0 = not started, 1 = in progress, 2 = complete, 3 = empty library
|
downloadState: 0 // 0 = not started, 1 = in progress, 2 = complete, 3 = empty library
|
||||||
|
@ -96,7 +96,7 @@ const app = new Vue({
|
||||||
sorting: ["dateAdded", "name"], // [0] = recentlyadded page, [1] = albums page
|
sorting: ["dateAdded", "name"], // [0] = recentlyadded page, [1] = albums page
|
||||||
sortOrder: ["desc", "asc"], // [0] = recentlyadded page, [1] = albums page
|
sortOrder: ["desc", "asc"], // [0] = recentlyadded page, [1] = albums page
|
||||||
listing: [],
|
listing: [],
|
||||||
meta: { total: 0, progress: 0 },
|
meta: {total: 0, progress: 0},
|
||||||
search: "",
|
search: "",
|
||||||
displayListing: [],
|
displayListing: [],
|
||||||
downloadState: 0 // 0 = not started, 1 = in progress, 2 = complete, 3 = empty library
|
downloadState: 0 // 0 = not started, 1 = in progress, 2 = complete, 3 = empty library
|
||||||
|
@ -112,7 +112,7 @@ const app = new Vue({
|
||||||
sorting: ["dateAdded", "name"], // [0] = recentlyadded page, [1] = albums page
|
sorting: ["dateAdded", "name"], // [0] = recentlyadded page, [1] = albums page
|
||||||
sortOrder: ["desc", "asc"], // [0] = recentlyadded page, [1] = albums page
|
sortOrder: ["desc", "asc"], // [0] = recentlyadded page, [1] = albums page
|
||||||
listing: [],
|
listing: [],
|
||||||
meta: { total: 0, progress: 0 },
|
meta: {total: 0, progress: 0},
|
||||||
search: "",
|
search: "",
|
||||||
displayListing: [],
|
displayListing: [],
|
||||||
downloadState: 0 // 0 = not started, 1 = in progress, 2 = complete, 3 = empty library
|
downloadState: 0 // 0 = not started, 1 = in progress, 2 = complete, 3 = empty library
|
||||||
|
@ -175,12 +175,10 @@ const app = new Vue({
|
||||||
"attributes": {
|
"attributes": {
|
||||||
"name": "Cider User",
|
"name": "Cider User",
|
||||||
"handle": "CiderUser",
|
"handle": "CiderUser",
|
||||||
"artwork": { "url": "./assets/logocut.png" }
|
"artwork": {"url": "./assets/logocut.png"}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
forceDirectives: {
|
forceDirectives: {},
|
||||||
|
|
||||||
},
|
|
||||||
menuOpened: false,
|
menuOpened: false,
|
||||||
maximized: false,
|
maximized: false,
|
||||||
drawerOpened: false,
|
drawerOpened: false,
|
||||||
|
@ -242,8 +240,8 @@ const app = new Vue({
|
||||||
},
|
},
|
||||||
moreinfodata: [],
|
moreinfodata: [],
|
||||||
notyf: notyf,
|
notyf: notyf,
|
||||||
idleTimer : null,
|
idleTimer: null,
|
||||||
idleState : false,
|
idleState: false,
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
cfg: {
|
cfg: {
|
||||||
|
@ -275,11 +273,20 @@ const app = new Vue({
|
||||||
}, false)
|
}, false)
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
async oobeInit() {
|
||||||
|
this.appMode = "oobe"
|
||||||
|
this.setLz(this.cfg.general.language)
|
||||||
|
this.setLzManual()
|
||||||
|
clearTimeout(this.hangtimer)
|
||||||
|
document.body.removeAttribute("loading")
|
||||||
|
ipcRenderer.invoke("renderer-ready", true)
|
||||||
|
document.querySelector("#LOADER").remove()
|
||||||
|
},
|
||||||
setTimeout(func, time) {
|
setTimeout(func, time) {
|
||||||
return setTimeout(func, time);
|
return setTimeout(func, time);
|
||||||
},
|
},
|
||||||
songLinkShare(amUrl) {
|
songLinkShare(amUrl) {
|
||||||
notyf.open({ type: "info", className: "notyf-info", message: app.getLz('term.song.link.generate') })
|
notyf.open({type: "info", className: "notyf-info", message: app.getLz('term.song.link.generate')})
|
||||||
let self = this
|
let self = this
|
||||||
let httpRequest = new XMLHttpRequest();
|
let httpRequest = new XMLHttpRequest();
|
||||||
httpRequest.open('GET', `https://api.song.link/v1-alpha.1/links?url=${amUrl}&userCountry=US`, true);
|
httpRequest.open('GET', `https://api.song.link/v1-alpha.1/links?url=${amUrl}&userCountry=US`, true);
|
||||||
|
@ -299,10 +306,10 @@ const app = new Vue({
|
||||||
},
|
},
|
||||||
formatVolumeTooltip() {
|
formatVolumeTooltip() {
|
||||||
let advancedTooltip = this.cfg.audio.dBSPL ? (Number(this.cfg.audio.dBSPLcalibration) + (Math.log10(this.mk.volume) * 20)).toFixed(2) + ' dB SPL' : (Math.log10(this.mk.volume) * 20).toFixed(2) + ' dBFS'
|
let advancedTooltip = this.cfg.audio.dBSPL ? (Number(this.cfg.audio.dBSPLcalibration) + (Math.log10(this.mk.volume) * 20)).toFixed(2) + ' dB SPL' : (Math.log10(this.mk.volume) * 20).toFixed(2) + ' dBFS'
|
||||||
return this.cfg.audio.advanced ? advancedTooltip : (this.mk.volume * 100).toFixed(0) + '%'
|
return this.cfg.audio.advanced ? advancedTooltip : (this.mk.volume * 100).toFixed(0) + '%'
|
||||||
},
|
},
|
||||||
mainMenuVisibility(val, isContextMenu) {
|
mainMenuVisibility(val, isContextMenu) {
|
||||||
if(this.chrome.sidebarCollapsed && !isContextMenu) {
|
if (this.chrome.sidebarCollapsed && !isContextMenu) {
|
||||||
this.chrome.sidebarCollapsed = false
|
this.chrome.sidebarCollapsed = false
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -336,7 +343,8 @@ const app = new Vue({
|
||||||
this.listennow.timestamp = 0;
|
this.listennow.timestamp = 0;
|
||||||
this.browsepage.timestamp = 0;
|
this.browsepage.timestamp = 0;
|
||||||
this.radio.timestamp = 0;
|
this.radio.timestamp = 0;
|
||||||
} catch (e) { }
|
} catch (e) {
|
||||||
|
}
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Grabs translation for localization.
|
* Grabs translation for localization.
|
||||||
|
@ -394,7 +402,7 @@ const app = new Vue({
|
||||||
},
|
},
|
||||||
async showSocialListeningTo() {
|
async showSocialListeningTo() {
|
||||||
let contentIds = Object.keys(app.socialBadges.badgeMap)
|
let contentIds = Object.keys(app.socialBadges.badgeMap)
|
||||||
app.showCollection({ data: this.socialBadges.mediaItems }, "Friends Listening To", "albums")
|
app.showCollection({data: this.socialBadges.mediaItems}, "Friends Listening To", "albums")
|
||||||
if (this.socialBadges.mediaItemDLState == 1 || this.socialBadges.mediaItemDLState == 2) {
|
if (this.socialBadges.mediaItemDLState == 1 || this.socialBadges.mediaItemDLState == 2) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -537,7 +545,7 @@ const app = new Vue({
|
||||||
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`);
|
||||||
let ids = res.data.data.map(function (i) {
|
let ids = res.data.data.map(function (i) {
|
||||||
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)
|
||||||
} 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") {
|
||||||
|
@ -550,7 +558,7 @@ const app = new Vue({
|
||||||
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`);
|
||||||
let ids = res.data.data.map(function (i) {
|
let ids = res.data.data.map(function (i) {
|
||||||
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)
|
||||||
} else {
|
} else {
|
||||||
|
@ -577,7 +585,7 @@ const app = new Vue({
|
||||||
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`);
|
||||||
let ids = res.data.data.map(function (i) {
|
let ids = res.data.data.map(function (i) {
|
||||||
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)
|
||||||
} 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") {
|
||||||
|
@ -590,7 +598,7 @@ const app = new Vue({
|
||||||
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`);
|
||||||
let ids = res.data.data.map(function (i) {
|
let ids = res.data.data.map(function (i) {
|
||||||
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)
|
||||||
} else {
|
} else {
|
||||||
|
@ -604,13 +612,13 @@ const app = new Vue({
|
||||||
this.modals.addToPlaylist = false
|
this.modals.addToPlaylist = false
|
||||||
await app.mk.api.v3.music(
|
await app.mk.api.v3.music(
|
||||||
`/v1/me/library/playlists/${playlist_id}/tracks`, {}, {
|
`/v1/me/library/playlists/${playlist_id}/tracks`, {}, {
|
||||||
fetchOptions: {
|
fetchOptions: {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
body: JSON.stringify({
|
body: JSON.stringify({
|
||||||
data: pl_items
|
data: pl_items
|
||||||
})
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
).then(() => {
|
).then(() => {
|
||||||
if (this.page == 'playlist_' + this.showingPlaylist.id) {
|
if (this.page == 'playlist_' + this.showingPlaylist.id) {
|
||||||
this.getPlaylistFromID(this.showingPlaylist.id, true)
|
this.getPlaylistFromID(this.showingPlaylist.id, true)
|
||||||
|
@ -681,7 +689,7 @@ const app = new Vue({
|
||||||
"attributes": {
|
"attributes": {
|
||||||
"name": "Cider User",
|
"name": "Cider User",
|
||||||
"handle": "CiderUser",
|
"handle": "CiderUser",
|
||||||
"artwork": { "url": "./assets/logocut.png" }
|
"artwork": {"url": "./assets/logocut.png"}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -735,7 +743,7 @@ const app = new Vue({
|
||||||
let truekind = (!kind.endsWith("s")) ? (kind + "s") : kind;
|
let truekind = (!kind.endsWith("s")) ? (kind + "s") : kind;
|
||||||
app.mk.setQueue({
|
app.mk.setQueue({
|
||||||
[truekind]: [lastItem.attributes.playParams.id],
|
[truekind]: [lastItem.attributes.playParams.id],
|
||||||
parameters: { l: app.mklang }
|
parameters: {l: app.mklang}
|
||||||
})
|
})
|
||||||
app.mk.mute()
|
app.mk.mute()
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
@ -754,7 +762,7 @@ const app = new Vue({
|
||||||
for (let id of ids) {
|
for (let id of ids) {
|
||||||
if (!(i == 0 && ids[0] == lastItem.attributes.playParams.id)) {
|
if (!(i == 0 && ids[0] == lastItem.attributes.playParams.id)) {
|
||||||
try {
|
try {
|
||||||
app.mk.playLater({ songs: [id] })
|
app.mk.playLater({songs: [id]})
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -776,14 +784,14 @@ const app = new Vue({
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "history":
|
case "history":
|
||||||
let history = await app.mk.api.v3.music(`/v1/me/recent/played/tracks`, { l: app.mklang })
|
let history = await app.mk.api.v3.music(`/v1/me/recent/played/tracks`, {l: app.mklang})
|
||||||
if (history.data.data.length > 0) {
|
if (history.data.data.length > 0) {
|
||||||
let lastItem = history.data.data[0]
|
let lastItem = history.data.data[0]
|
||||||
let kind = lastItem.attributes.playParams.kind;
|
let kind = lastItem.attributes.playParams.kind;
|
||||||
let truekind = (!kind.endsWith("s")) ? (kind + "s") : kind;
|
let truekind = (!kind.endsWith("s")) ? (kind + "s") : kind;
|
||||||
app.mk.setQueue({
|
app.mk.setQueue({
|
||||||
[truekind]: [lastItem.attributes.playParams.id],
|
[truekind]: [lastItem.attributes.playParams.id],
|
||||||
parameters: { l: app.mklang }
|
parameters: {l: app.mklang}
|
||||||
})
|
})
|
||||||
app.mk.mute()
|
app.mk.mute()
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
@ -816,8 +824,7 @@ const app = new Vue({
|
||||||
try {
|
try {
|
||||||
if (app.mk.nowPlayingItem.type !== 'song') {
|
if (app.mk.nowPlayingItem.type !== 'song') {
|
||||||
CiderAudio.audioNodes.gainNode.gain.value = 0.70794578438;
|
CiderAudio.audioNodes.gainNode.gain.value = 0.70794578438;
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
let soundcheck = tag.split(" ")
|
let soundcheck = tag.split(" ")
|
||||||
let numbers = []
|
let numbers = []
|
||||||
for (let item of soundcheck) {
|
for (let item of soundcheck) {
|
||||||
|
@ -831,20 +838,25 @@ const app = new Vue({
|
||||||
try {
|
try {
|
||||||
//CiderAudio.audioNodes.gainNode.gain.value = (Math.min(Math.pow(10, (replaygain.gain / 20)), (1 / replaygain.peak)))
|
//CiderAudio.audioNodes.gainNode.gain.value = (Math.min(Math.pow(10, (replaygain.gain / 20)), (1 / replaygain.peak)))
|
||||||
CiderAudio.audioNodes.gainNode.gain.value = gain
|
CiderAudio.audioNodes.gainNode.gain.value = gain
|
||||||
} catch (e) { }
|
} catch (e) {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
try { ipcRenderer.send('SoundCheckTag', event, tag); }
|
try {
|
||||||
catch (e) {
|
ipcRenderer.send('SoundCheckTag', event, tag);
|
||||||
try {ipcRenderer.send('SoundCheckTag', event, tag);}
|
} catch (e) {
|
||||||
catch (e) {console.log("[Cider][MaikiwiSoundCheck] Error [Gave up after 3 consecutive attempts]: " + e)}
|
try {
|
||||||
|
ipcRenderer.send('SoundCheckTag', event, tag);
|
||||||
|
} catch (e) {
|
||||||
|
console.log("[Cider][MaikiwiSoundCheck] Error [Gave up after 3 consecutive attempts]: " + e)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} // brute force until it works
|
} // brute force until it works
|
||||||
})
|
})
|
||||||
|
|
||||||
ipcRenderer.on('play', function (_event, mode, id) {
|
ipcRenderer.on('play', function (_event, mode, id) {
|
||||||
if (mode !== 'url') {
|
if (mode !== 'url') {
|
||||||
self.mk.setQueue({ [mode]: id, parameters: { l: self.mklang } }).then(() => {
|
self.mk.setQueue({[mode]: id, parameters: {l: self.mklang}}).then(() => {
|
||||||
app.mk.play()
|
app.mk.play()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -866,9 +878,9 @@ const app = new Vue({
|
||||||
ipcRenderer.send('wsapi-updatePlaybackState', wsapi.getAttributes());
|
ipcRenderer.send('wsapi-updatePlaybackState', wsapi.getAttributes());
|
||||||
})
|
})
|
||||||
|
|
||||||
this.mk.addEventListener(MusicKit.Events.queueItemsDidChange, ()=>{
|
this.mk.addEventListener(MusicKit.Events.queueItemsDidChange, () => {
|
||||||
if (self.$refs.queue) {
|
if (self.$refs.queue) {
|
||||||
setTimeout(()=>{
|
setTimeout(() => {
|
||||||
self.$refs.queue.updateQueue();
|
self.$refs.queue.updateQueue();
|
||||||
}, 100)
|
}, 100)
|
||||||
}
|
}
|
||||||
|
@ -886,18 +898,16 @@ const app = new Vue({
|
||||||
localStorage.setItem("playingBitrate", "64")
|
localStorage.setItem("playingBitrate", "64")
|
||||||
CiderAudio.hierarchical_loading();
|
CiderAudio.hierarchical_loading();
|
||||||
}
|
}
|
||||||
}
|
} else if (app.mk.nowPlayingItem.flavor.includes("256")) {
|
||||||
else if (app.mk.nowPlayingItem.flavor.includes("256")) {
|
|
||||||
if (localStorage.getItem("playingBitrate") !== "256") {
|
if (localStorage.getItem("playingBitrate") !== "256") {
|
||||||
localStorage.setItem("playingBitrate", "256")
|
localStorage.setItem("playingBitrate", "256")
|
||||||
CiderAudio.hierarchical_loading();
|
CiderAudio.hierarchical_loading();
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
localStorage.setItem("playingBitrate", "256")
|
localStorage.setItem("playingBitrate", "256")
|
||||||
CiderAudio.hierarchical_loading();
|
CiderAudio.hierarchical_loading();
|
||||||
}
|
}
|
||||||
} catch(e) {
|
} catch (e) {
|
||||||
localStorage.setItem("playingBitrate", "256")
|
localStorage.setItem("playingBitrate", "256")
|
||||||
CiderAudio.hierarchical_loading();
|
CiderAudio.hierarchical_loading();
|
||||||
}
|
}
|
||||||
|
@ -962,7 +972,7 @@ const app = new Vue({
|
||||||
}
|
}
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
let i = (document.querySelector('#apple-music-player')?.src ?? "")
|
let i = (document.querySelector('#apple-music-player')?.src ?? "")
|
||||||
if (i.endsWith(".m3u8") || i.endsWith(".m3u")){
|
if (i.endsWith(".m3u8") || i.endsWith(".m3u")) {
|
||||||
this._playRadioStream(i)
|
this._playRadioStream(i)
|
||||||
}
|
}
|
||||||
}, 1500)
|
}, 1500)
|
||||||
|
@ -979,7 +989,7 @@ const app = new Vue({
|
||||||
this.appRoute(window.location.hash)
|
this.appRoute(window.location.hash)
|
||||||
}
|
}
|
||||||
|
|
||||||
if(this.page != "home") {
|
if (this.page != "home") {
|
||||||
this.resumeTabs()
|
this.resumeTabs()
|
||||||
}
|
}
|
||||||
this.mediaKeyFixes()
|
this.mediaKeyFixes()
|
||||||
|
@ -990,7 +1000,7 @@ const app = new Vue({
|
||||||
this.$forceUpdate()
|
this.$forceUpdate()
|
||||||
}, 500)
|
}, 500)
|
||||||
document.querySelector('#apple-music-video-player-controls').addEventListener('mousemove', () => {
|
document.querySelector('#apple-music-video-player-controls').addEventListener('mousemove', () => {
|
||||||
this.showFoo('.music-player-info',2000);
|
this.showFoo('.music-player-info', 2000);
|
||||||
})
|
})
|
||||||
ipcRenderer.invoke("renderer-ready", true)
|
ipcRenderer.invoke("renderer-ready", true)
|
||||||
document.querySelector("#LOADER").remove()
|
document.querySelector("#LOADER").remove()
|
||||||
|
@ -998,7 +1008,7 @@ const app = new Vue({
|
||||||
this.checkForThemeUpdates()
|
this.checkForThemeUpdates()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
showFoo(querySelector,time) {
|
showFoo(querySelector, time) {
|
||||||
clearTimeout(this.idleTimer);
|
clearTimeout(this.idleTimer);
|
||||||
if (this.idleState == true) {
|
if (this.idleState == true) {
|
||||||
document.querySelector(querySelector).classList.remove("inactive");
|
document.querySelector(querySelector).classList.remove("inactive");
|
||||||
|
@ -1021,7 +1031,11 @@ const app = new Vue({
|
||||||
.then(res => res.json())
|
.then(res => res.json())
|
||||||
.then(res => {
|
.then(res => {
|
||||||
if (res[0].sha != theme.commit) {
|
if (res[0].sha != theme.commit) {
|
||||||
const notify = notyf.open({ className: "notyf-info", type: "info", message: `[Themes] ${theme.name} has an update available.` })
|
const notify = notyf.open({
|
||||||
|
className: "notyf-info",
|
||||||
|
type: "info",
|
||||||
|
message: `[Themes] ${theme.name} has an update available.`
|
||||||
|
})
|
||||||
notify.on("click", () => {
|
notify.on("click", () => {
|
||||||
app.appRoute("themes-github")
|
app.appRoute("themes-github")
|
||||||
notyf.dismiss(notify)
|
notyf.dismiss(notify)
|
||||||
|
@ -1269,10 +1283,12 @@ const app = new Vue({
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
} catch (e) { }
|
} catch (e) {
|
||||||
|
}
|
||||||
if (playlist.type == "library-playlist-folders") {
|
if (playlist.type == "library-playlist-folders") {
|
||||||
try {
|
try {
|
||||||
await deepScan(playlist.id).catch(e => { })
|
await deepScan(playlist.id).catch(e => {
|
||||||
|
})
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1311,12 +1327,12 @@ const app = new Vue({
|
||||||
this.newPlaylist()
|
this.newPlaylist()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: app.getLz('term.createNewPlaylistFolder'),
|
name: app.getLz('term.createNewPlaylistFolder'),
|
||||||
action: () => {
|
action: () => {
|
||||||
this.newPlaylistFolder()
|
this.newPlaylistFolder()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
this.showMenuPanel(menu, event)
|
this.showMenuPanel(menu, event)
|
||||||
|
@ -1325,13 +1341,13 @@ const app = new Vue({
|
||||||
let self = this
|
let self = this
|
||||||
this.mk.api.v3.music(
|
this.mk.api.v3.music(
|
||||||
`/v1/me/library/playlist-folders/${id}`, {}, {
|
`/v1/me/library/playlist-folders/${id}`, {}, {
|
||||||
fetchOptions: {
|
fetchOptions: {
|
||||||
method: "PATCH",
|
method: "PATCH",
|
||||||
body: JSON.stringify({
|
body: JSON.stringify({
|
||||||
attributes: { name: name }
|
attributes: {name: name}
|
||||||
})
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
).then(res => {
|
).then(res => {
|
||||||
self.refreshPlaylists(false, false)
|
self.refreshPlaylists(false, false)
|
||||||
})
|
})
|
||||||
|
@ -1340,13 +1356,13 @@ const app = new Vue({
|
||||||
let self = this
|
let self = this
|
||||||
this.mk.api.v3.music(
|
this.mk.api.v3.music(
|
||||||
`/v1/me/library/playlists/${id}`, {}, {
|
`/v1/me/library/playlists/${id}`, {}, {
|
||||||
fetchOptions: {
|
fetchOptions: {
|
||||||
method: "PATCH",
|
method: "PATCH",
|
||||||
body: JSON.stringify({
|
body: JSON.stringify({
|
||||||
attributes: { name: name }
|
attributes: {name: name}
|
||||||
})
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
).then(res => {
|
).then(res => {
|
||||||
self.refreshPlaylists(false, false)
|
self.refreshPlaylists(false, false)
|
||||||
})
|
})
|
||||||
|
@ -1355,13 +1371,13 @@ const app = new Vue({
|
||||||
let self = this
|
let self = this
|
||||||
this.mk.api.v3.music(
|
this.mk.api.v3.music(
|
||||||
`/v1/me/library/playlists/${id}`, {}, {
|
`/v1/me/library/playlists/${id}`, {}, {
|
||||||
fetchOptions: {
|
fetchOptions: {
|
||||||
method: "PATCH",
|
method: "PATCH",
|
||||||
body: JSON.stringify({
|
body: JSON.stringify({
|
||||||
attributes: { description: name }
|
attributes: {description: name}
|
||||||
})
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
).then(res => {
|
).then(res => {
|
||||||
self.refreshPlaylists(false, false)
|
self.refreshPlaylists(false, false)
|
||||||
})
|
})
|
||||||
|
@ -1386,9 +1402,9 @@ const app = new Vue({
|
||||||
fetchOptions: {
|
fetchOptions: {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
body: JSON.stringify({
|
body: JSON.stringify({
|
||||||
"attributes": { "name": name },
|
"attributes": {"name": name},
|
||||||
"relationships": {
|
"relationships": {
|
||||||
"tracks": { "data": tracks },
|
"tracks": {"data": tracks},
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -1433,7 +1449,7 @@ const app = new Vue({
|
||||||
/**
|
/**
|
||||||
* @param {string} url, href for the initial request
|
* @param {string} url, href for the initial request
|
||||||
* @memberof app
|
* @memberof app
|
||||||
*/
|
*/
|
||||||
async showRoom(url) {
|
async showRoom(url) {
|
||||||
let self = this
|
let self = this
|
||||||
const response = await this.mk.api.v3.music(url)
|
const response = await this.mk.api.v3.music(url)
|
||||||
|
@ -1451,7 +1467,7 @@ const app = new Vue({
|
||||||
app.appRoute("collection-list")
|
app.appRoute("collection-list")
|
||||||
},
|
},
|
||||||
async showArtistView(artist, title, view) {
|
async showArtistView(artist, title, view) {
|
||||||
let response = (await app.mk.api.v3.music(`/v1/catalog/${app.mk.storefrontId}/artists/${artist}/view/${view}?l=${this.mklang}`, {}, { includeResponseMeta: !0 })).data
|
let response = (await app.mk.api.v3.music(`/v1/catalog/${app.mk.storefrontId}/artists/${artist}/view/${view}?l=${this.mklang}`, {}, {includeResponseMeta: !0})).data
|
||||||
console.debug(response)
|
console.debug(response)
|
||||||
await this.showCollection(response, title, "artists")
|
await this.showCollection(response, title, "artists")
|
||||||
},
|
},
|
||||||
|
@ -1568,7 +1584,7 @@ const app = new Vue({
|
||||||
"limit[artists:top-songs]": 20,
|
"limit[artists:top-songs]": 20,
|
||||||
"art[url]": "f",
|
"art[url]": "f",
|
||||||
l: this.mklang
|
l: this.mklang
|
||||||
}, { includeResponseMeta: !0 })
|
}, {includeResponseMeta: !0})
|
||||||
console.debug(artistData.data.data[0])
|
console.debug(artistData.data.data[0])
|
||||||
this.artistPage.data = artistData.data.data[0]
|
this.artistPage.data = artistData.data.data[0]
|
||||||
this.page = "artist-page"
|
this.page = "artist-page"
|
||||||
|
@ -1651,13 +1667,12 @@ const app = new Vue({
|
||||||
const m = Math.floor(seconds % 3600 / 60);
|
const m = Math.floor(seconds % 3600 / 60);
|
||||||
const s = Math.floor(seconds % 60);
|
const s = Math.floor(seconds % 60);
|
||||||
|
|
||||||
const dDisplay = d > 0 ? `${d} ${app.getLz("term.time.day", { "count": d })}` : "";
|
const dDisplay = d > 0 ? `${d} ${app.getLz("term.time.day", {"count": d})}` : "";
|
||||||
const hDisplay = h > 0 ? `${h} ${app.getLz("term.time.hour", { "count": h })}` : "";
|
const hDisplay = h > 0 ? `${h} ${app.getLz("term.time.hour", {"count": h})}` : "";
|
||||||
const mDisplay = m > 0 ? `${m} ${app.getLz("term.time.minute", { "count": m })}` : "";
|
const mDisplay = m > 0 ? `${m} ${app.getLz("term.time.minute", {"count": m})}` : "";
|
||||||
|
|
||||||
return dDisplay + (dDisplay && hDisplay ? ", " : "") + hDisplay + (hDisplay && mDisplay ? ", " : "") + mDisplay;
|
return dDisplay + (dDisplay && hDisplay ? ", " : "") + hDisplay + (hDisplay && mDisplay ? ", " : "") + mDisplay;
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
let returnTime = datetime.toISOString().substring(11, 19);
|
let returnTime = datetime.toISOString().substring(11, 19);
|
||||||
|
|
||||||
const timeGates = {
|
const timeGates = {
|
||||||
|
@ -1726,7 +1741,7 @@ const app = new Vue({
|
||||||
kind: page,
|
kind: page,
|
||||||
id: id,
|
id: id,
|
||||||
attributes: {
|
attributes: {
|
||||||
playParams: { kind: page, id: id, isLibrary: isLibrary }
|
playParams: {kind: page, id: id, isLibrary: isLibrary}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
@ -1755,12 +1770,12 @@ const app = new Vue({
|
||||||
if (item.attributes.link.url.includes("viewMultiRoom")) {
|
if (item.attributes.link.url.includes("viewMultiRoom")) {
|
||||||
const params = new Proxy(new URLSearchParams(item.attributes.link.url), {
|
const params = new Proxy(new URLSearchParams(item.attributes.link.url), {
|
||||||
get: (searchParams, prop) => searchParams.get(prop),
|
get: (searchParams, prop) => searchParams.get(prop),
|
||||||
});
|
});
|
||||||
id = params.fcId
|
id = params.fcId
|
||||||
app.getTypeFromID("multiroom", id, false, {
|
app.getTypeFromID("multiroom", id, false, {
|
||||||
platform: "web",
|
platform: "web",
|
||||||
extend: "editorialArtwork,uber,lockupStyle"
|
extend: "editorialArtwork,uber,lockupStyle"
|
||||||
}).then(()=> {
|
}).then(() => {
|
||||||
kind = "multiroom"
|
kind = "multiroom"
|
||||||
window.location.hash = `${kind}/${id}`
|
window.location.hash = `${kind}/${id}`
|
||||||
document.querySelector("#app-content").scrollTop = 0
|
document.querySelector("#app-content").scrollTop = 0
|
||||||
|
@ -1768,14 +1783,15 @@ const app = new Vue({
|
||||||
|
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
window.open(item.attributes.link.url)}
|
window.open(item.attributes.link.url)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if (kind == "multirooms"){
|
} else if (kind == "multirooms") {
|
||||||
app.getTypeFromID("multiroom", id, false, {
|
app.getTypeFromID("multiroom", id, false, {
|
||||||
platform: "web",
|
platform: "web",
|
||||||
extend: "editorialArtwork,uber,lockupStyle"
|
extend: "editorialArtwork,uber,lockupStyle"
|
||||||
}).then(()=> {
|
}).then(() => {
|
||||||
kind = "multiroom"
|
kind = "multiroom"
|
||||||
window.location.hash = `${kind}/${id}`
|
window.location.hash = `${kind}/${id}`
|
||||||
document.querySelector("#app-content").scrollTop = 0
|
document.querySelector("#app-content").scrollTop = 0
|
||||||
|
@ -1814,7 +1830,7 @@ const app = new Vue({
|
||||||
params["meta[albums:tracks]"] = 'popularity'
|
params["meta[albums:tracks]"] = 'popularity'
|
||||||
params["fields[albums]"] = "artistName,artistUrl,artwork,contentRating,editorialArtwork,editorialNotes,editorialVideo,name,playParams,releaseDate,url,copyright"
|
params["fields[albums]"] = "artistName,artistUrl,artwork,contentRating,editorialArtwork,editorialNotes,editorialVideo,name,playParams,releaseDate,url,copyright"
|
||||||
}
|
}
|
||||||
if (kind.includes("playlist") || kind.includes("album")){
|
if (kind.includes("playlist") || kind.includes("album")) {
|
||||||
app.page = (kind) + "_" + (id);
|
app.page = (kind) + "_" + (id);
|
||||||
window.location.hash = `${kind}/${id}${isLibrary ? "/" + isLibrary : ''}`
|
window.location.hash = `${kind}/${id}${isLibrary ? "/" + isLibrary : ''}`
|
||||||
app.getTypeFromID((kind), (id), (isLibrary), params);
|
app.getTypeFromID((kind), (id), (isLibrary), params);
|
||||||
|
@ -1849,19 +1865,19 @@ const app = new Vue({
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
isDisabled() {
|
isDisabled() {
|
||||||
if(!app.mk.nowPlayingItem || app.mk.nowPlayingItem.attributes.playParams.kind == 'radioStation') {
|
if (!app.mk.nowPlayingItem || app.mk.nowPlayingItem.attributes.playParams.kind == 'radioStation') {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
isPrevDisabled() {
|
isPrevDisabled() {
|
||||||
if(this.isDisabled() || (app.mk.queue._position == 0 && app.mk.currentPlaybackTime <= 2)) {
|
if (this.isDisabled() || (app.mk.queue._position == 0 && app.mk.currentPlaybackTime <= 2)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
isNextDisabled() {
|
isNextDisabled() {
|
||||||
if(this.isDisabled() || app.mk.queue._position + 1 == app.mk.queue.length) {
|
if (this.isDisabled() || app.mk.queue._position + 1 == app.mk.queue.length) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
@ -1872,7 +1888,7 @@ const app = new Vue({
|
||||||
let u = await app.mkapi(app.mk.nowPlayingItem.playParams.kind,
|
let u = await app.mkapi(app.mk.nowPlayingItem.playParams.kind,
|
||||||
(app.mk.nowPlayingItem.songId == -1),
|
(app.mk.nowPlayingItem.songId == -1),
|
||||||
(app.mk.nowPlayingItem.songId != -1) ? app.mk.nowPlayingItem.songId : app.mk.nowPlayingItem["id"],
|
(app.mk.nowPlayingItem.songId != -1) ? app.mk.nowPlayingItem.songId : app.mk.nowPlayingItem["id"],
|
||||||
{ "include[songs]": "albums,artists", l: app.mklang });
|
{"include[songs]": "albums,artists", l: app.mklang});
|
||||||
app.searchAndNavigate(u.data.data[0], target)
|
app.searchAndNavigate(u.data.data[0], target)
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
app.searchAndNavigate(app.mk.nowPlayingItem, target)
|
app.searchAndNavigate(app.mk.nowPlayingItem, target)
|
||||||
|
@ -1976,7 +1992,7 @@ const app = new Vue({
|
||||||
}
|
}
|
||||||
if (labelId != "") {
|
if (labelId != "") {
|
||||||
app.showingPlaylist = []
|
app.showingPlaylist = []
|
||||||
await app.getTypeFromID("recordLabel", labelId, false, { views: 'top-releases,latest-releases,top-artists' });
|
await app.getTypeFromID("recordLabel", labelId, false, {views: 'top-releases,latest-releases,top-artists'});
|
||||||
app.page = "recordLabel_" + labelId;
|
app.page = "recordLabel_" + labelId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2014,11 +2030,10 @@ const app = new Vue({
|
||||||
// console.log(kind, id, isLibrary)
|
// console.log(kind, id, isLibrary)
|
||||||
app.mk.stop().then(() => {
|
app.mk.stop().then(() => {
|
||||||
if (kind.includes("artist")) {
|
if (kind.includes("artist")) {
|
||||||
app.mk.setStationQueue({ artist: 'a-' + id }).then(() => {
|
app.mk.setStationQueue({artist: 'a-' + id}).then(() => {
|
||||||
app.mk.play()
|
app.mk.play()
|
||||||
})
|
})
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
app.playMediaItemById((id), (kind), (isLibrary), item.attributes.url ?? '')
|
app.playMediaItemById((id), (kind), (isLibrary), item.attributes.url ?? '')
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -2041,7 +2056,7 @@ const app = new Vue({
|
||||||
} finally {
|
} finally {
|
||||||
if (kind == "appleCurator") {
|
if (kind == "appleCurator") {
|
||||||
app.appleCurator = a.data.data[0]
|
app.appleCurator = a.data.data[0]
|
||||||
} else if (kind == "multiroom"){
|
} else if (kind == "multiroom") {
|
||||||
app.multiroom = a.data.data[0]
|
app.multiroom = a.data.data[0]
|
||||||
} else {
|
} else {
|
||||||
this.getPlaylistContinuous(a, true)
|
this.getPlaylistContinuous(a, true)
|
||||||
|
@ -2050,7 +2065,7 @@ const app = new Vue({
|
||||||
} finally {
|
} finally {
|
||||||
if (kind == "appleCurator") {
|
if (kind == "appleCurator") {
|
||||||
app.appleCurator = a.data.data[0]
|
app.appleCurator = a.data.data[0]
|
||||||
} else if (kind == "multiroom"){
|
} else if (kind == "multiroom") {
|
||||||
app.multiroom = a.data.data[0]
|
app.multiroom = a.data.data[0]
|
||||||
} else {
|
} else {
|
||||||
this.getPlaylistContinuous(a, true)
|
this.getPlaylistContinuous(a, true)
|
||||||
|
@ -2062,7 +2077,7 @@ const app = new Vue({
|
||||||
let self = this
|
let self = this
|
||||||
let prefs = this.cfg.libraryPrefs.songs
|
let prefs = this.cfg.libraryPrefs.songs
|
||||||
let albumAdded = self.library?.albums?.listing?.map(function (i) {
|
let albumAdded = self.library?.albums?.listing?.map(function (i) {
|
||||||
return { [i.id]: i.attributes?.dateAdded }
|
return {[i.id]: i.attributes?.dateAdded}
|
||||||
})
|
})
|
||||||
let startTime = new Date().getTime()
|
let startTime = new Date().getTime()
|
||||||
|
|
||||||
|
@ -2294,8 +2309,7 @@ const app = new Vue({
|
||||||
try {
|
try {
|
||||||
if (method.includes(`multiroom`)) {
|
if (method.includes(`multiroom`)) {
|
||||||
return await this.mk.api.v3.music(`v1/editorial/${app.mk.storefrontId}/${truemethod}/${term.toString()}`, params, params2)
|
return await this.mk.api.v3.music(`v1/editorial/${app.mk.storefrontId}/${truemethod}/${term.toString()}`, params, params2)
|
||||||
}
|
} else if (library) {
|
||||||
else if (library) {
|
|
||||||
return await this.mk.api.v3.music(`v1/me/library/${truemethod}/${term.toString()}`, params, params2)
|
return await this.mk.api.v3.music(`v1/me/library/${truemethod}/${term.toString()}`, params, params2)
|
||||||
} else {
|
} else {
|
||||||
return await this.mk.api.v3.music(`/v1/catalog/${app.mk.storefrontId}/${truemethod}/${term.toString()}`, params, params2)
|
return await this.mk.api.v3.music(`/v1/catalog/${app.mk.storefrontId}/${truemethod}/${term.toString()}`, params, params2)
|
||||||
|
@ -2470,7 +2484,7 @@ const app = new Vue({
|
||||||
}
|
}
|
||||||
if (downloaded.meta.total > library.length || typeof downloaded.meta.next != "undefined") {
|
if (downloaded.meta.total > library.length || typeof downloaded.meta.next != "undefined") {
|
||||||
console.debug(`downloading next chunk - ${library.length
|
console.debug(`downloading next chunk - ${library.length
|
||||||
} albums so far`)
|
} albums so far`)
|
||||||
downloadChunk()
|
downloadChunk()
|
||||||
} else {
|
} else {
|
||||||
self.library.albums.listing = library
|
self.library.albums.listing = library
|
||||||
|
@ -2579,7 +2593,7 @@ const app = new Vue({
|
||||||
}
|
}
|
||||||
if (downloaded.meta.total > library.length || typeof downloaded.meta.next != "undefined") {
|
if (downloaded.meta.total > library.length || typeof downloaded.meta.next != "undefined") {
|
||||||
console.log(`downloading next chunk - ${library.length
|
console.log(`downloading next chunk - ${library.length
|
||||||
} artists so far`)
|
} artists so far`)
|
||||||
downloadChunk()
|
downloadChunk()
|
||||||
} else {
|
} else {
|
||||||
self.library.artists.listing = library
|
self.library.artists.listing = library
|
||||||
|
@ -2602,19 +2616,19 @@ const app = new Vue({
|
||||||
getTotalTime() {
|
getTotalTime() {
|
||||||
try {
|
try {
|
||||||
if (app.showingPlaylist.relationships.tracks.data.length === 0) return ""
|
if (app.showingPlaylist.relationships.tracks.data.length === 0) return ""
|
||||||
const timeInSeconds = Math.round([].concat(...app.showingPlaylist.relationships.tracks.data).reduce((a, { attributes: { durationInMillis } }) => a + durationInMillis, 0) / 1000);
|
const timeInSeconds = Math.round([].concat(...app.showingPlaylist.relationships.tracks.data).reduce((a, {attributes: {durationInMillis}}) => a + durationInMillis, 0) / 1000);
|
||||||
return `${app.showingPlaylist.relationships.tracks.data.length} ${app.getLz("term.track", { "count": app.showingPlaylist.relationships.tracks.data.length })}, ${app.convertTime(timeInSeconds, 'long')}`
|
return `${app.showingPlaylist.relationships.tracks.data.length} ${app.getLz("term.track", {"count": app.showingPlaylist.relationships.tracks.data.length})}, ${app.convertTime(timeInSeconds, 'long')}`
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async getLibrarySongs() {
|
async getLibrarySongs() {
|
||||||
let response = await this.mkapi("songs", true, "", { limit: 100, l: this.mklang }, { includeResponseMeta: !0 })
|
let response = await this.mkapi("songs", true, "", {limit: 100, l: this.mklang}, {includeResponseMeta: !0})
|
||||||
this.library.songs.listing = response.data.data
|
this.library.songs.listing = response.data.data
|
||||||
this.library.songs.meta = response.data.meta
|
this.library.songs.meta = response.data.meta
|
||||||
},
|
},
|
||||||
async getLibraryAlbums() {
|
async getLibraryAlbums() {
|
||||||
let response = await this.mkapi("albums", true, "", { limit: 100, l: this.mklang }, { includeResponseMeta: !0 })
|
let response = await this.mkapi("albums", true, "", {limit: 100, l: this.mklang}, {includeResponseMeta: !0})
|
||||||
this.library.albums.listing = response.data.data
|
this.library.albums.listing = response.data.data
|
||||||
this.library.albums.meta = response.data.meta
|
this.library.albums.meta = response.data.meta
|
||||||
},
|
},
|
||||||
|
@ -2705,13 +2719,13 @@ const app = new Vue({
|
||||||
let self = this
|
let self = this
|
||||||
this.mk.api.v3.music(
|
this.mk.api.v3.music(
|
||||||
"/v1/me/library/playlist-folders/", {}, {
|
"/v1/me/library/playlist-folders/", {}, {
|
||||||
fetchOptions: {
|
fetchOptions: {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
body: JSON.stringify({
|
body: JSON.stringify({
|
||||||
attributes: { name: name }
|
attributes: {name: name}
|
||||||
})
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
).then((res) => {
|
).then((res) => {
|
||||||
let playlist = (res.data.data[0])
|
let playlist = (res.data.data[0])
|
||||||
self.playlists.listing.push({
|
self.playlists.listing.push({
|
||||||
|
@ -3044,7 +3058,8 @@ const app = new Vue({
|
||||||
} else { //4xx rejected
|
} else { //4xx rejected
|
||||||
getToken(2, '', '', id, lang, '');
|
getToken(2, '', '', id, lang, '');
|
||||||
}
|
}
|
||||||
} catch (e) { }
|
} catch (e) {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
req2.send();
|
req2.send();
|
||||||
}
|
}
|
||||||
|
@ -3102,8 +3117,7 @@ const app = new Vue({
|
||||||
translation: ''
|
translation: ''
|
||||||
});
|
});
|
||||||
app.lyrics = preLrc.reverse();
|
app.lyrics = preLrc.reverse();
|
||||||
}
|
} catch (e) {
|
||||||
catch (e) {
|
|
||||||
app.lyrics = "";
|
app.lyrics = "";
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -3145,6 +3159,7 @@ const app = new Vue({
|
||||||
function b64_to_utf8(str) {
|
function b64_to_utf8(str) {
|
||||||
return decodeURIComponent(escape(window.atob(str)));
|
return decodeURIComponent(escape(window.atob(str)));
|
||||||
}
|
}
|
||||||
|
|
||||||
const htmlDecode = (input) => {
|
const htmlDecode = (input) => {
|
||||||
const doc = new DOMParser().parseFromString(input, "text/html");
|
const doc = new DOMParser().parseFromString(input, "text/html");
|
||||||
return doc.documentElement.textContent;
|
return doc.documentElement.textContent;
|
||||||
|
@ -3175,8 +3190,7 @@ const app = new Vue({
|
||||||
translation: ''
|
translation: ''
|
||||||
});
|
});
|
||||||
app.lyrics = preLrc.reverse();
|
app.lyrics = preLrc.reverse();
|
||||||
}
|
} catch (e) {
|
||||||
catch (e) {
|
|
||||||
console.log(e)
|
console.log(e)
|
||||||
app.loadNeteaseLyrics();
|
app.loadNeteaseLyrics();
|
||||||
app.lyrics = "";
|
app.lyrics = "";
|
||||||
|
@ -3227,15 +3241,15 @@ const app = new Vue({
|
||||||
line: "lrcInstrumental"
|
line: "lrcInstrumental"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
preLrc.push({ startTime: start, endTime: end, line: element.textContent });
|
preLrc.push({startTime: start, endTime: end, line: element.textContent});
|
||||||
endTimes.push(end);
|
endTimes.push(end);
|
||||||
}
|
}
|
||||||
// first line dot
|
// first line dot
|
||||||
if (preLrc.length > 0)
|
if (preLrc.length > 0)
|
||||||
preLrc.unshift({ startTime: 0, endTime: preLrc[0].startTime, line: "lrcInstrumental" });
|
preLrc.unshift({startTime: 0, endTime: preLrc[0].startTime, line: "lrcInstrumental"});
|
||||||
} else {
|
} else {
|
||||||
for (let element of lyricsLines) {
|
for (let element of lyricsLines) {
|
||||||
preLrc.push({ startTime: 9999999, endTime: 9999999, line: element.textContent });
|
preLrc.push({startTime: 9999999, endTime: 9999999, line: element.textContent});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.lyrics = preLrc;
|
this.lyrics = preLrc;
|
||||||
|
@ -3303,17 +3317,17 @@ const app = new Vue({
|
||||||
console.debug(id, truekind, isLibrary)
|
console.debug(id, truekind, isLibrary)
|
||||||
try {
|
try {
|
||||||
if (truekind.includes("artist")) {
|
if (truekind.includes("artist")) {
|
||||||
app.mk.setStationQueue({ artist: 'a-' + id }).then(() => {
|
app.mk.setStationQueue({artist: 'a-' + id}).then(() => {
|
||||||
app.mk.play()
|
app.mk.play()
|
||||||
})
|
})
|
||||||
} else if (truekind == "radioStations") {
|
} else if (truekind == "radioStations") {
|
||||||
this.mk.setStationQueue({ url: raurl }).then(function (queue) {
|
this.mk.setStationQueue({url: raurl}).then(function (queue) {
|
||||||
MusicKit.getInstance().play()
|
MusicKit.getInstance().play()
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.mk.setQueue({
|
this.mk.setQueue({
|
||||||
[truekind]: [id],
|
[truekind]: [id],
|
||||||
parameters: { l: this.mklang }
|
parameters: {l: this.mklang}
|
||||||
}).then(function (queue) {
|
}).then(function (queue) {
|
||||||
MusicKit.getInstance().play()
|
MusicKit.getInstance().play()
|
||||||
})
|
})
|
||||||
|
@ -3354,7 +3368,7 @@ const app = new Vue({
|
||||||
if (item) {
|
if (item) {
|
||||||
app.mk.setQueue({
|
app.mk.setQueue({
|
||||||
[item.attributes.playParams.kind ?? item.type]: item.attributes.playParams.id ?? item.id,
|
[item.attributes.playParams.kind ?? item.type]: item.attributes.playParams.id ?? item.id,
|
||||||
parameters: { l: app.mklang }
|
parameters: {l: app.mklang}
|
||||||
}).then(function () {
|
}).then(function () {
|
||||||
app.mk.play().then(() => {
|
app.mk.play().then(() => {
|
||||||
if (app.mk.shuffleMode == 1) {
|
if (app.mk.shuffleMode == 1) {
|
||||||
|
@ -3411,7 +3425,7 @@ const app = new Vue({
|
||||||
for (let kind in itemsToPlay) {
|
for (let kind in itemsToPlay) {
|
||||||
let ids = itemsToPlay[kind]
|
let ids = itemsToPlay[kind]
|
||||||
if (ids.length > 0) {
|
if (ids.length > 0) {
|
||||||
app.mk.playLater({ [kind + "s"]: itemsToPlay[kind] })
|
app.mk.playLater({[kind + "s"]: itemsToPlay[kind]})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -3432,22 +3446,22 @@ const app = new Vue({
|
||||||
let ids = itemsToPlay[kind]
|
let ids = itemsToPlay[kind]
|
||||||
if (ids.length > 0) {
|
if (ids.length > 0) {
|
||||||
if (app.mk.queue._itemIDs.length > 0) {
|
if (app.mk.queue._itemIDs.length > 0) {
|
||||||
app.mk.playLater({ [kind + "s"]: itemsToPlay[kind] }).then(function () {
|
app.mk.playLater({[kind + "s"]: itemsToPlay[kind]}).then(function () {
|
||||||
ind += 1;
|
ind += 1;
|
||||||
console.log(ind, Object.keys(itemsToPlay).length)
|
console.log(ind, Object.keys(itemsToPlay).length)
|
||||||
if (ind >= Object.keys(itemsToPlay).length) {
|
if (ind >= Object.keys(itemsToPlay).length) {
|
||||||
app.mk.changeToMediaAtIndex(app.mk.queue._itemIDs.indexOf(item.attributes.playParams.id ?? item.id))
|
app.mk.changeToMediaAtIndex(app.mk.queue._itemIDs.indexOf(item.attributes.playParams.id ?? item.id))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
app.mk.setQueue({ [kind + "s"]: itemsToPlay[kind] }).then(function () {
|
app.mk.setQueue({[kind + "s"]: itemsToPlay[kind]}).then(function () {
|
||||||
ind += 1;
|
ind += 1;
|
||||||
console.log(ind, Object.keys(itemsToPlay).length)
|
console.log(ind, Object.keys(itemsToPlay).length)
|
||||||
if (ind >= Object.keys(itemsToPlay).length) {
|
if (ind >= Object.keys(itemsToPlay).length) {
|
||||||
app.mk.changeToMediaAtIndex(app.mk.queue._itemIDs.indexOf(item.attributes.playParams.id ?? item.id))
|
app.mk.changeToMediaAtIndex(app.mk.queue._itemIDs.indexOf(item.attributes.playParams.id ?? item.id))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3460,7 +3474,7 @@ const app = new Vue({
|
||||||
if (truekind == "playlists" && (id.startsWith("p.") || id.startsWith("pl.u"))) {
|
if (truekind == "playlists" && (id.startsWith("p.") || id.startsWith("pl.u"))) {
|
||||||
app.mk.setQueue({
|
app.mk.setQueue({
|
||||||
[item.attributes.playParams.kind ?? item.type]: item.attributes.playParams.id ?? item.id,
|
[item.attributes.playParams.kind ?? item.type]: item.attributes.playParams.id ?? item.id,
|
||||||
parameters: { l: app.mklang }
|
parameters: {l: app.mklang}
|
||||||
}).then(function () {
|
}).then(function () {
|
||||||
app.mk.changeToMediaAtIndex(app.mk.queue._itemIDs.indexOf(item.id) ?? 1).then(function () {
|
app.mk.changeToMediaAtIndex(app.mk.queue._itemIDs.indexOf(item.id) ?? 1).then(function () {
|
||||||
if ((app.showingPlaylist && app.showingPlaylist.id == id)) {
|
if ((app.showingPlaylist && app.showingPlaylist.id == id)) {
|
||||||
|
@ -3500,7 +3514,7 @@ const app = new Vue({
|
||||||
} else {
|
} else {
|
||||||
this.mk.setQueue({
|
this.mk.setQueue({
|
||||||
[truekind]: [id],
|
[truekind]: [id],
|
||||||
parameters: { l: this.mklang }
|
parameters: {l: this.mklang}
|
||||||
}).then(function (queue) {
|
}).then(function (queue) {
|
||||||
if (item && ((queue._itemIDs[childIndex] != item.id))) {
|
if (item && ((queue._itemIDs[childIndex] != item.id))) {
|
||||||
childIndex = queue._itemIDs.indexOf(item.id)
|
childIndex = queue._itemIDs.indexOf(item.id)
|
||||||
|
@ -3624,12 +3638,16 @@ const app = new Vue({
|
||||||
with: ["serverBubbles", "lyricSnippet"],
|
with: ["serverBubbles", "lyricSnippet"],
|
||||||
"art[url]": "f",
|
"art[url]": "f",
|
||||||
"art[social-profiles:url]": "c"
|
"art[social-profiles:url]": "c"
|
||||||
}, { includeResponseMeta: !0 }).then(function (results) {
|
}, {includeResponseMeta: !0}).then(function (results) {
|
||||||
results.data.results["meta"] = results.data.meta
|
results.data.results["meta"] = results.data.meta
|
||||||
self.search.resultsSocial = results.data.results
|
self.search.resultsSocial = results.data.results
|
||||||
})
|
})
|
||||||
|
|
||||||
this.search.resultsLibrary = await app.mk.api.library.search(app.search.term, { types: 'library-songs,library-albums,library-playlists,library-artists', limit: 25, offset: 0 })
|
this.search.resultsLibrary = await app.mk.api.library.search(app.search.term, {
|
||||||
|
types: 'library-songs,library-albums,library-playlists,library-artists',
|
||||||
|
limit: 25,
|
||||||
|
offset: 0
|
||||||
|
})
|
||||||
|
|
||||||
},
|
},
|
||||||
async inLibrary(items = []) {
|
async inLibrary(items = []) {
|
||||||
|
@ -3647,7 +3665,7 @@ const app = new Vue({
|
||||||
return type.type == this
|
return type.type == this
|
||||||
}, type)
|
}, type)
|
||||||
if (index == -1) {
|
if (index == -1) {
|
||||||
types.push({ type: type, id: [id] })
|
types.push({type: type, id: [id]})
|
||||||
} else {
|
} else {
|
||||||
types[index].id.push(id)
|
types[index].id.push(id)
|
||||||
}
|
}
|
||||||
|
@ -3783,7 +3801,7 @@ const app = new Vue({
|
||||||
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 != '') {
|
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 != '') {
|
||||||
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) {
|
||||||
this.currentArtUrl = this.mk.nowPlayingItem._assets[0].artworkURL
|
this.currentArtUrl = this.mk.nowPlayingItem._assets[0].artworkURL
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
|
@ -3796,7 +3814,7 @@ const app = new Vue({
|
||||||
if (data != null && data !== "" && data.attributes != null && data.attributes.artwork != null) {
|
if (data != null && data !== "" && data.attributes != null && data.attributes.artwork != null) {
|
||||||
this.currentArtUrlRaw = (data["attributes"]["artwork"]["url"] ?? '')
|
this.currentArtUrlRaw = (data["attributes"]["artwork"]["url"] ?? '')
|
||||||
this.currentArtUrl = (data["attributes"]["artwork"]["url"] ?? '').replace('{w}', artworkSize).replace('{h}', artworkSize);
|
this.currentArtUrl = (data["attributes"]["artwork"]["url"] ?? '').replace('{w}', artworkSize).replace('{h}', artworkSize);
|
||||||
if(this.mk.nowPlayingItem._assets[0].artworkURL) {
|
if (this.mk.nowPlayingItem._assets[0].artworkURL) {
|
||||||
this.currentArtUrl = this.mk.nowPlayingItem._assets[0].artworkURL
|
this.currentArtUrl = this.mk.nowPlayingItem._assets[0].artworkURL
|
||||||
}
|
}
|
||||||
ipcRenderer.send('updateRPCImage', this.currentArtUrl ?? '');
|
ipcRenderer.send('updateRPCImage', this.currentArtUrl ?? '');
|
||||||
|
@ -3851,10 +3869,10 @@ const app = new Vue({
|
||||||
},
|
},
|
||||||
quickPlay(query) {
|
quickPlay(query) {
|
||||||
let self = this
|
let self = this
|
||||||
MusicKit.getInstance().api.search(query, { limit: 2, types: 'songs' }).then(function (data) {
|
MusicKit.getInstance().api.search(query, {limit: 2, types: 'songs'}).then(function (data) {
|
||||||
MusicKit.getInstance().setQueue({
|
MusicKit.getInstance().setQueue({
|
||||||
song: data["songs"]['data'][0]["id"],
|
song: data["songs"]['data'][0]["id"],
|
||||||
parameters: { l: app.mklang }
|
parameters: {l: app.mklang}
|
||||||
}).then(function (queue) {
|
}).then(function (queue) {
|
||||||
MusicKit.getInstance().play()
|
MusicKit.getInstance().play()
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
@ -4011,10 +4029,10 @@ const app = new Vue({
|
||||||
setAirPlayCodeUI() {
|
setAirPlayCodeUI() {
|
||||||
this.modals.airplayPW = true
|
this.modals.airplayPW = true
|
||||||
},
|
},
|
||||||
sendAirPlaySuccess(){
|
sendAirPlaySuccess() {
|
||||||
notyf.success('Device paired successfully!');
|
notyf.success('Device paired successfully!');
|
||||||
},
|
},
|
||||||
sendAirPlayFailed(){
|
sendAirPlayFailed() {
|
||||||
notyf.error('Device paring failed!');
|
notyf.error('Device paring failed!');
|
||||||
},
|
},
|
||||||
windowFocus(val) {
|
windowFocus(val) {
|
||||||
|
@ -4039,7 +4057,7 @@ const app = new Vue({
|
||||||
let data_type = this.mk.nowPlayingItem.playParams.kind
|
let data_type = this.mk.nowPlayingItem.playParams.kind
|
||||||
let item_id = this.mk.nowPlayingItem.attributes.playParams.id ?? this.mk.nowPlayingItem.id
|
let item_id = this.mk.nowPlayingItem.attributes.playParams.id ?? this.mk.nowPlayingItem.id
|
||||||
let isLibrary = this.mk.nowPlayingItem.attributes.playParams.isLibrary ?? false
|
let isLibrary = this.mk.nowPlayingItem.attributes.playParams.isLibrary ?? false
|
||||||
let params = { "fields[songs]": "inLibrary", "fields[albums]": "inLibrary", "relate": "library", "t": "1" }
|
let params = {"fields[songs]": "inLibrary", "fields[albums]": "inLibrary", "relate": "library", "t": "1"}
|
||||||
app.selectedMediaItems = []
|
app.selectedMediaItems = []
|
||||||
app.select_selectMediaItem(item_id, data_type, 0, '12344', isLibrary)
|
app.select_selectMediaItem(item_id, data_type, 0, '12344', isLibrary)
|
||||||
let useMenu = "normal"
|
let useMenu = "normal"
|
||||||
|
@ -4058,36 +4076,36 @@ const app = new Vue({
|
||||||
app.love(app.mk.nowPlayingItem)
|
app.love(app.mk.nowPlayingItem)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"icon": "./assets/feather/heart.svg",
|
"icon": "./assets/feather/heart.svg",
|
||||||
"id": "unlove",
|
"id": "unlove",
|
||||||
"active": true,
|
"active": true,
|
||||||
"name": app.getLz('action.unlove'),
|
"name": app.getLz('action.unlove'),
|
||||||
"hidden": true,
|
"hidden": true,
|
||||||
"action": function () {
|
"action": function () {
|
||||||
app.unlove(app.mk.nowPlayingItem)
|
app.unlove(app.mk.nowPlayingItem)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"icon": "./assets/feather/thumbs-down.svg",
|
"icon": "./assets/feather/thumbs-down.svg",
|
||||||
"id": "dislike",
|
"id": "dislike",
|
||||||
"name": app.getLz('action.dislike'),
|
"name": app.getLz('action.dislike'),
|
||||||
"hidden": false,
|
"hidden": false,
|
||||||
"disabled": true,
|
"disabled": true,
|
||||||
"action": function () {
|
"action": function () {
|
||||||
app.dislike(app.mk.nowPlayingItem)
|
app.dislike(app.mk.nowPlayingItem)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"icon": "./assets/feather/thumbs-down.svg",
|
"icon": "./assets/feather/thumbs-down.svg",
|
||||||
"id": "undo_dislike",
|
"id": "undo_dislike",
|
||||||
"name": app.getLz('action.undoDislike'),
|
"name": app.getLz('action.undoDislike'),
|
||||||
"active": true,
|
"active": true,
|
||||||
"hidden": true,
|
"hidden": true,
|
||||||
"action": function () {
|
"action": function () {
|
||||||
app.unlove(app.mk.nowPlayingItem)
|
app.unlove(app.mk.nowPlayingItem)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
items: [
|
items: [
|
||||||
{
|
{
|
||||||
|
@ -4119,7 +4137,7 @@ const app = new Vue({
|
||||||
"icon": "./assets/feather/radio.svg",
|
"icon": "./assets/feather/radio.svg",
|
||||||
"name": app.getLz('action.startRadio'),
|
"name": app.getLz('action.startRadio'),
|
||||||
"action": function () {
|
"action": function () {
|
||||||
app.mk.setStationQueue({ song: app.mk.nowPlayingItem.id }).then(() => {
|
app.mk.setStationQueue({song: app.mk.nowPlayingItem.id}).then(() => {
|
||||||
app.mk.play()
|
app.mk.play()
|
||||||
app.selectedMediaItems = []
|
app.selectedMediaItems = []
|
||||||
})
|
})
|
||||||
|
@ -4280,7 +4298,7 @@ const app = new Vue({
|
||||||
app.appMode = 'player';
|
app.appMode = 'player';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
pip(){
|
pip() {
|
||||||
document.querySelector('video#apple-music-video-player').requestPictureInPicture()
|
document.querySelector('video#apple-music-video-player').requestPictureInPicture()
|
||||||
// .then(pictureInPictureWindow => {
|
// .then(pictureInPictureWindow => {
|
||||||
// pictureInPictureWindow.addEventListener("resize", () => {
|
// pictureInPictureWindow.addEventListener("resize", () => {
|
||||||
|
@ -4461,20 +4479,23 @@ const app = new Vue({
|
||||||
_playRadioStream(e) {
|
_playRadioStream(e) {
|
||||||
var xhr = new XMLHttpRequest();
|
var xhr = new XMLHttpRequest();
|
||||||
xhr.onreadystatechange = process;
|
xhr.onreadystatechange = process;
|
||||||
xhr.open("GET", e , true);
|
xhr.open("GET", e, true);
|
||||||
xhr.send();
|
xhr.send();
|
||||||
let self = this
|
let self = this
|
||||||
|
|
||||||
function process() {
|
function process() {
|
||||||
if (xhr.readyState == 4) {
|
if (xhr.readyState == 4) {
|
||||||
let sources = xhr.responseText.match(/^(?!#)(?!\s).*$/mg).filter(function(element){return (element);});
|
let sources = xhr.responseText.match(/^(?!#)(?!\s).*$/mg).filter(function (element) {
|
||||||
// Load first source
|
return (element);
|
||||||
let src = sources[0];
|
});
|
||||||
app.mk._services.mediaItemPlayback._currentPlayer._playAssetURL(src, false)
|
// Load first source
|
||||||
}
|
let src = sources[0];
|
||||||
|
app.mk._services.mediaItemPlayback._currentPlayer._playAssetURL(src, false)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
export { app }
|
export {app}
|
||||||
|
|
|
@ -64,7 +64,6 @@
|
||||||
background-color: #eee;
|
background-color: #eee;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
@ -92,6 +91,11 @@
|
||||||
</mini-view>
|
</mini-view>
|
||||||
</div>
|
</div>
|
||||||
</transition>
|
</transition>
|
||||||
|
<transition name="fsModeSwitch">
|
||||||
|
<div class="fullscreen-view-container oobe" v-if="appMode == 'oobe'">
|
||||||
|
<cider-oobe></cider-oobe>
|
||||||
|
</div>
|
||||||
|
</transition>
|
||||||
<%- include('app/panels'); %>
|
<%- include('app/panels'); %>
|
||||||
<div class="cursor" v-if="chrome.showCursor"></div>
|
<div class="cursor" v-if="chrome.showCursor"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,19 +1,127 @@
|
||||||
<script type="text/x-template" id="cider-oobe">
|
<script type="text/x-template" id="cider-oobe">
|
||||||
<div class="content-inner oobe">
|
<div class="content-inner oobe">
|
||||||
<div class="oobe-view">
|
<!-- before_we_start-->
|
||||||
<div class="oobe-header">
|
<transition name="fade">
|
||||||
Welcome to Cider
|
<div class="oobe-view" v-if="screen == 'before_we_start'">
|
||||||
</div>
|
<div class="oobe-header">
|
||||||
<div class="oobe-body">
|
{{ getLz("oobe.amupsell.title") }}
|
||||||
body text
|
</div>
|
||||||
</div>
|
<div class="oobe-body text">{{ getLz("oobe.amupsell.text") }}</div>
|
||||||
<div class="oobe-footer">
|
<div class="oobe-footer">
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
<div class="md-btn">Previous</div>
|
<div class="md-btn" @click="screen = 'welcome'">{{ getLz("oobe.next") }}</div>
|
||||||
<div class="md-btn">Next</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</transition>
|
||||||
|
|
||||||
|
<!-- Welcome -->
|
||||||
|
<transition name="fade">
|
||||||
|
<div class="oobe-view" v-if="screen == 'welcome'">
|
||||||
|
<div class="oobe-header">
|
||||||
|
{{ getLz("oobe.intro.title") }}
|
||||||
|
</div>
|
||||||
|
<div class="oobe-body text">{{ getLz("oobe.intro.text") }}</div>
|
||||||
|
<div class="oobe-footer">
|
||||||
|
<div class="btn-group">
|
||||||
|
<div class="md-btn" @click="screen = 'before_we_start'">{{ getLz("oobe.previous") }}</div>
|
||||||
|
<div class="md-btn" @click="screen = 'general'">{{ getLz("oobe.next") }}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</transition>
|
||||||
|
|
||||||
|
<!-- General -->
|
||||||
|
<transition name="fade">
|
||||||
|
<div class="oobe-view" v-if="screen == 'general'">
|
||||||
|
<div class="oobe-header">
|
||||||
|
{{ getLz("oobe.general.title") }}
|
||||||
|
</div>
|
||||||
|
<div class="oobe-body text">{{ getLz("oobe.general.text") }}</div>
|
||||||
|
<div class="oobe-footer">
|
||||||
|
<div class="btn-group">
|
||||||
|
<div class="md-btn" @click="screen = 'welcome'">{{ getLz("oobe.previous") }}</div>
|
||||||
|
<div class="md-btn" @click="screen = 'visual'">{{ getLz("oobe.next") }}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</transition>
|
||||||
|
|
||||||
|
<!-- Visual -->
|
||||||
|
<transition name="fade">
|
||||||
|
<div class="oobe-view" v-if="screen == 'visual'">
|
||||||
|
<div class="oobe-header">
|
||||||
|
{{ getLz("oobe.visual.title") }}
|
||||||
|
</div>
|
||||||
|
<div class="oobe-body visual">
|
||||||
|
<b-row>
|
||||||
|
<b-col>
|
||||||
|
<div class="card bg-dark text-white stylePicker">
|
||||||
|
<div class="card-body">
|
||||||
|
<img class="visualPreview" src="./assets/oobe/ss1.png" alt="TEMP">
|
||||||
|
</div>
|
||||||
|
<div class="card-footer">
|
||||||
|
Mojave
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</b-col>
|
||||||
|
<b-col>
|
||||||
|
<div class="card bg-dark text-white stylePicker">
|
||||||
|
<div class="card-body">
|
||||||
|
<img class="visualPreview" src="./assets/oobe/ss2.png" alt="TEMP">
|
||||||
|
</div>
|
||||||
|
<div class="card-footer">
|
||||||
|
Maverick
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</b-col>
|
||||||
|
</b-row>
|
||||||
|
<div class="blurb">{{getLz("oobe.visual.layout.text")}}</div>
|
||||||
|
</div>
|
||||||
|
<div class="oobe-footer">
|
||||||
|
<div class="btn-group">
|
||||||
|
<div class="md-btn" @click="screen = 'general'">{{ getLz("oobe.previous") }}</div>
|
||||||
|
<div class="md-btn" @click="screen = 'audio'">{{ getLz("oobe.next") }}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</transition>
|
||||||
|
|
||||||
|
<!-- Audio -->
|
||||||
|
<transition name="fade">
|
||||||
|
<div class="oobe-view" v-if="screen == 'audio'">
|
||||||
|
<div class="oobe-header">
|
||||||
|
{{ getLz("oobe.audio.title") }}
|
||||||
|
</div>
|
||||||
|
<div class="oobe-body">
|
||||||
|
<div class="blurb">{{ getLz("oobe.audio.text") }}</div>
|
||||||
|
<div class="md-option-container">
|
||||||
|
<div class="settings-option-body">
|
||||||
|
<div class="md-option-line">
|
||||||
|
<div class="md-option-segment">
|
||||||
|
{{getLz('settings.option.audio.enableAdvancedFunctionality')}}
|
||||||
|
<br>
|
||||||
|
<small>{{getLz('settings.option.audio.enableAdvancedFunctionality.description')}}</small>
|
||||||
|
</div>
|
||||||
|
<div class="md-option-segment md-option-segment_auto">
|
||||||
|
<label>
|
||||||
|
<input type="checkbox" v-model="$root.cfg.advanced.AudioContext"
|
||||||
|
v-on:change="toggleAudioContext"
|
||||||
|
switch/>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="oobe-footer">
|
||||||
|
<div class="btn-group">
|
||||||
|
<div class="md-btn" @click="screen = 'visual'">{{ getLz("oobe.previous") }}</div>
|
||||||
|
<div class="md-btn">{{ getLz("oobe.next") }}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</transition>
|
||||||
</div>
|
</div>
|
||||||
</script>
|
</script>
|
||||||
<script>
|
<script>
|
||||||
|
@ -21,13 +129,16 @@
|
||||||
template: '#cider-oobe',
|
template: '#cider-oobe',
|
||||||
data: function () {
|
data: function () {
|
||||||
return {
|
return {
|
||||||
|
screen: "before_we_start"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async mounted() {
|
async mounted() {
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getLz() {
|
||||||
|
return this.$root.getLz.apply(this.$root, arguments);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
Loading…
Add table
Add a link
Reference in a new issue