ame is no more :crabrave:

This commit is contained in:
cryptofyre 2021-12-18 19:36:20 -06:00
parent 9dab099224
commit f40490d062
96 changed files with 0 additions and 19256 deletions

View file

@ -1,10 +0,0 @@
[Desktop Entry]
Name=Apple Music
Exec="/opt/Apple Music/apple-music-electron" %U
Terminal=false
Type=Application
Icon=apple-music-electron
StartupWMClass=Apple Music
Comment=An open-source, GPU-accelerated Electron application that emulates the Apple Music website in a customizable interface.
MimeType=x-scheme-handler/ame;x-scheme-handler/itms;x-scheme-handler/itmss;x-scheme-handler/musics;x-scheme-handler/music;
Categories=AudioVideo;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 98 KiB

File diff suppressed because it is too large Load diff

View file

@ -1,778 +0,0 @@
:root {
--backButtonBar-height: 40px;
}
body[platform="Linux x86_64"],
body[platform="Linux"],
body[platform="Linux x86"],
body[platform="Linux ARM"]
{
font-family: -apple-system,BlinkMacSystemFont,"SF Pro","SF Pro Icons","Helvetica Neue",Helvetica,Arial,sans-serif;
}
/* Back Button CSS */
body[back-button] .playlist .songs-list__header-col, .room .songs-list__header-col {
top: var(--backButtonBar-height)!important;
}
#backButtonBar {
position: absolute;
width: calc(100vw - var(--web-navigation-width));
top: 0;
height: var(--backButtonBar-height);
transition: 0.2s;
background-color: transparent;
padding: 5px 10px;
z-index: 9902;
opacity: 0.95;
top: 55px;
}
#backButtonBar .button-area {
position: relative;
width: 50px;
height: 30px;
max-height: 30px;
cursor: pointer;
background-color: rgba(0, 0, 0, 0);
border-radius: 7px;
opacity: 1;
transition: 0.2s;
}
#backButtonBar .button-area:active {
background-color: var(--segmentedControlSelectedBG) !important;
backdrop-filter: saturate(0%) blur(25px) !important;
box-shadow: 0 0 0.5px var(--segmentedControlSelectedBorder),
0 3px 8px var(--segmentedControlSelectedShadow1),
0 3px 1px var(--segmentedControlSelectedShadow2);
}
#backButtonBar .button-area img:active {
opacity: 1 !important;
}
#backButtonBar .button-area img {
display: block;
margin: auto;
width: auto;
height: auto;
opacity: 0.5;
z-index: 10000;
transition: 0.2s;
}
#backButtonBar .button-area img:hover {
opacity: 1;
}
@media only screen and (max-width: 483px) {
#backButtonBar {
width: 100%;
top: 44px;
}
}
@media (prefers-color-scheme: dark) {
#backButtonBar .button-area img {
filter: brightness(0) invert(1);
}
}
/* Settings Menu CSS */
.application-preferences {
width: 100%;
height: 100%;
padding-top: 50px;
display: grid;
grid-template-rows: auto auto auto auto;
grid-template-columns: auto;
}
.app-prefs-section {
width: 100%;
height: auto;
}
.app-prefs-section .settings-list {
padding: 0 10%
}
span.app-prefs-title {
height: 10px !important;
}
.settings-list {
margin: 50px 10px 50px 10px;
}
.settings-list li {
margin: 30px 0 30px 10px;
}
.settings-list li .list-element {
position: relative;
float: right;
}
.application-preferences .app-prefs-section .header-nav-image {
width: auto;
height: 30px;
margin-right: 20px;
}
@media (prefers-color-scheme: dark) {
.application-preferences .app-prefs-section .header-nav-image {
filter: invert(100%);
}
}
.application-preferences .app-prefs-section #advanced {
transform: translateY(-2000px) translateZ(0);
visibility: hidden;
opacity: 0;
transition: opacity .3s ease 0s, transform 0s linear .9s;
position: absolute;
}
.application-preferences .app-prefs-section .revealed {
transform: translateY(0px) !important;
visibility: visible !important;
opacity: 1 !important;
transition: top 0s linear 0s, opacity .3s ease .01s !important;
position: relative !important;
}
/* Credits Section */
.app-prefs-credits {
margin-top: 20px;
}
.app-prefs-credits .dt-footer__list .dt-footer__item {
margin-top: 20px;
display: grid;
grid-template-rows: 15px auto;
grid-template-columns: auto;
}
.app-prefs-credits .dt-footer__list .dt-footer__item ul {
margin-top: 10px;
}
.app-prefs-credits .dt-footer__list {
display: flex;
max-width: 800px;
}
.app-prefs-credits .dt-footer__list .dt-footer__item .dt-footer__link {
grid-row: 1;
margin-bottom: 10px;
}
.app-prefs-credits .dt-footer__list .dt-footer__item .dt-footer__list-item {
grid-row: 2;
color: var(--systemSecondary);
margin: 5px 0;
}
.app-prefs-credits .dt-footer__list .dt-footer__item .dt-footer__list-item a {
color: var(--systemSecondary) !important;
}
/* Help */
.settings-list .app-prefs-help {
color: #808080;
margin: 0 0;
font-size: 12px;
display: block;
}
.header-nav-content .app-prefs-help {
position: relative;
float: right;
color: #808080;
display: block;
font-size: 12px;
margin-bottom: 6px;
-webkit-margin-end: 25px;
margin-inline-end: 25px;
}
.settings-list .app-prefs-divider .app-prefs-help {
font-size: 10px !important;
margin-left: 20px !important;
}
/* Divider */
.settings-list .app-prefs-divider {
margin: 0 0;
}
/* Buttons */
.settings-list li .list-button {
color: var(--systemPrimary);
padding: 5px 10px;
margin-left: 20px;
border-radius: 5px;
cursor: pointer;
font-size: 15px;
font-family: SF Pro Text, SF Pro Icons, Helvetica Neue, Helvetica, Arial, sans-serif;
border-color: #424245;
background-color: hsla(0, 0%, 100%, .04);
border-style: solid;
border-width: 1px;
transition: 0.7s;
}
.success {
background-color: #57F287 !important;
color: #ffffff !important;
border-color: #57F287 !important;
}
.failure {
background-color: #ED4245 !important;
color: #ffffff !important;
border-color: #ED4245 !important;
}
/*LastFM Connect Button*/
.settings-list li #lfmConnect {
background-color: #E4141E !important;
color: #ffffff !important;
border-color: #E4141E !important;
}
/* Toggle Slider */
.settings-list li .slider {
position: absolute;
cursor: pointer;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: #ccc;
-webkit-transition: 0.4s;
transition: 0.4s;
border-radius: 28px;
}
.settings-list li .slider:before {
border-radius: 50%;
position: absolute;
content: "";
height: 20px;
width: 20px;
background-color: white;
-webkit-transition: 0.4s;
transition: 0.4s;
}
.settings-list li .toggle-element {
position: relative;
display: inline-block;
width: 40px;
height: 20px;
grid-column: 3;
margin: 5px 20px 0 20px;
}
.settings-list li .toggle-element input {
opacity: 0;
width: 0;
height: 0;
}
.settings-list li .toggle-element input:checked + .slider {
background-color: var(--keyColor);
}
.settings-list li .toggle-element input:focus + .slider {
box-shadow: 0 0 1px var(--keyColor);
}
.settings-list li .toggle-element input:checked + .slider:before {
-webkit-transform: translateX(20px);
-ms-transform: translateX(20px);
transform: translateX(20px);
}
/* Dropdown */
.settings-list li .form-dropdown-select {
color: var(--systemPrimary);
border-color: #424245;
background-color: hsla(0, 0%, 100%, .04);
padding: 5px 10px;
margin: 10px 0 10px 20px;
border-radius: 5px;
font-size: 15px;
font-family: SF Pro Text, SF Pro Icons, Helvetica Neue, Helvetica, Arial, sans-serif;
border-style: solid;
border-width: 1px;
}
.settings-list li .form-dropdown-select option {
color: black;
}
.settings-list li .form-dropdown-select option:disabled {
color: #808080;
}
/* Artwork CSS (for miniPlayer) */
.web-chrome-playback-lcd #ember13.media-artwork-v2--downloaded::after {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
pointer-events: none;
}
.web-chrome-playback-lcd #ember13.media-artwork-v2--downloaded:hover::after {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.5);
background-image: url("ameres://icons/webui/MiniPlayer_hover.svg");
background-size: contain;
background-position: center;
z-index: 1;
pointer-events: none;
}
/* Mini Player Context Menu */
@media only screen and (max-width: 400px) {
body[data-miniplayer] #web-main > .loading-inner,
body[data-miniplayer] #backButtonBar,
body[data-miniplayer] #web-navigation-container,
body[data-miniplayer] .web-chrome {
display: none;
}
body[data-miniplayer] .menuicon {
display: none !important;
}
body[data-miniplayer] li.context-menu__option {
font-size: 12px;
min-height: auto;
}
body[data-miniplayer] .miniPlayerArtwork {
height: 100%;
width: 100%;
position: absolute;
top: 0;
left: 0;
background: black var(--musicKit-artwork) center;
background-size: cover;
z-index: 800;
}
}
/* Buttons */
#airplayButton, #lyricsButton, button[aria-label="My Account"] {
cursor: pointer;
}
/* Lyrics CSS */
:root {
--appleEase: cubic-bezier(0.42, 0, 0.58, 1);
--panel-width: 300px;
}
body {
background: black;
transition: background var(--appleEase) .10s;
}
body.no-acrylic {
background: var(--pageBG) !important;
}
.appleSidebar {
width: var(--panelWidth);
animation: 3s lyricsSlideOut forwards;
}
@keyframes lyricsSlideOut {
0% {
transform: translateX(-300px);
}
100% {
transform: translateX(0px);
}
}
#backgroundImage {
width: 100%;
height: 100%;
filter: blur(16px) saturate(180%);
background-repeat: no-repeat;
object-fit: cover;
object-position: center center;
position: absolute;
}
#lyricer {
width: 90%;
font-weight: 700;
font-family: SF Pro JP, SF Pro KR, SF Pro, "M PLUS 1p", "Hiragino Sans GB W6", Tahoma, Arial, sans-serif;
text-shadow: rgb(238, 238, 238) 0 0 1px;
color: rgb(102, 102, 102);
overflow: hidden scroll;
z-index: 2;
position: absolute;
margin-right: 20px;
margin-left: 5%;
height: 90%;
--lyricBlur: 1px;
font-size: 1.6rem;
-webkit-mask-image: -webkit-gradient(linear, left 95%, left bottom, from(rgba(0, 0, 0, 1)), to(rgba(0, 0, 0, 0)));
transition: all 1s var(--appleEase) !important;
}
#lyricer:hover {
--lyricBlur: 0px;
}
#lyricer > ul li:not(.lyricer-current-line) {
filter: blur(var(--lyricBlur));
}
#lyricer::-webkit-scrollbar {
display: none;
}
#lyricer ul {
list-style-type: none;
padding: 10px;
}
#lyricer ul li {
opacity: 0.9;
color: var(--systemQuaternary);
transform: scale(0.85);
transform-origin: left center;
margin-bottom: 14px;
-webkit-backface-visibility: hidden;
overflow: visible;
transition: all .25s var(--appleEase) !important;
}
#lyricer ul li:hover::after {
content: ' ';
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
transform: scale(1.06);
background: rgba(200, 200, 200, 0.1);
pointer-events: none;
border-radius: 10px;
-webkit-backface-visibility: hidden;
}
#lyricer .lyricer-current-line {
color: var(--systemPrimary);
/* text-shadow: rgb(169, 169, 169) 1.5px 1.5px 1.5px; */
opacity: 1;
font-weight: 700;
transform: scale(1) !important;
transform-origin: left center;
filter: blur(0px) !important;
transition: all .25s var(--appleEase) !important;
}
#lyricer ul li .lyrics-translation {
font-size: 1.3rem;
font-weight: 300;
}
.lyricWaiting {
margin-top: 8px;
display: none;
}
.lyricer-current-line .lyricWaiting {
display: inline-flex;
animation: lyricWaitingLine 6s cubic-bezier(0.42, 0, 0.58, 1) infinite;
}
.lyricWaiting > div {
width: 10px;
height: 10px;
background: var(--systemPrimary);
border-radius: 50%;
margin: 3px;
}
@keyframes lyricWaitingLine {
0% {
opacity: 0;
transform: scale(0.85);
}
50% {
opacity: 1;
transform: scale(1);
}
100% {
opacity: 0;
transform: scale(0.85);
}
}
#unsynced {
font-weight: 600;
padding: 8px;
}
#unsynced > div > p {
margin-top: 10px;
}
#MVLyricsBox {
display: none;
font-size: 1rem;
position: absolute;
top: 80%;
text-align: center;
width: auto;
align-self: center;
left: 50%;
transform: translate(-50%, -50%);
}
.ameModal-Backdrop {
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
z-index: 9999;
background: rgba(0, 0, 0, 0.45);
display: flex;
justify-content: center;
align-items: center;
transition: all .25s;
}
.ameModal {
width: 80%;
height: 80%;
padding: 16px;
border-radius: 10px;
background: var(--modalBGColor);
overflow: overlay;
position: relative;
animation: ameModalIn 0.10s var(--appleEase);
will-change: opacity, transform;
box-shadow: 0 8px 40px var(--dialogShadowColor);
}
/*.ameModal::after {*/
/* content: '';*/
/* width:100%;*/
/* height:100%;*/
/* box-shadow: inset 0 0.35px 0 1px rgba(255,255,255,0.1);*/
/* overflow: hidden;*/
/* position: absolute;*/
/* top:0px;*/
/* left:0px;*/
/* border-radius: inherit;*/
/* z-index:1;*/
/* pointer-events: none;*/
/*}*/
.ameModal-closing {
animation: ameModalOut 0.10s var(--appleEase) forwards;
}
/* @media (prefers-color-scheme: light) {
.ameModal {
background: rgb(255 255 255 / 92%);
}
}
@media (prefers-color-scheme: dark) {
.ameModal {
background: rgb(31 31 31 / 85%);
}
} */
.ameUserMenu {
border-radius: 6px;
border: .5px solid rgba(0, 0, 0, .2);
box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2), 0 8px 40px var(--dialogShadowColor);
animation: unset;
background-color: var(--systemStandardThickMaterialSover);
-webkit-backdrop-filter: blur(60px) saturate(210%);
backdrop-filter: blur(60px) saturate(210%);
font-size: 1.0em;
padding: 0px;
overflow: hidden;
}
@keyframes ameEQIn {
0% {
top: 46px;
right: 142px;
width: 178px;
opacity: 0;
}
100% {
top: 46px;
right: 42px;
width: 306px;
opacity: 1;
}
}
@keyframes ameModalIn {
0% {
transform: scale(0.85);
opacity: 0;
}
100% {
transform: scale(1.0);
opacity: 1;
}
}
@keyframes ameModalOut {
0% {
transform: scale(1.0);
opacity: 1;
}
100% {
transform: scale(0.85);
opacity: 0;
}
}
.ameModal-Close {
position: absolute;
top: 24px;
left: 24px;
z-index: 2;
-webkit-mask-image: url("ameres://icons/webui/close.svg");
-webkit-mask-repeat: no-repeat;
-webkit-mask-position: center;
background-color: white;
opacity: 0.75;
-webkit-mask-size: contain;
height: 18px;
width: 18px;
}
.micaBackground {
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
pointer-events: none;
z-index: -1;
background: var(--user-wallpaper);
background-repeat: cover;
/*background-repeat: repeat;*/
filter: blur(180px) saturate(180%) brightness(0.25);
}
#lyrics_none {
height: 100%;
width: 100%;
text-align: center;
vertical-align: middle;
line-height: 100%;
display: flex;
align-items: center;
justify-content: center;
font-weight: 500;
font-size: 14px;
}
#lyrics_none.lyrics_none_hidden {
display: none;
height: 0;
}
/* Switch Checkbox */
input[type=checkbox][switch] {
width: 38px;
appearance: none;
border-radius: 32px;
height: 24px;
zoom: 1;
top: 0;
cursor: pointer;
left: 0;
position: relative;
transform: scale(1);
background: var(--systemGray);
mix-blend-mode: screen;
padding: 0;
margin: 0;
}
input[type=checkbox][switch]:focus,
input[type=checkbox][switch]:active {
outline: none;
}
input[type=checkbox][switch]:checked {
background: var(--keyColor);
border: 0 solid var(--keyColor);
mix-blend-mode: unset;
}
input[type=checkbox][switch]::before {
background: white;
width: 26px;
height: 26px;
top: -1px;
left: -1px;
position: absolute;
content: ' ';
border-radius: 32px;
transition: .10s left var(--appleEase);
transform: scale(.75);
}
input[type=checkbox][switch]:checked::before {
background: white;
top: -1px;
left: 13px;
transition: .10s left var(--appleEase);
transform: scale(.75);
}
input[type=checkbox][switch]:disabled::before {
opacity: .5;
}
input[type=checkbox][switch]:active::before {
left: 13px;
}
input[type=checkbox][switch]:checked:active::before {
left: -1px;
}
/* End Switch Checkbox */

View file

@ -1,142 +0,0 @@
.web-main-drag {
-webkit-app-region: drag;
width: calc(100vw - var(--web-navigation-width));
height: 28px;
top: 0;
position: fixed;
right: 0;
background-color: var(--playerBackground);
}
@media only screen and (max-width: 485px) {
.web-main-drag {
background-color: var(--webNavigationMobileBg) !important;
width: calc(100% - 50px) !important;
}
}
.web-nav-window-controls {
-webkit-user-select: none;
-webkit-app-region: no-drag;
display: flex;
position: fixed;
right: 0;
top: 0;
z-index: 9904 !important;
}
.web-chrome__auth-no-chrome {
margin-top: 32px !important;
height: 28px !important;
}
@media only screen and (min-width: 485px) {
.web-chrome-window-controls {
height: 55px;
background-color: var(--playerBackground);
backdrop-filter: saturate(50%) blur(20px);
margin-left: auto;
-webkit-app-region: drag;
}
}
@media only screen and (prefers-color-scheme: dark) and (min-width: 485px) {
.web-chrome-window-controls {
box-shadow: 0 1px 0 rgba(0,0,0,.05),0 1px 3px var(--playerDropShadow2),inset 0 -.5px 0 var(--playerInnerShadow);
clip-path: inset(-5px -5px -5px 0px);
}
}
.web-nav-window-controls #minimize {
background-image: var(--gfx-minBtn);
background-color: transparent;
background-position: center;
background-repeat: no-repeat;
-webkit-app-region: no-drag;
width: 45px;
height: 28px;
display: inline-block;
z-index: 9999 !important;
}
.web-nav-window-controls #maximize {
background-image: var(--gfx-maxBtn);
background-color: transparent;
background-position: center;
background-repeat: no-repeat;
-webkit-app-region: no-drag;
width: 45px;
height: 28px;
display: inline-block;
z-index: 9999 !important;
}
.web-nav-window-controls #close {
background-image: var(--gfx-closeBtn);
background-color: transparent;
background-position: center;
background-repeat: no-repeat;
-webkit-app-region: no-drag;
width: 46px;
height: 28px;
display: inline-block;
z-index: 9999 !important;
}
.web-nav-window-controls #close:hover {
background-color: rgb(196, 43, 28);
}
span#maximize:hover,
span#minimize:hover {
background-color: rgba(200, 200, 200, 0.1);
}
span#maximize.maxed {
background-image: var(--gfx-restoreBtn);
}
@media (prefers-color-scheme: light) {
:root {
/* */
--gfx-closeBtn: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAIn2lUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4KPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iWE1QIENvcmUgNS41LjAiPgogPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICAgeG1sbnM6cGhvdG9zaG9wPSJodHRwOi8vbnMuYWRvYmUuY29tL3Bob3Rvc2hvcC8xLjAvIgogICAgeG1sbnM6dGlmZj0iaHR0cDovL25zLmFkb2JlLmNvbS90aWZmLzEuMC8iCiAgICB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iCiAgICB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIKICAgIHhtbG5zOnN0RXZ0PSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VFdmVudCMiCiAgICB4bWxuczpleGlmPSJodHRwOi8vbnMuYWRvYmUuY29tL2V4aWYvMS4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bnN0YW5jZUlEPSJ4bXAuaWlkOjg1ZDBlZGIwLWZkMDAtYjY0Zi05ZWZiLWEyYjQ1ODcwNWE4YSIgc3RFdnQ6d2hlbj0iMjAyMC0wMi0xN1QxMzowMDozMloiIHN0RXZ0OnNvZnR3YXJlQWdlbnQ9IkFkb2JlIFBob3Rvc2hvcCBDQyAyMDE5IChXaW5kb3dzKSIgc3RFdnQ6Y2hhbmdlZD0iLyIvPiA8L3JkZjpTZXE+IDwveG1wTU06SGlzdG9yeT4gPHBob3Rvc2hvcDpUZXh0TGF5ZXJzPiA8cmRmOkJhZz4gPHJkZjpsaSBwaG90b3Nob3A6TGF5ZXJOYW1lPSLupKEiIHBob3Rvc2hvcDpMYXllclRleHQ9Iu6koSIvPiA8L3JkZjpCYWc+IDwvcGhvdG9zaG9wOlRleHRMYXllcnM+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+FwvRXAAAABdJREFUGNNj/P//PwMxgHGIKPw/XDwDAOr1HuzlELLnAAAAAElFTkSuQmCC');
}
}
/* Make Web-Chrome Draggable */
@media only screen and (min-width: 485px) {
.web-chrome {
width: calc(100vw - var(--web-navigation-width) - 136px) !important;
left: var(--web-navigation-width) !important;
-webkit-app-region: drag;
}
.web-chrome-controls-container {
-webkit-app-region: drag;
}
/* add no-drag to child elements */
.web-chrome-playback-controls>* {
-webkit-app-region: no-drag;
}
.web-chrome-controls-container>* {
-webkit-app-region: no-drag;
}
.web-chrome-playback-lcd {
-webkit-app-region: no-drag;
}
}

View file

@ -1,91 +0,0 @@
@media only screen and (min-width: 484px) {
.web-chrome::before {
display: none !important;
}
}
.web-nav-window-controls-outer {
width: 100%;
height: 55px;
-webkit-app-region: no-drag;
background-color: transparent !important;
-webkit-user-select: none;
padding-left: 2px;
padding-top: 2px;
}
.web-nav-window-controls {
-webkit-app-region: drag;
position: relative;
height: 100%;
width: 100%;
display: flex;
padding: 10px 0 0 10px;
}
.web-nav-window-controls #close { /*Red*/
height: 12px;
width: 12px;
background-color: rgb(255, 92, 92);
border-radius: 50%;
display: inline-block;
margin: auto 4px auto 10px;
-webkit-app-region: no-drag;
}
.web-nav-window-controls #minimize { /*Yellow*/
height: 12px;
width: 12px;
background-color: rgb(255, 189, 76);
border-radius: 50%;
display: inline-block;
margin: auto 4px;
-webkit-app-region: no-drag;
}
.web-nav-window-controls #maximize { /*Green*/
height: 12px;
width: 12px;
background-color: rgb(0, 202, 86);
border-radius: 50%;
display: inline-block;
margin: auto 4px;
color: rgb(130, 0, 5);
-webkit-app-region: no-drag;
}
.web-nav-window-controls #close:hover,
.web-nav-window-controls #minimize:hover,
.web-nav-window-controls #maximize:hover {
filter: brightness(40%);
}
@media only screen and (prefers-color-scheme: dark) and (min-width: 485px) {
#web-navigation-search-box {
box-shadow: 0 1px 0 rgba(0,0,0,.05),0 1px 3px var(--playerDropShadow2),inset 0 -.5px 0 var(--playerInnerShadow);
}
}
@media only screen and (max-width: 485px) {
.web-nav-window-controls #maximize {
margin-right: 10px;
right: 0;
}
.web-nav-window-controls {
padding: 0 !important;
height: auto !important;
width: auto !important;
right: 0 !important;
position: fixed !important;
top: auto !important;
margin-top: 10px !important;
}
.web-nav-window-controls-outer {
width: calc(100% - 50px) !important;
height: 44px !important;
position: fixed !important;
right: 0 !important;
-webkit-app-region: drag !important;
}
}

View file

@ -1,123 +0,0 @@
.web-main-drag {
-webkit-app-region: drag;
width: calc(100vw - var(--web-navigation-width));
height: 28px;
top: 0;
position: fixed;
right: 0;
background-color: var(--playerBackground);
}
@media only screen and (max-width: 485px) {
.web-main-drag {
background-color: var(--webNavigationMobileBg) !important;
width: calc(100% - 50px) !important;
}
.web-nav-window-controls {
margin-top: 10px
}
}
.web-nav-window-controls {
-webkit-user-select: none;
-webkit-app-region: no-drag;
display: flex;
position: fixed;
right: 0;
top: 0;
z-index: 9904 !important;
}
.web-chrome__auth-no-chrome {
margin-top: 32px !important;
height: 28px !important;
}
@media only screen and (min-width: 485px) {
.web-chrome-window-controls {
height: 55px;
background-color: var(--playerBackground);
backdrop-filter: saturate(50%) blur(20px);
margin-left: auto;
-webkit-app-region: drag;
}
}
@media only screen and (prefers-color-scheme: dark) and (min-width: 485px) {
.web-chrome-window-controls {
box-shadow: 0 1px 0 rgba(0, 0, 0, .05), 0 1px 3px var(--playerDropShadow2), inset 0 -.5px 0 var(--playerInnerShadow);
clip-path: inset(-5px -5px -5px 0px);
}
}
.web-nav-window-controls #minimize {
background-color: rgb(255, 189, 76);
border-radius: 50%;
background-position: center;
background-repeat: no-repeat;
-webkit-app-region: no-drag;
width: 12px !important;
height: 12px !important;
display: inline-block;
z-index: 9999 !important;
margin: auto 4px;
}
.web-nav-window-controls #maximize {
background-color: rgb(0, 202, 86);
border-radius: 50%;
background-position: center;
background-repeat: no-repeat;
-webkit-app-region: no-drag;
width: 12px !important;
height: 12px !important;
display: inline-block;
z-index: 9999 !important;
margin: auto 4px
}
.web-nav-window-controls #close {
background-color: rgb(255, 92, 92);
border-radius: 50%;
background-position: center;
background-repeat: no-repeat;
-webkit-app-region: no-drag;
width: 12px !important;
height: 12px !important;
display: inline-block;
z-index: 9999 !important;
margin: auto 10px auto 4px;
}
span#close:hover,
span#maximize:hover,
span#minimize:hover {
filter: brightness(40%);
}
/* Make Web-Chrome Draggable */
@media only screen and (min-width: 485px) {
.web-chrome {
width: calc(100vw - var(--web-navigation-width) - 66px) !important;
left: var(--web-navigation-width) !important;
-webkit-app-region: drag;
}
.web-chrome-controls-container {
-webkit-app-region: drag;
}
/* add no-drag to child elements */
.web-chrome-playback-controls > * {
-webkit-app-region: no-drag;
}
.web-chrome-controls-container > * {
-webkit-app-region: no-drag;
}
.web-chrome-playback-lcd {
-webkit-app-region: no-drag;
}
}

View file

@ -1,182 +0,0 @@
:root {
--appleEase: cubic-bezier(0.42, 0, 0.58, 1);
--panel-width: 300px;
}
body {
background: black;
}
.appleSidebar {
width: var(--panelWidth);
animation: 3s lyricsSlideOut forwards;
}
@keyframes lyricsSlideOut {
0% {
transform: translateX(-300px);
}
100% {
transform: translateX(0px);
}
}
#backgroundImage {
width: 100%;
height: 100%;
filter: blur(16px) saturate(180%);
background-repeat: no-repeat;
object-fit: cover;
object-position: center center;
position: absolute;
}
#albumart{
z-index: 2;
border-radius: 6px;
top: 10%;
right: 55%;
width: 36%;
background-repeat: no-repeat;
object-fit: cover;
object-position: center center;
position: absolute;
}
#title{
font-family: "SF Pro", "M PLUS 1p", "Hiragino Sans GB W6", Tahoma, Arial, sans-serif;
color: whitesmoke;
z-index: 2;
top: 10vh + 40vw;
right: 58%;
width: 30%;
font-size: 1.5rem;
position: absolute;
text-align: center;
}
#details{
font-family: "SF Pro", "M PLUS 1p", "Hiragino Sans GB W6", Tahoma, Arial, sans-serif;
color: whitesmoke;
z-index: 2;
top: 10vh + 60vw;
right: 58%;
width: 30%;
font-size: 1.5rem;
position: absolute;
text-align: center;
}
#lyricer {
z-index: 2;
top: 30%;
width: 40%;
font-weight: 700;
font-family: "SF Pro", "M PLUS 1p", "Hiragino Sans GB W6", Tahoma, Arial, sans-serif;
text-shadow: rgb(238, 238, 238) 0 0 1px;
color: rgb(102, 102, 102);
overflow: hidden scroll;
z-index: 2;
position: absolute;
right: 0;
float: right;
margin-right: 5%;
margin-left: 5%;
height: 70%;
--lyricBlur: 1px;
font-size: 4rem;
-webkit-mask-image: -webkit-gradient(linear, left 95%, left bottom, from(rgba(0,0,0,1)), to(rgba(0,0,0,0)));
transition: all 1s var(--appleEase) !important;
}
#lyricer:hover {
--lyricBlur: 0px;
}
#lyricer>ul li:not(.lyricer-current-line) {
filter: blur(var(--lyricBlur));
}
#lyricer::-webkit-scrollbar {
display: none;
}
#lyricer ul {
list-style-type: none;
padding: 10px;
}
#lyricer ul li {
opacity: 0.9;
color: var(--systemQuaternary);
transform: scale(0.85);
transform-origin:left center;
margin-bottom:14px;
-webkit-backface-visibility: hidden;
overflow:visible;
transition: all .25s var(--appleEase) !important;
}
#lyricer ul li:hover::after {
content: ' ';
width: 100%;
height: 100%;
position: absolute;
top:0;
left:0;
transform: scale(1.06);
background: rgb(200 200 200 / 10%);
pointer-events: none;
border-radius: 10px;
-webkit-backface-visibility: hidden;
}
#lyricer .lyricer-current-line {
color: whitesmoke;
/* text-shadow: rgb(169, 169, 169) 1.5px 1.5px 1.5px; */
opacity: 1;
font-weight: 700;
transform: scale(1)!important;
transform-origin:left center;
filter: blur(0px)!important;
transition: all .25s var(--appleEase) !important;
}
#lyricer ul li .lyrics-translation {
font-size: 1.3rem;
font-weight: 300;
}
.lyricWaiting {
margin-top:8px;
display: none;
}
.lyricer-current-line .lyricWaiting {
display: inline-flex;
animation: lyricWaitingLine 6s cubic-bezier(0.42, 0, 0.58, 1) infinite;
}
.lyricWaiting > div {
width: 10px;
height: 10px;
background: var(--systemPrimary);
border-radius: 50%;
margin: 3px;
}
@keyframes lyricWaitingLine {
0% {
opacity: 0;
transform: scale(0.85);
}
50% {
opacity: 1;
transform: scale(1);
}
100% {
opacity: 0;
transform: scale(0.85);
}
}

View file

@ -1,27 +0,0 @@
/* Modern style overlay scrollbars */
::-webkit-scrollbar {
width: 16px;
height: 24px;
}
::-webkit-scrollbar-button {
display: none;
}
::-webkit-scrollbar-track-piece {
background: transparent;
}
::-webkit-scrollbar-thumb {
background: transparent;
border: 6px solid transparent;
box-shadow: inset 0px 0px 10px 10px rgb(200 200 200 / 50%);
border-radius: 16px;
min-height: 64px;
transition: border 1s;
}
::-webkit-scrollbar-thumb:hover {
border: 5px solid transparent;
box-shadow: inset 0px 0px 10px 10px rgb(200 200 200 / 80%);
}

View file

@ -1,53 +0,0 @@
@media only screen and (max-width: 1000px) {
/* Block the Profile Picture */
.web-navigation__auth {
display: none !important;
position: fixed !important;
overflow: hidden !important;
}
}
@media only screen and (max-width: 700px) and (min-width: 485px) {
:root {
--web-navigation-width: 0 !important;
}
/* Hide Entire Sidebar */
#web-navigation-container {
display: none !important;
position: fixed !important;
overflow: hidden !important;
z-index: 9901 !important;
}
.web-chrome {
width: 100vw !important;
}
}
@media only screen and (max-height: 100px) and (max-width: 485px) {
#web-navigation-container, .menuicon {
display: none !important;
position: fixed !important;
overflow: hidden !important;
z-index: 9901 !important;
}
.web-nav-window-controls, .web-nav-window-controls-outer {
display: none !important;
position: fixed !important;
overflow: hidden !important;
}
}
/* Removes Apple Logo */
.web-navigation__header--logo {
display: none !important;
overflow: hidden !important;
}
/* Remove Upsell */
.web-navigation__native-upsell {
display: none !important;
overflow: hidden !important;
}

View file

@ -1,41 +0,0 @@
/* Give the main page a background so its not all transparent */
.page-container {
background-color: var(--pageBG) !important;
}
html body {
background-color: transparent !important;
}
/* Make the search box transparent */
@media only screen and (min-width: 485px) {
#web-navigation-container {
background-color: transparent !important;
}
}
.dt-search-box__input {
opacity: 0.5 !important;
}
/* Set the sidebar to transparent so the transparency affect can do its stuff */
@media (prefers-color-scheme: dark) {
:root {
--transparency: #0f0f0f1A;
}
}
@media (prefers-color-scheme: light) {
:root {
--transparency: #ffffff1A;
}
}
/* Stop Apple from Overriding background colour */
html body {
background-color: transparent !important;
}

View file

@ -1,12 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
<true/>
<key>com.apple.security.cs.disable-library-validation</key>
<true/>
<key>com.apple.security.cs.allow-dyld-environment-variables</key>
<false/>
</dict>
</plist>

View file

@ -1,163 +0,0 @@
const {app, protocol, dialog} = require("electron"),
{join, resolve} = require("path"),
{existsSync, createReadStream, unlink, rmSync} = require("fs"),
Store = require('electron-store');
module.exports = () => {
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Application Configuration Init
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
app.setPath("userData", join(app.getPath("appData"), app.name.replace(/\s/g, ''))) // Set Linux to use .cache instead of .config and remove the space as its annoying
// Set the Theme List based on css files in themes directory
app.userThemesPath = resolve(app.getPath('userData'), 'themes');
app.userPluginsPath = resolve(app.getPath('userData'), 'plugins');
let showIntro = false
const migrationFunctions = {
clearElectronPrefs: () => {
if (existsSync(resolve(app.getPath('userData'), 'preferences.json'))) {
unlink(resolve(app.getPath('userData'), 'preferences.json'), (err) => {
if (err) console.error(err)
})
}
if (existsSync(resolve(app.getPath('userData'), 'Preferences'))) {
unlink(resolve(app.getPath('userData'), 'Preferences'), (err) => {
if (err) console.error(err)
})
}
},
clearCache: () => {
if (existsSync(resolve(app.getPath('userData'), 'Cache'))) {
rmSync(resolve(app.getPath('userData'), 'Cache'), {recursive: true, force: true})
}
},
showDevelopmentMessage: () => {
app.whenReady().then(() => {
dialog.showMessageBox({
title: "Version under Development!",
message: "This version is under development. Expect bugs and issues whilst using the application.",
type: "warning"
})
})
}
}
const storeDefaults = {
general: {
storefront: "",
incognitoMode: false,
playbackNotifications: "minimized",
trayTooltipSongName: true,
startupPage: "browse",
discordRPC: "ame-title",
discordClearActivityOnPause: true,
lastfm: false,
lastfmRemoveFeaturingArtists: true,
lastfmNowPlaying: true,
analyticsEnabled: true,
lastfmScrobbleDelay: 30
},
visual: {
theme: "default",
frameType: "",
transparencyEffect: "",
transparencyTheme: "appearance-based",
transparencyDisableBlur: true,
transparencyMaximumRefreshRate: "",
streamerMode: false,
removeUpsell: true,
removeAppleLogo: true,
removeFooter: true,
removeScrollbars: true,
useOperatingSystemAccent: false,
scaling: 1,
yton: false,
mxmon: false,
mxmlanguage: "en"
},
audio: {
audioQuality: "auto",
seamlessAudioTransitions: false,
castingBitDepth: '16',
enableDLNA: false,
},
window: {
appStartupBehavior: "",
closeButtonMinimize: true,
alwaysOnTop: false
},
advanced: {
forceApplicationMode: "system",
hardwareAcceleration: true,
verboseLogging: false,
autoUpdaterBetaBuilds: false,
useBetaSite: true,
preventMediaKeyHijacking: false,
devToolsOnStartup: false,
allowMultipleInstances: false
},
tokens: {
lastfm: ""
}
}
const storeMigrations = {
'>=3.0.0': store => {
showIntro = true
},
'<=3.0.0': store => {
migrationFunctions.clearElectronPrefs()
migrationFunctions.clearCache()
migrationFunctions.showDevelopmentMessage()
}
}
app.cfg = new Store({
defaults: storeDefaults,
migrations: storeMigrations
})
app.cfg.watch = true;
app.isQuiting = false;
app.whenReady().then(() => {
protocol.registerFileProtocol('themes', (request, callback) => {
const url = request.url.substr(7)
callback({
path: join(app.userThemesPath, url.toLowerCase())
})
})
protocol.registerFileProtocol('ameres', (request, callback) => {
const url = request.url.substr(7)
callback(createReadStream(join(join(__dirname, '../'), url.toLowerCase())))
})
protocol.registerFileProtocol('plugin', (request, callback) => {
const url = request.url.substr(7)
callback({
path: join(app.userPluginsPath, url.toLowerCase())
})
})
})
const handlersFuncs = require('./handler'),
initFuncs = require('./init'),
loadFuncs = require('./load'),
utilsFuncs = require('./utils'),
winFuncs = require('./win'),
discordFuncs = require('./media/discordrpc'),
lastfmFuncs = require('./media/lastfm'),
mprisFuncs = require('./media/mpris');
return {
handler: handlersFuncs,
init: initFuncs,
load: loadFuncs,
utils: utilsFuncs,
win: winFuncs,
discord: discordFuncs,
lastfm: lastfmFuncs,
mpris: mprisFuncs,
wsapi: require('./wsapi'),
showOOBE: showIntro
};
}

File diff suppressed because it is too large Load diff

View file

@ -1,234 +0,0 @@
const {app, nativeTheme, nativeImage, Tray} = require("electron"),
{join, resolve} = require("path"),
os = require("os"),
{existsSync, readdirSync} = require("fs"),
regedit = require("regedit"),
{initAnalytics} = require('./utils');
initAnalytics();
const init = {
BaseInit: () => {
const censoredConfig = app.cfg.store;
censoredConfig.tokens = {};
console.log('---------------------------------------------------------------------')
console.log(`${app.getName()} has started.`);
console.log(`Version: ${app.getVersion()} | Electron Version: ${process.versions.electron}`)
console.log(`Type: ${os.type} | Release: ${os.release()} ${app.ame.utils.fetchOperatingSystem() ? `(${app.ame.utils.fetchOperatingSystem()})` : ""} | Platform: ${os.platform()}`)
console.log(`User Data Path: '${app.getPath('userData')}'`)
console.log(`Current Configuration: ${JSON.stringify(censoredConfig)}`)
console.log("---------------------------------------------------------------------")
if (app.cfg.get('general.analyticsEnabled') && app.isPackaged) console.log('[Sentry] Sentry logging is enabled, any errors you receive will be presented to the development team to fix for the next release.')
console.verbose('[InitializeBase] Started.');
// Disable CORS
app.commandLine.appendSwitch('disable-features', 'OutOfBlinkCors')
app.commandLine.appendSwitch('high-dpi-support', 'true')
if (process.platform === "win32") {
app.commandLine.appendSwitch('force-device-scale-factor', '1')
}
if (app.cfg.get('advanced.verboseLogging')) {
app.commandLine.appendSwitch('--enable-logging');
app.commandLine.appendSwitch('--log-file', join(app.getPath('userData'), 'logs', 'renderer.log'));
console.verbose(`[InitializeBase] Renderer logging setup at ${join(app.getPath('userData'), 'logs', 'renderer.log')}`);
}
// Media Key Hijacking
if (app.cfg.get('advanced.preventMediaKeyHijacking')) {
console.log("[Apple-Music-Electron] Hardware Media Key Handling disabled.")
app.commandLine.appendSwitch('disable-features', 'HardwareMediaKeyHandling,MediaSessionService');
}
// GPU Hardware Acceleration
if (!app.cfg.get('advanced.hardwareAcceleration')) {
app.commandLine.appendSwitch('disable-gpu')
}
// Registry
if (process.platform === "win32") {
regedit.setExternalVBSLocation("resources/regedit/vbs")
}
// Sets the ModelId (For windows notifications)
if (process.platform === "win32") app.setAppUserModelId(app.getName());
// Disable the Media Session to allow MPRIS to be the primary service
if (process.platform === "linux") app.commandLine.appendSwitch('disable-features', 'MediaSessionService');
// Assign Default Variables
app.isQuiting = (app.isQuiting ? app.isQuiting : false);
app.win = '';
app.ipc = {
existingNotification: false
};
if (app.cfg.get('general.incognitoMode')) {
console.log("[Incognito] Incognito Mode enabled. DiscordRPC and LastFM updates are ignored.")
}
/* Protocols for Link Handling */
if (process.defaultApp) {
if (process.argv.length >= 2) {
app.setAsDefaultProtocolClient('ame', process.execPath, [resolve(process.argv[1])])
app.setAsDefaultProtocolClient('itms', process.execPath, [resolve(process.argv[1])])
app.setAsDefaultProtocolClient('itmss', process.execPath, [resolve(process.argv[1])])
app.setAsDefaultProtocolClient('musics', process.execPath, [resolve(process.argv[1])])
app.setAsDefaultProtocolClient('music', process.execPath, [resolve(process.argv[1])])
}
} else {
app.setAsDefaultProtocolClient('ame') // Custom AME Protocol
app.setAsDefaultProtocolClient('itms') // iTunes HTTP Protocol
app.setAsDefaultProtocolClient('itmss') // iTunes HTTPS Protocol
app.setAsDefaultProtocolClient('musics') // macOS Client Protocol
app.setAsDefaultProtocolClient('music') // macOS Client Protocol
}
app.on('open-url', (event, url) => {
event.preventDefault()
if (url.includes('ame://') || url.includes('itms://') || url.includes('itmss://') || url.includes('musics://') || url.includes('music://')) {
app.ame.handler.LinkHandler(url)
}
})
// Running the Application on Login
if (app.cfg.get('window.appStartupBehavior')) {
app.setLoginItemSettings({
openAtLogin: true,
args: [
'--process-start-args', `${app.cfg.get('window.appStartupBehavior') === 'hidden' ? "--hidden" : (app.cfg.get('window.appStartupBehavior') === 'minimized' ? "--minimized" : "")}`
]
})
}
// Set Max Listener
require('events').EventEmitter.defaultMaxListeners = Infinity;
},
LoggingInit: () => {
app.log = require("electron-log");
if (app.commandLine.hasSwitch('verbose')) {
app.verboseLaunched = true
}
app.log.transports.file.resolvePath = (vars) => {
return join(app.getPath('userData'), 'logs', vars.fileName);
}
Object.assign(console, app.log.functions);
console.verbose = () => {
};
if (app.cfg.get('advanced.verboseLogging') || app.verboseLaunched) {
console.verbose = app.log.debug
} else {
console.verbose = function (_data) {
return false
};
}
},
ThemeInstallation: () => {
const themesPath = join(app.getPath('userData'), "themes");
// Check if the themes folder exists and check permissions
if (existsSync(join(themesPath, 'README.md'))) {
console.verbose('[ThemeInstallation] Themes Directory Exists. Running Permission Check.')
app.ame.utils.permissionsCheck(themesPath, 'README.md')
} else {
app.ame.utils.updateThemes().catch(err => console.error(err))
}
// Save all the file names to array and log it
if (existsSync(themesPath)) {
console.log(`[InitializeTheme] Files found in Themes Directory: [${readdirSync(themesPath).join(', ')}]`)
}
// Set the default theme
if (app.cfg.get('advanced.forceApplicationMode')) {
nativeTheme.themeSource = app.cfg.get('advanced.forceApplicationMode')
}
},
PluginInstallation: () => {
if (!existsSync(resolve(app.getPath("userData"), "plugins"))) {
return;
}
// Check if the plugins folder exists and check permissions
app.pluginsEnabled = true;
console.log("[PluginInstallation][existsSync] Plugins folder exists!");
app.ame.utils.permissionsCheck(app.userPluginsPath, '/');
app.ame.utils.fetchPluginsListing();
// Save all the file names to array and log it
console.log(`[PluginInstallation] Files found in Plugins Directory: [${readdirSync(resolve(app.getPath("userData"), "plugins")).join(', ')}]`);
},
AppReady: () => {
console.verbose('[ApplicationReady] Started.');
app.pluginsEnabled = false;
// Run the Functions
init.ThemeInstallation()
init.PluginInstallation()
init.TrayInit()
app.ame.mpris.connect(); // M.P.R.I.S
app.ame.lastfm.authenticate(); // LastFM
app.ame.discord.connect(app.cfg.get('general.discordRPC') === 'ame-title' ? '911790844204437504' : '886578863147192350'); // Discord
app.isAuthorized = false;
app.isMiniplayerActive = false;
app.injectedCSS = {}
app.media = {status: false, playParams: {id: 'no-id-found'}};
/** wsapi */
// app.ame.wsapi.inAppUI()
/** wsapi */
},
TrayInit: () => {
console.verbose('[InitializeTray] Started.');
const winTray = nativeImage.createFromPath(join(__dirname, `../icons/icon.ico`)).resize({
width: 32,
height: 32
})
const macTray = nativeImage.createFromPath(join(__dirname, `../icons/icon.png`)).resize({
width: 20,
height: 20
})
const linuxTray = nativeImage.createFromPath(join(__dirname, `../icons/icon.png`)).resize({
width: 32,
height: 32
})
let trayIcon;
if (process.platform === "win32") {
trayIcon = winTray
} else if (process.platform === "linux") {
trayIcon = linuxTray
} else if (process.platform === "darwin") {
trayIcon = macTray
}
app.tray = new Tray(trayIcon)
app.tray.setToolTip(app.getName());
app.ame.win.SetContextMenu(true);
app.tray.on('double-click', () => {
if (typeof app.win.show === 'function') {
if (app.win.isVisible()) {
app.win.focus()
} else {
app.win.show()
}
}
})
}
}
module.exports = init

View file

@ -1,238 +0,0 @@
const {join, resolve} = require("path"),
{app, ipcMain, systemPreferences} = require("electron"),
{readFile, constants, chmodSync, existsSync, watch} = require("fs"),
{initAnalytics} = require('./utils');
initAnalytics();
module.exports = {
LoadCSS: function (path, theme, important) {
const fileName = path
if (theme) {
path = join(app.userThemesPath, path.toLowerCase());
} else {
path = join(join(__dirname, '../css/'), path)
}
// Check that the file exists
if (!existsSync(path)) {
console.warn(`[LoadCSS] ${path} not found.`)
return
}
// Remove previous inject (If there is one)
if (app.injectedCSS[path]) {
app.win.webContents.removeInsertedCSS(app.injectedCSS[fileName]).then(r => { if (r) console.error(r); });
}
// Get the CSS to inject
readFile(path, "utf-8", function (error, data) {
if (error) {
console.error(`[LoadCSS] Error while injecting: '${path}' - ${error}`)
try {
chmodSync(path, constants.S_IRUSR | constants.S_IWUSR);
} catch (err) {
console.error(`[LoadCSS] ${err}`)
}
} else {
let formattedData = data.replace(/\s{2,10}/g, ' ').trim();
app.win.webContents.insertCSS(formattedData, {cssOrigin: (important ? 'user' : 'author')}).then((key) => {
console.verbose(`[${theme ? 'LoadTheme' : 'LoadCSS'}] '${fileName}' successfully injected.`)
app.injectedCSS[fileName] = key
});
}
});
},
LoadJS: function (path, formatting = true) {
const fileName = path;
path = join(join(__dirname, '../js/'), path)
readFile(path, "utf-8", function (error, data) {
if (!error) {
try {
let formattedData = data
if (formatting) {
formattedData = data.replace(/\s{2,10}/g, ' ').trim();
}
app.win.webContents.executeJavaScript(formattedData).then(() => {
console.verbose(`[LoadJSFile] '${fileName}' successfully injected.`)
});
} catch (err) {
console.error(`[LoadJSFile] Error while injecting: '${fileName}' - Error: ${err}`)
}
} else {
console.error(`[LoadJSFile] Error while reading: '${fileName}' - Error: ${error}`)
}
});
},
LoadWebsite: function (win) {
if (!win) return;
app.storefront = app.cfg.get('general.storefront');
const urlBase = app.cfg.get('advanced.useBetaSite') ? 'https://beta.music.apple.com' : 'https://music.apple.com/' + app.cfg.get('general.storefront'),
urlFallback = `https://music.apple.com/`;
ipcMain.once('userAuthorized', (e, args) => {
app.isAuthorized = true
console.log(`[LoadWebsite] User Authenticated. Setting page to: ${args}`)
win.webContents.clearHistory()
})
win.loadURL(urlBase).then(() => {
app.ame.load.LoadJS('checkAuth.js')
}).catch((err) => {
win.loadURL(urlFallback).then(() => console.error(`[LoadWebsite] '${urlBase}' was unavailable, falling back to '${urlFallback}' | ${err}`))
})
},
LoadFiles: function () {
app.ame.load.LoadJS('settingsPage.js');
if (app.cfg.get('visual.removeAppleLogo')) {
app.win.webContents.insertCSS(`
@media only screen and (max-width: 483px) {
.web-navigation__nav-list {
margin-top: 50px;
}
}
}
`).catch((e) => console.error(e));
}
if (app.cfg.get('visual.useOperatingSystemAccent') && (process.platform === "win32" || process.platform === "darwin")) {
if (systemPreferences.getAccentColor()) {
const accent = '#' + systemPreferences.getAccentColor().slice(0, -2)
app.win.webContents.insertCSS(`
:root {
--keyColor: ${accent} !important;
--systemAccentBG: ${accent} !important;
--systemAccentBG-pressed: rgba(${app.ame.utils.hexToRgb(accent).r}, ${app.ame.utils.hexToRgb(accent).g}, ${app.ame.utils.hexToRgb(accent).b}, 0.75) !important;
--keyColor-rgb: ${app.ame.utils.hexToRgb(accent).r} ${app.ame.utils.hexToRgb(accent).g} ${app.ame.utils.hexToRgb(accent).b} !important;
}`).then((key) => {
app.injectedCSS['useOperatingSystemAccent'] = key
})
}
} else {
app.ame.win.removeInsertedCSS('useOperatingSystemAccent')
}
/* Load Window Frame */
if (app.cfg.get('visual.frameType') === 'mac') {
app.ame.load.LoadJS('frame_macOS.js')
} else if ((app.cfg.get('visual.frameType') === 'mac-right')) {
app.ame.load.LoadJS('frame_Windows.js')
} else if (process.platform === 'darwin' && !app.cfg.get('visual.frameType')) {
app.ame.load.LoadJS('frame_macOS.js')
} else if (process.platform === 'win32' && !app.cfg.get('visual.frameType')) {
app.ame.load.LoadJS('frame_Windows.js')
if (app.win.isMaximized()) {
app.win.webContents.executeJavaScript(`if (document.querySelector("#maximize")) { document.querySelector("#maximize").classList.add("maxed"); }`).catch((e) => console.error(e));
}
}
const BackButtonChecks = (url) => {
if (!app.win.webContents.canGoBack()) return false
const backButtonBlacklist = [`*music.apple.com/*/listen-now*`, `*music.apple.com/*/browse*`, `*music.apple.com/*/radio*`, `*music.apple.com/*/search*`, `*music.apple.com/library/recently-added?l=*`, `*music.apple.com/library/albums?l=*`, `*music.apple.com/library/songs?l=*`, `*music.apple.com/library/made-for-you?l=*`, `*music.apple.com/library/recently-added`, `*music.apple.com/library/albums`, `*music.apple.com/library/made-for-you`, `*music.apple.com/library/songs*`, `*music.apple.com/library/artists/*`, `*music.apple.com/library/playlist/*`];
let blacklistPassed = true
backButtonBlacklist.forEach((item) => {
if (!blacklistPassed) return;
if (app.ame.utils.matchRuleShort(url, item) || url === item) {
blacklistPassed = false
}
});
return blacklistPassed
}
/* Load Back Button */
if (BackButtonChecks(app.win.webContents.getURL())) {
app.ame.load.LoadJS('backButton.js')
app.win.webContents.executeJavaScript(`document.body.setAttribute('back-button', 1)`)
} else { /* Removes the button if the check failed. */
app.win.webContents.executeJavaScript(`if (document.querySelector('#backButtonBar')) { document.getElementById('backButtonBar').remove() };`).catch((e) => console.error(e));
app.win.webContents.executeJavaScript(`document.body.removeAttribute('back-button')`)
}
/* Load the Startup JavaScript Function */
app.win.webContents.executeJavaScript('if (AMJavaScript) { AMJavaScript.LoadCustom(); }').catch((e) => console.error(e));
},
LoadOneTimeFiles: function () {
// Inject the custom stylesheet
app.ame.load.LoadCSS('custom-stylesheet.css')
app.ame.load.LoadCSS('ameframework.css')
// Inject Plugin Interaction
if (app.pluginsEnabled) {
app.ame.load.LoadJS('pluginSystem.js', false)
}
// Load this first so it doesn't stuck
app.ame.load.LoadJS('OpusMediaRecorder.umd.js')
app.ame.load.LoadJS('encoderWorker.umd.js')
// Lyrics
app.ame.load.LoadJS('lyrics.js')
// Vue Test
app.ame.load.LoadJS('vue.js')
app.ame.load.LoadJS('utils.js', false)
app.ame.load.LoadJS('tests.js', false)
// wsapi
app.ame.load.LoadJS('WSAPI_Interop.js', false)
// wsapi
// Bulk JavaScript Functions
app.ame.load.LoadJS('custom.js')
// Audio Manuipulation Stuff
app.ame.load.LoadJS('eq.js')
// Window Frames
if (app.cfg.get('visual.frameType') === 'mac') {
app.ame.load.LoadCSS('frame_macOS_emulation.css')
} else if (app.cfg.get('visual.frameType') === 'mac-right') {
app.ame.load.LoadCSS('frame_macOS_emulation_right.css')
} else if (process.platform === 'win32' && !app.cfg.get('visual.frameType')) {
app.ame.load.LoadCSS('frame_Windows.css')
}
// Set the settings variables if needed
if (app.cfg.get('visual.frameType') === 'mac' || app.cfg.get('visual.frameType') === 'mac-right') {
app.cfg.set('visual.removeUpsell', true);
app.cfg.set('visual.removeAppleLogo', true);
}
// Streamer Mode
if (app.cfg.get('visual.streamerMode')) {
app.ame.load.LoadCSS('streamerMode.css')
}
/* Remove the Scrollbar */
if (app.cfg.get('visual.removeScrollbars')) {
app.win.webContents.insertCSS('::-webkit-scrollbar { display: none; }').then()
} else {
app.ame.load.LoadCSS('macosScrollbar.css')
}
/* Inject the MusicKitInterop file */
app.win.webContents.executeJavaScript('MusicKitInterop.init()').catch((e) => console.error(e));
/* Watches for changes to a theme */
if (app.watcher) {
app.watcher.close();
console.verbose('[Watcher] Removed old watcher.')
}
if (existsSync(resolve(app.getPath('userData'), 'themes', `${app.cfg.get('visual.theme')}.css`)) && app.cfg.get('visual.theme') !== "default" && app.cfg.get('visual.theme')) {
app.watcher = watch(resolve(app.getPath('userData'), 'themes', `${app.cfg.get('visual.theme')}.css`), (event, fileName) => {
if (event === "change" && fileName === `${app.cfg.get('visual.theme')}.css`) {
app.win.webContents.executeJavaScript(`AMStyling.loadTheme("${app.cfg.get('visual.theme')}", true);`).catch((err) => console.error(err));
}
});
console.verbose(`[Watcher] Watching for changes: 'themes/${app.cfg.get('visual.theme')}.css'`)
}
}
}

View file

@ -1,121 +0,0 @@
const {app} = require('electron'),
DiscordRPC = require('discord-rpc'),
{initAnalytics} = require('../utils');
initAnalytics();
module.exports = {
connect: function (clientId) {
app.discord = {isConnected: false};
if (!app.cfg.get('general.discordRPC')) return;
DiscordRPC.register(clientId) // Apparently needed for ask to join, join, spectate etc.
const client = new DiscordRPC.Client({ transport: "ipc" });
app.discord = Object.assign(client,{error: false, activityCache: null, isConnected: false});
// Login to Discord
app.discord.login({ clientId })
.then(() => {
app.discord.isConnected = true;
})
.catch((e) => console.error(`[DiscordRPC][connect] ${e}`));
app.discord.on('ready', () => {
console.log(`[DiscordRPC][connect] Successfully Connected to Discord. Authed for user: ${client.user.username} (${client.user.id})`);
if (app.discord.activityCache) {
client.setActivity(app.discord.activityCache).catch((e) => console.error(e));
app.discord.activityCache = null;
}
})
// Handles Errors
app.discord.on('error', err => {
console.error(`[DiscordRPC] ${err}`);
this.disconnect()
app.discord.isConnected = false;
});
},
disconnect: function () {
if (!app.cfg.get('general.discordRPC') || !app.discord.isConnected) return;
try {
app.discord.destroy().then(() => {
app.discord.isConnected = false;
console.verbose('[DiscordRPC][disconnect] Disconnected from discord.')
}).catch((e) => console.error(`[DiscordRPC][disconnect] ${e}`));
} catch (err) {
console.error(err)
}
},
updateActivity: function (attributes) {
if (!app.cfg.get('general.discordRPC') || app.cfg.get('general.incognitoMode')) return;
if (!app.discord.isConnected) {
this.connect()
}
if (!app.discord.isConnected) return;
console.verbose('[DiscordRPC][updateActivity] Updating Discord Activity.')
const listenURL = `https://applemusicelectron.com/p?id=${attributes.playParams.id}`
let ActivityObject = {
details: attributes.name,
state: `by ${attributes.artistName}`,
startTimestamp: attributes.startTime,
endTimestamp: attributes.endTime,
largeImageKey: ((app.cfg.get('general.discordRPC') === 'am-title') ? 'apple' : 'cider'),
largeImageText: attributes.albumName,
smallImageKey: (attributes.status ? 'play' : 'pause'),
smallImageText: (attributes.status ? 'Playing': 'Paused'),
instance: true,
buttons: [
{label: "Listen on Cider", url: listenURL},
]
};
console.verbose(`[LinkHandler] Listening URL has been set to: ${listenURL}`);
if (app.cfg.get('general.discordClearActivityOnPause')) {
delete ActivityObject.smallImageKey
delete ActivityObject.smallImageText
}
// Check all the values work
if (!((new Date(attributes.endTime)).getTime() > 0)) {
delete ActivityObject.startTimestamp
delete ActivityObject.endTimestamp
}
if (!attributes.artistName) {
delete ActivityObject.state
}
if (!ActivityObject.largeImageText || ActivityObject.largeImageText.length < 2) {
delete ActivityObject.largeImageText
}
// Clear if if needed
if (!attributes.status) {
if (app.cfg.get('general.discordClearActivityOnPause')) {
app.discord.clearActivity().catch((e) => console.error(`[DiscordRPC][clearActivity] ${e}`));
ActivityObject = null
} else {
delete ActivityObject.startTimestamp
delete ActivityObject.endTimestamp
ActivityObject.smallImageKey = 'pause'
ActivityObject.smallImageText = 'Paused'
}
}
if (ActivityObject) {
try {
console.verbose(`[DiscordRPC][setActivity] Setting activity to ${JSON.stringify(ActivityObject)}`);
app.discord.setActivity(ActivityObject)
} catch (err) {
console.error(`[DiscordRPC][setActivity] ${err}`)
}
}
},
}

View file

@ -1,155 +0,0 @@
const {app, Notification} = require('electron'),
fs = require('fs'),
{resolve} = require('path'),
sessionPath = resolve(app.getPath('userData'), 'session.json'),
apiCredentials = require('../../lfmApiCredentials.json'),
LastfmAPI = require('lastfmapi'),
{initAnalytics} = require('../utils');
initAnalytics();
const lfm = {
authenticateFromFile: function () {
let sessionData = require(sessionPath)
console.log("[LastFM][authenticateFromFile] Logging in with Session Info.")
app.lastfm.setSessionCredentials(sessionData.name, sessionData.key)
console.log("[LastFM][authenticateFromFile] Logged in.")
},
authenticate: function () {
if (app.cfg.get('tokens.lastfm')) {
app.cfg.set('general.lastfm', true);
}
if (!app.cfg.get('general.lastfm') || !app.cfg.get('tokens.lastfm')) {
app.cfg.set('general.lastfm', false);
return
}
const lfmAPI = new LastfmAPI({
'api_key': apiCredentials.key,
'secret': apiCredentials.secret
});
app.lastfm = Object.assign(lfmAPI, {cachedAttributes: false, cachedNowPlayingAttributes: false});
fs.stat(sessionPath, function (err) {
if (err) {
console.error("[LastFM][Session] Session file couldn't be opened or doesn't exist,", err)
console.log("[LastFM][Auth] Beginning authentication from configuration")
app.lastfm.authenticate(app.cfg.get('tokens.lastfm'), function (err, session) {
if (err) {
throw err;
}
console.log("[LastFM] Successfully obtained LastFM session info,", session); // {"name": "LASTFM_USERNAME", "key": "THE_USER_SESSION_KEY"}
console.log("[LastFM] Saving session info to disk.")
let tempData = JSON.stringify(session)
fs.writeFile(sessionPath, tempData, (err) => {
if (err)
console.log("[LastFM][fs]", err)
else {
console.log("[LastFM][fs] File was written successfully.")
lfm.authenticateFromFile()
new Notification({
title: app.getName(),
body: "Successfully logged into LastFM using Authentication Key."
}).show()
}
})
});
} else {
lfm.authenticateFromFile()
}
})
},
scrobbleSong: async function (attributes) {
await new Promise(resolve => setTimeout(resolve, app.cfg.get('general.lastfmScrobbleDelay') * 1000));
const currentAttributes = app.media;
if (!app.lastfm || app.lastfm.cachedAttributes === attributes || app.cfg.get('general.incognitoMode')) {
return
}
if (app.lastfm.cachedAttributes) {
if (app.lastfm.cachedAttributes.playParams.id === attributes.playParams.id) return;
}
if (currentAttributes.status && currentAttributes === attributes) {
if (fs.existsSync(sessionPath)) {
// Scrobble playing song.
if (attributes.status === true) {
app.lastfm.track.scrobble({
'artist': lfm.filterArtistName(attributes.artistName),
'track': attributes.name,
'album': attributes.albumName,
'albumArtist': this.filterArtistName(attributes.artistName),
'timestamp': new Date().getTime() / 1000
}, function (err, scrobbled) {
if (err) {
return console.error('[LastFM] An error occurred while scrobbling', err);
}
console.verbose('[LastFM] Successfully scrobbled: ', scrobbled);
});
app.lastfm.cachedAttributes = attributes
}
} else {
this.authenticate();
}
} else {
return console.verbose('[LastFM] Did not add ', attributes.name , '-' , lfm.filterArtistName(attributes.artistName), 'because now playing a other song.');
}
},
filterArtistName: function (artist) {
if (!app.cfg.get('general.lastfmRemoveFeaturingArtists')) return artist;
artist = artist.split(' ');
if (artist.includes('&')) {
artist.length = artist.indexOf('&');
}
if (artist.includes('and')) {
artist.length = artist.indexOf('and');
}
artist = artist.join(' ');
if (artist.includes(',')) {
artist = artist.split(',')
artist = artist[0]
}
return artist.charAt(0).toUpperCase() + artist.slice(1);
},
updateNowPlayingSong: function (attributes) {
if (!app.lastfm ||app.lastfm.cachedNowPlayingAttributes === attributes || app.cfg.get('general.incognitoMode') || !app.cfg.get('general.lastfmNowPlaying')) {
return
}
if (app.lastfm.cachedNowPlayingAttributes) {
if (app.lastfm.cachedNowPlayingAttributes.playParams.id === attributes.playParams.id) return;
}
if (fs.existsSync(sessionPath)) {
// update Now Playing
if (attributes.status === true) {
app.lastfm.track.updateNowPlaying({
'artist': lfm.filterArtistName(attributes.artistName),
'track': attributes.name,
'album': attributes.albumName,
'albumArtist': this.filterArtistName(attributes.artistName)
}, function (err, nowPlaying) {
if (err) {
return console.error('[LastFM] An error occurred while updating nowPlayingSong', err);
}
console.verbose('[LastFM] Successfully updated nowPlayingSong', nowPlaying);
});
app.lastfm.cachedNowPlayingAttributes = attributes
}
} else {
this.authenticate()
}
}
}
module.exports = lfm;

View file

@ -1,119 +0,0 @@
const {app} = require('electron'),
Player = require('mpris-service'),
{initAnalytics} = require('../utils');
initAnalytics();
// Remember to use playerctl when debugging this.
// I'm just putting this here as I keep forgetting the command.
module.exports = {
connect: function () {
if (process.platform !== "linux") {
app.mpris = {active: false}
return;
}
console.log('[MPRIS][connect] Initializing Connection.')
try {
app.mpris = Player({
name: 'AppleMusic',
identity: 'Apple Music',
supportedUriSchemes: [],
supportedMimeTypes: [],
supportedInterfaces: ['player']
});
app.mpris = Object.assign(app.mpris, { active: false, canQuit: true, canControl: true, canPause: true, canPlay: true, canGoNext: true })
} catch (err) {
app.mpris.active = false
console.error(`[MPRIS][connect] ${err}`)
return
}
let pos_atr = {durationInMillis: 0};
app.mpris.getPosition = function () {
const durationInMicro = pos_atr.durationInMillis * 1000;
const percentage = parseFloat(0) || 0;
return durationInMicro * percentage;
}
app.mpris.active = true
this.clearActivity()
this.stateHandler()
},
stateHandler: function () {
app.mpris.on('playpause', async () => {
app.win.webContents.executeJavaScript('MusicKitInterop.pausePlay()').catch(err => console.error(err))
});
app.mpris.on('play', async () => {
app.win.webContents.executeJavaScript('MusicKitInterop.pausePlay()').catch(err => console.error(err))
});
app.mpris.on('pause', async () => {
app.win.webContents.executeJavaScript('MusicKitInterop.pausePlay()').catch(err => console.error(err))
});
app.mpris.on('next', async () => {
app.win.webContents.executeJavaScript('MusicKitInterop.nextTrack()').catch(err => console.error(err))
});
app.mpris.on('previous', async () => {
app.win.webContents.executeJavaScript('MusicKitInterop.previousTrack()').catch(err => console.error(err))
});
},
updateActivity: function (attributes) {
if (!app.mpris.active) return;
console.verbose('[MPRIS][updateActivity] Updating Song Activity.')
const MetaData = {
'mpris:trackid': app.mpris.objectPath(`track/${attributes.playParams.id.replace(/[.]+/g, "")}`),
'mpris:length': attributes.durationInMillis * 1000, // In microseconds
'mpris:artUrl': (attributes.artwork.url.replace('/{w}x{h}bb', '/512x512bb')).replace('/2000x2000bb', '/35x35bb'),
'xesam:title': `${attributes.name}`,
'xesam:album': `${attributes.albumName}`,
'xesam:artist': [`${attributes.artistName}`,],
'xesam:genre': attributes.genreNames
}
if (app.mpris.metadata["mpris:trackid"] === MetaData["mpris:trackid"]) {
return
}
app.mpris.metadata = MetaData
},
updateState: function (attributes) {
if (!app.mpris.active) return;
console.verbose('[MPRIS][updateState] Updating Song Playback State.')
function setPlaybackIfNeeded(status) {
if (app.mpris.playbackStatus === status) {
return
}
app.mpris.playbackStatus = status;
}
switch (attributes.status) {
case true: // Playing
setPlaybackIfNeeded('Playing');
break;
case false: // Paused
setPlaybackIfNeeded('Paused');
break;
default: // Stopped
setPlaybackIfNeeded('Stopped');
break;
}
},
clearActivity: function () {
if (!app.mpris.active) return;
app.mpris.metadata = {'mpris:trackid': '/org/mpris/MediaPlayer2/TrackList/NoTrack'}
app.mpris.playbackStatus = 'Stopped';
},
}

View file

@ -1,30 +0,0 @@
const {
BrowserWindow
} = require('electron');
const SplashScreen = {
win: null,
show: function () {
this.win = new BrowserWindow({
width: 300,
height: 300,
resizable: false,
show: true,
center: true,
transparent: true,
frame: false,
alwaysOnTop: true,
// skipTaskbar: true,
webPreferences: {
nodeIntegration: true
}
})
this.win.show()
this.win.loadFile('./resources/splash/index_old.html')
this.win.on("closed", () => {
this.win = null
})
}
}
module.exports = SplashScreen

View file

@ -1,395 +0,0 @@
const {app, nativeImage, nativeTheme, Notification, dialog} = require("electron"),
{existsSync, readFileSync, readdirSync, constants, access, writeFileSync, copyFileSync} = require("fs"),
{readdir, mkdir} = require("fs/promises"),
{join, resolve} = require("path"),
{autoUpdater} = require("electron-updater"),
os = require("os"),
rimraf = require("rimraf"),
chmod = require("chmodr"),
clone = require("git-clone/promise"),
trayIconDir = (nativeTheme.shouldUseDarkColors ? join(__dirname, `../icons/media/light/`) : join(__dirname, `../icons/media/dark/`)),
ElectronSentry = require("@sentry/electron");
const Utils = {
/* hexToRgb - Converts hex codes to rgb */
hexToRgb: (hex) => {
const result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
return result ? {
r: parseInt(result[1], 16),
g: parseInt(result[2], 16),
b: parseInt(result[3], 16)
} : null;
},
/* matchRuleShort - Used for wildcards */
matchRuleShort: (str, rule) => {
var escapeRegex = (str) => str.replace(/([.*+?^=!:${}()|\[\]\/\\])/g, "\\$1");
return new RegExp("^" + rule.split("*").map(escapeRegex).join(".*") + "$").test(str);
},
/* isVibrancySupported - Checks if the operating system support electron-acrylic-window (Windows 10 or greater) */
isVibrancySupported: () => {
return (process.platform === 'win32' && parseInt(os.release().split('.')[0]) >= 10)
},
/* isAcrylicSupported - Checks if the operating system supports the acrylic transparency affect (Windows RS3 (Redstone 3) 1709 or Greater) */
isAcrylicSupported: () => {
return (process.platform === 'win32' && parseInt(os.release().replace(/\./g, "").replace(',', '.')) >= 10016299)
},
/* fetchThemeMeta - Fetches the meta data associated to a theme */
fetchThemeMeta: (fileName) => {
const filePath = resolve(app.getPath("userData"), "themes", `${fileName}.css`);
let fileMeta = {
name: null,
author: null,
description: null,
transparency: {dark: null, light: null},
options: []
};
if (!existsSync(filePath)) return fileMeta;
const file = readFileSync(filePath, "utf8");
if (!file) return;
file.split(/\r?\n/).forEach((line) => {
if (line.includes("@name")) {
fileMeta.name = line.split("@name ")[1].trim();
}
if (line.includes("@author")) {
fileMeta.author = line.split("@author ")[1].trim();
}
if (line.includes("@description")) {
fileMeta.description = line.split("@description ")[1]
}
if (line.includes("@option")) {
var themeOption = line.split("@option ")[1].trim().split("|")
fileMeta.options.push({
key: themeOption[0],
name: themeOption[1],
defaultValue: themeOption[2]
})
}
if (line.includes("--lightTransparency")) {
fileMeta.transparency.light = line.split("--lightTransparency: ")[1].trim().split(' ')[0];
}
if (line.includes("--darkTransparency")) {
fileMeta.transparency.dark = line.split("--darkTransparency: ")[1].trim().split(' ')[0];
}
if (fileMeta.transparency.dark && fileMeta.transparency.light) {
fileMeta.transparency = nativeTheme.shouldUseDarkColors ? fileMeta.transparency.dark : fileMeta.transparency.light
}
if (!fileMeta.transparency.dark || !fileMeta.transparency.light) {
if (line.includes("--transparency")) {
fileMeta.transparency = line.split("--transparency: ")[1].split(' ')[0];
}
}
});
if (typeof fileMeta.transparency == "object") {
if (!fileMeta.transparency.dark || !fileMeta.transparency.light) {
fileMeta.transparency = false;
}
}
console.verbose(`[fetchThemeMeta] Returning ${JSON.stringify(fileMeta)}`);
return fileMeta
},
/* fetchTransparencyOptions - Fetches the transparency options */
fetchTransparencyOptions: () => {
if (process.platform === "darwin" && (!app.cfg.get('visual.transparencyEffect') || !Utils.isVibrancySupported())) {
app.transparency = true;
return "fullscreen-ui"
} else if (!app.cfg.get('visual.transparencyEffect') || !Utils.isVibrancySupported()) {
console.verbose(`[fetchTransparencyOptions] Vibrancy not created. Required options not met. (transparencyEffect: ${app.cfg.get('visual.transparencyEffect')} | isVibrancySupported: ${Utils.isVibrancySupported()})`);
app.transparency = false;
return false
} else if (process.platform === "win32" && app.cfg.get('visual.transparencyEffect') === "mica") {
return false
}
console.log('[fetchTransparencyOptions] Fetching Transparency Options')
let transparencyOptions = {
theme: null,
effect: app.cfg.get('visual.transparencyEffect'),
debug: app.cfg.get('advanced.verboseLogging'),
}
//------------------------------------------
// Disable on blur for acrylic
//------------------------------------------
if (app.cfg.get('visual.transparencyEffect') === 'acrylic') {
transparencyOptions.disableOnBlur = app.cfg.get('visual.transparencyDisableBlur');
}
//------------------------------------------
// Set the transparency theme
//------------------------------------------
if (app.cfg.get('visual.transparencyTheme') === 'appearance-based') {
if (app.cfg.get('visual.theme') && app.cfg.get('visual.theme') !== "default") {
transparencyOptions.theme = Utils.fetchThemeMeta(app.cfg.get('visual.theme')).transparency; /* Fetch the Transparency from the Themes Folder */
} else if ((!app.cfg.get('visual.theme') || app.cfg.get('visual.theme') === "default") && app.cfg.get('visual.transparencyEffect') === 'acrylic') {
transparencyOptions.theme = (nativeTheme.shouldUseDarkColors ? '#3C3C4307' : '#EBEBF507') /* Default Theme when Using Acrylic */
} else { // Fallback
transparencyOptions.theme = (nativeTheme.shouldUseDarkColors ? 'dark' : 'light')
}
} else {
transparencyOptions.theme = app.cfg.get('visual.transparencyTheme');
}
//------------------------------------------
// Set the refresh rate
//------------------------------------------
if (app.cfg.get('visual.transparencyMaximumRefreshRate')) {
transparencyOptions.useCustomWindowRefreshMethod = true
transparencyOptions.maximumRefreshRate = app.cfg.get('visual.transparencyMaximumRefreshRate')
}
app.transparency = true
console.log(`[fetchTransparencyOptions] Returning: ${JSON.stringify(transparencyOptions)}`)
return transparencyOptions
},
/* fetchThemesListing - Fetches the themes directory listing (Lists .css files) */
fetchThemesListing: () => {
if (!existsSync(resolve(app.getPath("userData"), "themes"))) return;
let themesFileNames = [], themesListing = {};
readdirSync(resolve(app.getPath("userData"), "themes")).forEach((value) => {
if (value.split('.').pop() === 'css') {
themesFileNames.push(value.split('.').shift())
}
});
// Get the Info
themesFileNames.forEach((themeFileName) => {
const themeData = Utils.fetchThemeMeta(themeFileName);
if (themeData && themeData.name && themeData.description && themeData.author) {
themesListing[themeFileName] = themeData;
}
})
return themesListing
},
/* fetchPluginsListing - Fetches the plugins directory listing (Lists .js files) */
fetchPluginsListing: () => {
if (!existsSync(resolve(app.getPath("userData"), "plugins"))) return;
let pluginsFileNames = [], pluginsListing = {};
readdirSync(resolve(app.getPath("userData"), "plugins")).forEach((value) => {
if (value.split('.').pop() === 'js') {
pluginsFileNames.push(value.split('.').shift())
}
});
console.log(pluginsFileNames)
return pluginsFileNames
},
/* fetchOperatingSystem - Fetches the operating system name */
fetchOperatingSystem: () => {
if (process.platform === "win32") {
const release = parseInt(os.release().replaceAll('.', ''))
if (release >= 10022000) {
return 'Windows 11'
} else if (release < 10022000 && release >= 10010240) {
return 'Windows 10'
}
}
},
/* updateThemes - Purges the themes directory and clones a fresh copy of the themes */
updateThemes: async () => {
if (app.watcher) {
app.watcher.close()
}
const tmpDir = join(os.tmpdir(), "ame-themes")
const themesDir = join(app.getPath("userData"), "themes")
if (existsSync(themesDir)) {
if (existsSync(tmpDir)) {
rimraf(tmpDir, [], async (err) => {
if (err) return err
await clone('https://github.com/Apple-Music-Electron/Apple-Music-Electron-Themes', tmpDir, [], (err) => console.log(err))
})
} else {
await mkdir(tmpDir, {recursive: true})
await clone('https://github.com/Apple-Music-Electron/Apple-Music-Electron-Themes', tmpDir, [], (err) => console.log(err))
}
// Base Line Directory Comparison
const updateList = await readdir(tmpDir);
const foundChanges = {};
for (const file of updateList) {
if (file.split('.').pop() === 'css' && file !== "Template.css") { // Reduces listing compare down to css files
console.verbose(`[compareDirectories] Comparing ${file}`)
if (!existsSync(join(themesDir, file))) {
copyFileSync(join(tmpDir, file), join(themesDir, file))
foundChanges[file] = 'added'
} else {
const updateFile = readFileSync(join(tmpDir, file));
const origFile = readFileSync(join(themesDir, file));
if (origFile.toString() !== updateFile.toString()) {
writeFileSync(join(themesDir, file), updateFile)
foundChanges[file] = 'updated'
}
}
}
}
return foundChanges
} else {
await mkdir(tmpDir, {recursive: true})
await clone('https://github.com/Apple-Music-Electron/Apple-Music-Electron-Themes', themesDir, [], (err) => console.log(err))
return {'initial': true}
}
},
/* permissionsCheck - Checks of the file can be read and written to, if it cannot be chmod -r is run on the directory */
permissionsCheck: (folder, file) => {
console.verbose(`[permissionsCheck] Running check on ${join(folder, file)}`)
access(join(folder, file), constants.R_OK | constants.W_OK, (err) => {
if (err) { // File cannot be read after cloning
console.error(`[permissionsCheck][access] ${err}`)
chmod(folder, 0o777, (err) => {
if (err) {
console.error(`[permissionsCheck][chmod] ${err} - Theme set to default to prevent application launch halt.`);
}
});
} else {
console.verbose('[permissionsCheck] Check passed.')
}
})
},
/* initAnalytics - Sentry Analytics */
initAnalytics: () => {
if (app.cfg.get('general.analyticsEnabled') && app.isPackaged) {
ElectronSentry.init({dsn: "https://20e1c34b19d54dfcb8231e3ef7975240@o954055.ingest.sentry.io/5903033"});
}
},
/* checkForUpdates - Checks for update using electron-updater (Part of electron-builder) */
checkForUpdates: (manual) => {
if (!app.isPackaged || process.env.NODE_ENV !== 'production') return;
autoUpdater.logger = require("electron-log");
autoUpdater.logger.transports.file.resolvePath = (vars) => {
return join(app.getPath('userData'), 'logs', vars.fileName);
}
autoUpdater.logger.transports.file.level = "info";
if (app.cfg.get('advanced.autoUpdaterBetaBuilds')) {
autoUpdater.allowPrerelease = true
autoUpdater.allowDowngrade = false
}
autoUpdater.on('update-not-available', () => {
if (manual === true) {
let bodyVer = `You are on the latest version. (v${app.getVersion()})`
new Notification({title: "Apple Music", body: bodyVer}).show()
}
})
autoUpdater.on('download-progress', (progress) => {
let convertedProgress = parseFloat(progress);
app.win.setProgressBar(convertedProgress)
})
autoUpdater.on("error", function (error) {
console.error(`[checkForUpdates] Error ${error}`)
});
autoUpdater.on('update-downloaded', (updateInfo) => {
console.warn('[checkForUpdates] New version downloaded. Starting user prompt.');
dialog.showMessageBox({
type: 'info',
title: 'Updates Available',
message: `Update was found and downloaded, would you like to install the update now?`,
details: updateInfo,
buttons: ['Sure', 'No']
}).then(({response}) => {
if (response === 0) {
const isSilent = true;
const isForceRunAfter = true;
autoUpdater.quitAndInstall(isSilent, isForceRunAfter);
} else {
updater.enabled = true
updater = null
}
})
})
autoUpdater.checkForUpdates()
.then(r => {
console.verbose(`[checkForUpdates] Check for updates completed. Response: ${r}`)
})
.catch(err => {
console.error(`[checkUpdates] An error occurred while checking for updates: ${err}`)
})
},
/* Media Controlling Functions (Pause/Play/Skip/Previous) */
media: {
pausePlay() {
console.verbose('[AppleMusic] pausePlay run.')
app.win.webContents.executeJavaScript("MusicKitInterop.pausePlay()").catch((err) => console.error(err))
},
nextTrack() {
console.verbose('[AppleMusic] nextTrack run.')
app.win.webContents.executeJavaScript("MusicKitInterop.nextTrack()").catch((err) => console.error(err))
},
previousTrack() {
console.verbose('[AppleMusic] previousTrack run.')
app.win.webContents.executeJavaScript("MusicKitInterop.previousTrack()").catch((err) => console.error(err))
}
},
/* Media-associated Icons (Used for Thumbar and TouchBar) */
icons: {
pause: nativeImage.createFromPath(join(trayIconDir, 'pause.png')).resize({width: 32, height: 32}),
play: nativeImage.createFromPath(join(trayIconDir, 'play.png')).resize({width: 32, height: 32}),
nextTrack: nativeImage.createFromPath(join(trayIconDir, 'next.png')).resize({width: 32, height: 32}),
previousTrack: nativeImage.createFromPath(join(trayIconDir, 'previous.png')).resize({width: 32, height: 32}),
inactive: {
play: nativeImage.createFromPath(join(trayIconDir, 'play-inactive.png')).resize({width: 32, height: 32}),
nextTrack: nativeImage.createFromPath(join(trayIconDir, 'next-inactive.png')).resize({
width: 32,
height: 32
}),
previousTrack: nativeImage.createFromPath(join(trayIconDir, 'previous-inactive.png')).resize({
width: 32,
height: 32
}),
}
}
}
Utils.initAnalytics()
module.exports = Utils;

View file

@ -1,407 +0,0 @@
const {app, Menu, Notification, TouchBar, BrowserWindow} = require("electron"),
{TouchBarButton, TouchBarLabel, TouchBarSpacer} = TouchBar,
{join} = require("path"),
windowStateKeeper = require("electron-window-state"),
{initAnalytics} = require('./utils');
initAnalytics();
module.exports = {
SetApplicationMenu: () => {
if (process.platform !== "darwin") return;
Menu.setApplicationMenu(Menu.buildFromTemplate([
{
label: app.getName(),
submenu: [
{ role: 'about' },
{ type: 'separator' },
{ role: 'services' },
{ type: 'separator' },
{ role: 'hide' },
{ role: 'hideOthers' },
{ role: 'unhide' },
{ type: 'separator' },
{ role: 'quit' }
]
},
{
label: 'View',
submenu: [
{ role: 'reload' },
{ role: 'forceReload' },
{ role: 'toggleDevTools' },
{ type: 'separator' },
{ role: 'resetZoom' },
{ role: 'zoomIn' },
{ role: 'zoomOut' },
{ type: 'separator' },
{ role: 'togglefullscreen' }
]
},
{
label: 'Window',
role: 'window',
submenu: [
{ role: 'minimize' },
{ role: 'zoom' },
{ type: 'separator' },
{ role: 'front' },
{ type: 'separator' },
{ role: 'window' }
]
},
{
label: 'Support',
role: 'help',
submenu: [
{
label: 'Discord',
click() {
require("shell").openExternal("https://discord.gg/CezHYdXHEM")
}
},
{
label: 'GitHub Wiki',
click() {
require("shell").openExternal("https://github.com/Apple-Music-Electron/Apple-Music-Electron/wiki")
}
},
{ type: 'separator' },
{
label: 'View License',
click() {
require("shell").openExternal("https://github.com/Apple-Music-Electron/Apple-Music-Electron/blob/master/LICENSE")
}
},
{ type: 'separator' },
{
label: 'Toggle Developer Tools',
accelerator: 'Option+CommandOrControl+I',
click() {
app.win.webContents.openDevTools()
}
},
{
label: 'Open Configuration File in Editor',
click() {
app.cfg.openInEditor()
}
}
]
},
]));
},
SetContextMenu: (visibility) => {
if (visibility) {
app.tray.setContextMenu(Menu.buildFromTemplate([
{
label: 'Check for Updates',
click: function () {
app.ame.utils.checkForUpdates(true)
}
},
{
label: 'Minimize to Tray',
click: function () {
if (typeof app.win.hide === 'function') {
app.win.hide();
}
}
},
{
label: 'Quit',
click: function () {
app.quit();
}
}
]));
} else {
app.tray.setContextMenu(Menu.buildFromTemplate([
{
label: 'Check for Updates',
click: function () {
app.ame.utils.checkForUpdates(true)
}
},
{
label: `Show ${app.getName()}`,
click: function () {
if (typeof app.win.show === 'function') {
app.win.show();
}
}
},
{
label: 'Quit',
click: function () {
app.quit();
}
}
]));
}
return true
},
SetTaskList: () => {
if (process.platform !== "win32") return;
app.setUserTasks([
{
program: process.execPath,
arguments: '--force-quit',
iconPath: process.execPath,
iconIndex: 0,
title: `Quit ${app.getName()}`
}
]);
return true
},
SetButtons: () => {
if (process.platform === 'win32') { // Set the Windows Thumbnail Toolbar Buttons
if (app.media.playParams.id !== 'no-id-found') {
app.win.setThumbarButtons([
{
tooltip: 'Previous',
icon: app.ame.utils.icons.previousTrack,
click() {
app.ame.utils.media.previousTrack()
}
},
{
tooltip: app.media.status ? 'Pause' : 'Play',
icon: app.media.status ? app.ame.utils.icons.pause : app.ame.utils.icons.play,
click() {
app.ame.utils.media.pausePlay()
}
},
{
tooltip: 'Next',
icon: app.ame.utils.icons.nextTrack,
click() {
app.ame.utils.media.nextTrack()
}
}
]);
} else {
app.win.setThumbarButtons([
{
tooltip: 'Previous',
icon: app.ame.utils.icons.inactive.previousTrack,
flags: ["disabled"]
},
{
tooltip: 'Play',
icon: app.ame.utils.icons.inactive.play,
flags: ["disabled"]
},
{
tooltip: 'Next',
icon: app.ame.utils.icons.inactive.nextTrack,
flags: ["disabled"]
}
]);
}
} else if (process.platform === 'darwin') { // Set the macOS Touchbar
if (!app.media || app.media.playParams.id === 'no-id-found') return;
const nextTrack = new TouchBarButton({
icon: app.ame.utils.icons.nextTrack,
click: () => {
app.ame.utils.media.nextTrack()
}
})
const previousTrack = new TouchBarButton({
icon: app.ame.utils.icons.previousTrack,
click: () => {
app.ame.utils.media.previousTrack()
}
})
const playPause = new TouchBarButton({
icon: app.media.status ? app.ame.utils.icons.pause : app.ame.utils.icons.play,
click: () => {
app.ame.utils.media.pausePlay()
}
})
const trackInfo = new TouchBarLabel({
label: app.media.name ? `${app.media.name} by ${app.media.artistName}` : `Nothing is Playing`
})
const touchBar = new TouchBar({
items: [
previousTrack,
playPause,
nextTrack,
new TouchBarSpacer({size: 'flexible'}),
trackInfo,
new TouchBarSpacer({size: 'flexible'})
]
})
app.win.setTouchBar(touchBar)
}
},
SetTrayTooltip: (attributes) => {
if (!app.cfg.get('general.trayTooltipSongName')) return;
console.verbose(`[UpdateTooltip] Updating Tooltip for ${attributes.name} to ${attributes.status}`)
if (attributes.status === true) {
app.tray.setToolTip(`Playing ${attributes.name} by ${attributes.artistName} on ${attributes.albumName}`);
} else {
app.tray.setToolTip(`Paused ${attributes.name} by ${attributes.artistName} on ${attributes.albumName}`);
}
},
CreateNotification: (attributes) => {
if (!Notification.isSupported() || !(app.cfg.get('general.playbackNotifications') || app.cfg.get('general.playbackNotifications') === 'minimized')) return;
if (app.cfg.get('general.playbackNotifications') === "minimized" && !(!app.win.isVisible() || app.win.isMinimized())) {
return;
}
console.verbose(`[CreateNotification] Notification Generating | Function Parameters: SongName: ${attributes.name} | Artist: ${attributes.artistName} | Album: ${attributes.albumName}`)
if (app.ipc.existingNotification) {
console.log("[CreateNotification] Existing Notification Found - Removing. ")
app.ipc.existingNotification.close()
app.ipc.existingNotification = false
}
const NOTIFICATION_OBJECT = {
title: attributes.name,
body: `${attributes.artistName} - ${attributes.albumName}`,
silent: true,
icon: join(__dirname, '../icons/icon.png'),
actions: [{
type: 'button',
text: 'Skip'
}]
}
app.ipc.existingNotification = new Notification(NOTIFICATION_OBJECT)
app.ipc.existingNotification.show()
app.ipc.existingNotification.addListener('action', (_event) => {
app.ame.utils.media.nextTrack()
});
},
CreateBrowserWindow: () => {
console.log('[CreateBrowserWindow] Initializing Browser Window Creation.')
// Set default window sizes
const mainWindowState = windowStateKeeper({
defaultWidth: 1024,
defaultHeight: 600
});
const options = {
icon: join(__dirname, `../icons/icon.ico`),
width: mainWindowState.width,
height: mainWindowState.height,
x: mainWindowState.x,
y: mainWindowState.y,
minWidth: (app.cfg.get('visual.streamerMode') ? 400 : 300),
minHeight: ((app.cfg.get('visual.frameType') === 'mac' || app.cfg.get('visual.frameType') === 'mac-right') ? (app.cfg.get('visual.streamerMode')? 55 : 300) : (app.cfg.get('visual.streamerMode') ? 115 : 300)),
frame: (process.platform !== 'win32' && !(app.cfg.get('visual.frameType') === 'mac' || app.cfg.get('visual.frameType') === 'mac-right')),
title: app.getName(),
resizable: true,
// Enables DRM
webPreferences: {
plugins: true,
preload: join(__dirname, '../js/MusicKitInterop.js'),
allowRunningInsecureContent: true,
nodeIntegration: false,
nodeIntegrationInWorker: false,
contextIsolation: false,
webSecurity: true,
sandbox: true,
nativeWindowOpen: true
}
};
// Fetch the transparency options
const transparencyOptions = app.ame.utils.fetchTransparencyOptions()
if (process.platform === 'darwin' && !app.cfg.get('visual.frameType')) { // macOS Frame and transparency
options.titleBarStyle = 'hidden'
options.titleBarOverlay = true
options.frame = true
options.trafficLightPosition = {x: 20, y: 20}
options.transparent = (app.transparency && transparencyOptions)
}
// Create the Browser Window
console.log('[CreateBrowserWindow] Creating BrowserWindow.')
let win;
if (process.platform === "darwin" || process.platform === "linux") {
win = new BrowserWindow(options)
} else {
const {BrowserWindow} = require("electron-acrylic-window");
if (app.transparency && transparencyOptions) {
console.log('[CreateBrowserWindow] Setting Vibrancy')
options.vibrancy = transparencyOptions
}
win = new BrowserWindow(options)
}
// Set the transparency
if (app.transparency && transparencyOptions && process.platform === "darwin") {
console.log('[CreateBrowserWindow] Setting Vibrancy')
win.setVibrancy(transparencyOptions)
}
// alwaysOnTop
if (!app.cfg.get('window.alwaysOnTop')) {
win.setAlwaysOnTop(false)
} else {
win.setAlwaysOnTop(true)
}
win.setMenuBarVisibility(false); // Hide that nasty menu bar
if (app.cfg.get('advanced.devToolsOnStartup')) win.webContents.openDevTools({mode: 'detach'}); // Enables Detached DevTools
// Register listeners on Window to track size and position of the Window.
mainWindowState.manage(win);
// Load the Website
app.ame.load.LoadWebsite(win)
return win
},
HandleBrowserWindow: () => {
// Detect if the application has been opened with --minimized
if (app.commandLine.hasSwitch('minimized') || process.argv.includes('--minimized')) {
console.log("[Apple-Music-Electron] Application opened with '--minimized'");
if (typeof app.win.minimize === 'function') {
app.win.minimize();
}
}
// Detect if the application has been opened with --hidden
if (app.commandLine.hasSwitch('hidden') || process.argv.includes('--hidden')) {
console.log("[Apple-Music-Electron] Application opened with '--hidden'");
if (typeof app.win.hide === 'function') {
app.win.hide()
}
}
},
removeInsertedCSS: (index) => {
if (app.injectedCSS[index]) {
app.win.webContents.removeInsertedCSS(app.injectedCSS[index]).then(r => { if (r) { console.error(r); }});
}
}
}

View file

@ -1,321 +0,0 @@
const ws = require('ws');
const http = require('http');
const WebSocketServer = ws.Server;
const WebSocket = ws.WebSocket;
const url = require('url');
const fs = require('fs');
const path = require('path');
const port = process.argv[2] || 9000;
const express = require('express');
const router = express.Router();
const getPort = require('get-port');
const {
ipcMain,
app,
BrowserWindow
} = require('electron');
const wsapi = {
standardResponse: function (status, data, message, type = "generic") {
this.status = status;
this.message = message;
this.data = data;
this.type = type;
},
port: 26369,
wss: null,
clients: [],
createId() {
// create random guid
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
var r = Math.random() * 16 | 0,
v = c == 'x' ? r : (r & 0x3 | 0x8);
return v.toString(16);
});
},
async InitWebSockets () {
ipcMain.on('wsapi-updatePlaybackState', (event, arg) => {
wsapi.updatePlaybackState(arg);
})
ipcMain.on('wsapi-returnQueue', (event, arg) => {
wsapi.returnQueue(JSON.parse(arg));
});
ipcMain.on('wsapi-returnSearch', (event, arg) => {
wsapi.returnSearch(JSON.parse(arg));
});
ipcMain.on('wsapi-returnSearchLibrary', (event, arg) => {
wsapi.returnSearchLibrary(JSON.parse(arg));
});
ipcMain.on('wsapi-returnDynamic', (event, arg, type) => {
wsapi.returnDynamic(JSON.parse(arg), type);
});
ipcMain.on('wsapi-returnMusicKitApi', (event, arg, method) => {
wsapi.returnMusicKitApi(JSON.parse(arg), method);
});
ipcMain.on('wsapi-returnLyrics', (event, arg) => {
wsapi.returnLyrics(JSON.parse(arg));
});
var safeport = await getPort({port : 26369});
wss = new WebSocketServer({
port: safeport,
perMessageDeflate: {
zlibDeflateOptions: {
// See zlib defaults.
chunkSize: 1024,
memLevel: 7,
level: 3
},
zlibInflateOptions: {
chunkSize: 10 * 1024
},
// Other options settable:
clientNoContextTakeover: true, // Defaults to negotiated value.
serverNoContextTakeover: true, // Defaults to negotiated value.
serverMaxWindowBits: 10, // Defaults to negotiated value.
// Below options specified as default values.
concurrencyLimit: 10, // Limits zlib concurrency for perf.
threshold: 1024 // Size (in bytes) below which messages
// should not be compressed if context takeover is disabled.
}
})
console.log(`WebSocketServer started on port: ${safeport}`);
const defaultResponse = new wsapi.standardResponse(0, {}, "OK");
wss.on('connection', function connection(ws) {
ws.id = wsapi.createId();
console.log(`Client ${ws.id} connected`)
wsapi.clients.push(ws);
ws.on('message', function incoming(message) {
});
// ws on message
ws.on('message', function incoming(message) {
let data = JSON.parse(message);
let response = new wsapi.standardResponse(0, {}, "OK");;
if (data.action) {
data.action.toLowerCase();
}
switch (data.action) {
default:
response.message = "Action not found";
break;
case "identify":
response.message = "Thanks for identifying!"
response.data = {
id: ws.id
}
ws.identity = {
name: data.name,
author: data.author,
description: data.description,
version: data.version
}
break;
case "play-next":
app.win.webContents.executeJavaScript(`wsapi.playNext(\`${data.type}\`,\`${data.id}\`)`);
response.message = "Play Next";
break;
case "play-later":
app.win.webContents.executeJavaScript(`wsapi.playLater(\`${data.type}\`,\`${data.id}\`)`);
response.message = "Play Later";
break;
case "quick-play":
app.win.webContents.executeJavaScript(`wsapi.quickPlay(\`${data.term}\`)`);
response.message = "Quick Play";
break;
case "get-lyrics":
app.win.webContents.executeJavaScript(`wsapi.getLyrics()`);
break;
case "shuffle":
app.win.webContents.executeJavaScript(`wsapi.toggleShuffle()`);
break;
case "set-shuffle":
if(data.shuffle == true) {
app.win.webContents.executeJavaScript(`MusicKit.getInstance().shuffleMode = 1`);
}else{
app.win.webContents.executeJavaScript(`MusicKit.getInstance().shuffleMode = 0`);
}
break;
case "repeat":
app.win.webContents.executeJavaScript(`wsapi.toggleRepeat()`);
break;
case "seek":
app.win.webContents.executeJavaScript(`MusicKit.getInstance().seekToTime(${parseFloat(data.time)})`);
response.message = "Seek";
break;
case "pause":
app.win.webContents.executeJavaScript(`MusicKit.getInstance().pause()`);
response.message = "Paused";
break;
case "play":
app.win.webContents.executeJavaScript(`MusicKit.getInstance().play()`);
response.message = "Playing";
break;
case "stop":
app.win.webContents.executeJavaScript(`MusicKit.getInstance().stop()`);
response.message = "Stopped";
break;
case "volume":
app.win.webContents.executeJavaScript(`MusicKit.getInstance().volume = ${parseFloat(data.volume)}`);
response.message = "Volume";
break;
case "mute":
app.win.webContents.executeJavaScript(`MusicKit.getInstance().mute()`);
response.message = "Muted";
break;
case "unmute":
app.win.webContents.executeJavaScript(`MusicKit.getInstance().unmute()`);
response.message = "Unmuted";
break;
case "next":
app.win.webContents.executeJavaScript(`MusicKit.getInstance().skipToNextItem()`);
response.message = "Next";
break;
case "previous":
app.win.webContents.executeJavaScript(`MusicKit.getInstance().skipToPreviousItem()`);
response.message = "Previous";
break;
case "musickit-api":
app.win.webContents.executeJavaScript(`wsapi.musickitApi(\`${data.method}\`, \`${data.id}\`, ${JSON.stringify(data.params)})`);
break;
case "musickit-library-api":
break;
case "set-autoplay":
app.win.webContents.executeJavaScript(`wsapi.setAutoplay(${data.autoplay})`);
break;
case "queue-move":
app.win.webContents.executeJavaScript(`wsapi.moveQueueItem(${data.from},${data.to})`);
break;
case "get-queue":
app.win.webContents.executeJavaScript(`wsapi.getQueue()`);
break;
case "search":
if (!data.limit) {
data.limit = 10;
}
app.win.webContents.executeJavaScript(`wsapi.search(\`${data.term}\`, \`${data.limit}\`)`);
break;
case "library-search":
if (!data.limit) {
data.limit = 10;
}
app.win.webContents.executeJavaScript(`wsapi.searchLibrary(\`${data.term}\`, \`${data.limit}\`)`);
break;
case "show-window":
app.win.show()
break;
case "hide-window":
app.win.hide()
break;
case "play-mediaitem":
app.win.webContents.executeJavaScript(`wsapi.playTrackById(${data.id}, \`${data.kind}\`)`);
response.message = "Playing track";
break;
case "get-status":
response.data = {
isAuthorized: true
};
response.message = "Status";
break;
case "get-currentmediaitem":
app.win.webContents.executeJavaScript(`wsapi.getPlaybackState()`);
break;
}
ws.send(JSON.stringify(response));
});
ws.on('close', function close() {
// remove client from list
wsapi.clients.splice(wsapi.clients.indexOf(ws), 1);
console.log(`Client ${ws.id} disconnected`);
});
ws.send(JSON.stringify(defaultResponse));
});
},
sendToClient(id) {
// replace the clients.forEach with a filter to find the client that requested
},
win: null,
inAppUI() {
// create a browserwindow and load "localhost:8090"
this.win = new BrowserWindow({
width: 800,
height: 600,
webPreferences: {
nodeIntegration: true
}
});
this.win.loadURL(`http://localhost:${this.webRemotePort}`);
this.win.show()
this.win.on('closed', () => {
this.win = null;
});
},
updatePlaybackState(attr) {
const response = new wsapi.standardResponse(0, attr, "OK", "playbackStateUpdate");
wsapi.clients.forEach(function each(client) {
client.send(JSON.stringify(response));
});
},
returnMusicKitApi(results, method) {
const response = new wsapi.standardResponse(0, results, "OK", `musickitapi.${method}`);
wsapi.clients.forEach(function each(client) {
client.send(JSON.stringify(response));
});
},
returnDynamic(results, type) {
const response = new wsapi.standardResponse(0, results, "OK", type);
wsapi.clients.forEach(function each(client) {
client.send(JSON.stringify(response));
});
},
returnLyrics(results) {
const response = new wsapi.standardResponse(0, results, "OK", "lyrics");
wsapi.clients.forEach(function each(client) {
client.send(JSON.stringify(response));
});
},
returnSearch(results) {
const response = new wsapi.standardResponse(0, results, "OK", "searchResults");
wsapi.clients.forEach(function each(client) {
client.send(JSON.stringify(response));
});
},
returnSearchLibrary(results) {
const response = new wsapi.standardResponse(0, results, "OK", "searchResultsLibrary");
wsapi.clients.forEach(function each(client) {
client.send(JSON.stringify(response));
});
},
returnQueue(queue) {
const response = new wsapi.standardResponse(0, queue, "OK", "queue");
wsapi.clients.forEach(function each(client) {
client.send(JSON.stringify(response));
});
},
webRemotePort: 8090,
async InitWebServer() {
const webRemotePort = await getPort({port : wsapi.webRemotePort});
// Web Remote
// express server that will serve static files in the "../web-remote" folder
const webapp = express();
const webRemotePath = path.join(__dirname, '../web-remote');
webapp.use(express.static(webRemotePath));
webapp.get('/', function (req, res) {
res.sendFile(path.join(webRemotePath, 'index_old.html'));
});
webapp.listen(webRemotePort, function () {
console.log(`Web Remote listening on port ${webRemotePort}`);
});
}
}
module.exports = wsapi

View file

@ -1,86 +0,0 @@
<div class="md-container md-container_panel" id="castdevices-vue">
<div class="md-header-title">
<div class="row">
<div class="col">
<button @click="close()" class="md-close-btn"></button>
</div>
<div class="col-auto">
Cast To Device
</div>
<div class="col">
</div>
</div>
</div>
<div class="md-body" style="overflow-y: overlay">
<div class="md-labeltext">Chromecast</div>
<div class="md-option-container" style="margin-top: 12px;margin-bottom: 12px;">
<template v-if="!scanning">
<template v-for="(device) in devices.cast">
<div class="md-option-line" style="cursor: pointer" @click="setCast(device)">
<div class="md-option-segment">
{{ device.name }}
<br>
<small>{{ device.host }}</small>
</div>
<div class="md-option-segment_auto" style="display: flex;justify-content: center;align-items: center" v-if="activeCasts.includes(device)">
Connected
</div>
<div class="md-option-segment_auto" v-else style="display: flex;justify-content: center;align-items: center">
<svg width="100%" height="100%" viewBox="0 0 34 34" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" class="castPlayIndicator"><path d="M28.228,18.327l-16.023,8.983c-0.99,0.555 -2.205,-0.17 -2.205,-1.318l0,-17.984c0,-1.146 1.215,-1.873 2.205,-1.317l16.023,8.982c1.029,0.577 1.029,2.077 0,2.654Z" style="fill-rule:nonzero"></path></svg>
</div>
</div>
</template>
</template>
<template v-else>
<div class="md-option-line" style="cursor: pointer">
<div class="md-option-segment">
Scanning...
</div>
</div>
</template>
</div>
<div class="md-labeltext" style="opacity:0.5;">AirPlay</div>
<div class="md-option-container" style="margin-top: 12px;margin-bottom: 12px;opacity:0.5;">
<div class="md-option-line">
<div class="md-option-segment">
AirPlay is still under development
</div>
</div>
</div>
</div>
<div class="md-footer">
<div class="row">
<div class="col" v-if="activeCasts.length != 0">
<button style="width:100%" @click="stopCasting()" class="md-btn md-btn-block md-btn-primary">Stop casting to all devices</button>
</div>
<div class="col">
<button style="width:100%" class="md-btn md-btn-block" @click="scan()">Scan</button>
</div>
</div>
</div>
</div>
<style>
.castPlayIndicator {
fill-rule: evenodd;
clip-rule: evenodd;
stroke-linejoin: round;
stroke-miterlimit: 1.41421;
height: 26px;
width: 26px;
fill: var(--contextMenuTextColor);
border-radius: 100%;
background: var(--musicNote);
padding: 6px;
}
.cast_logo {
background: url("ameres://icons/webui/cast.svg");
width:64px;
height: 64px;
color:white;
background-size: cover;
filter:invert(1);
margin: 0 auto;
}
</style>

View file

@ -1,45 +0,0 @@
<div id="eq-vm">
<div class="md-container md-container_panel">
<div class="md-header-title md-transparent" style="border:0px;">
<div class="row">
<div class="col">
<button @click="close()" class="md-close-btn"></button>
</div>
<div class="col-auto">
Equalizer
</div>
<div class="col">
</div>
</div>
</div>
<div class="md-body" style="padding:0px;">
<div class="md-option-container" style="border-radius: 0px;">
<div class="md-option-line md-transparent">
<div class="md-option-segment">Bass ({{ bass }})</div>
<div class="md-option-segment_auto">
<input type="range" class="md-slider" min="-6" step="0.01" max="6" v-model="bass"
@input="bassFilter.gain.value = bass"/>
</div>
</div>
<div class="md-option-line md-transparent">
<div class="md-option-segment">Treble ({{ treble }})</div>
<div class="md-option-segment_auto">
<input type="range" class="md-slider" min="-6" step="0.01" max="6" v-model="treble"
@input="trebleFilter.gain.value = treble"/>
</div>
</div>
<div class="md-option-line md-transparent">
<div class="md-option-segment">Gain ({{ gain }})</div>
<div class="md-option-segment_auto">
<input type="range" class="md-slider" min="-1" step="0.01" max="1" v-model="gain"
@input="AMEx.result.gain.gain.value = gain"/>
</div>
</div>
</div>
</div>
<div class="md-footer">
<button class="md-btn" style="width:100%;padding:4px;font-size:13px;" @click="reset()">Reset</button>
</div>
</div>
</div>

View file

@ -1,80 +0,0 @@
<div class="md-container md-container_panel" id="itunes-remote-vue">
<div class="md-header-title">
<div class="row">
<div class="col">
<button @click="close()" v-if="state != 'connecting'" class="md-close-btn"></button>
</div>
<div class="col-auto">
Add Remote for iPhone, Apple Watch, iPod touch & iPad
</div>
<div class="col">
</div>
</div>
</div>
<div class="md-body" style="overflow-y: overlay;display: flex;align-items: center;justify-content: center">
<div class="dialogContainer" v-if="state == 'pin'">
<div>Please enter the passcode displayed on "Device Name" to allow it to control<br>Apple Music Electron.</div>
<div class="row pairNumberContainer">
<div class="col-auto">
<input type="number" v-model="passcode[0]" id="passcode-num-0" @input="jumpToNum(1)" class="pairNumber" min="0" step="1" max="9"/>
</div>
<div class="col-auto">
<input type="number" v-model="passcode[1]" id="passcode-num-1" @input="jumpToNum(2)" class="pairNumber" min="0" step="1" max="9"/>
</div>
<div class="col-auto">
<input type="number" v-model="passcode[2]" id="passcode-num-2" @input="jumpToNum(3)" class="pairNumber" min="0" step="1" max="9"/>
</div>
<div class="col-auto">
<input type="number" v-model="passcode[3]" id="passcode-num-3" @input="connect()" class="pairNumber" min="0" step="1" max="9"/>
</div>
</div>
</div>
<div class="dialogContainer" v-if="state == 'connecting'">
Please wait...
</div>
<div class="dialogContainer" v-if="state == 'error'">
There was an error pairing to your remote, please try again.
<button class="md-btn md-btn-primary" @click="retry()" style="display:block;margin: 0 auto;margin-top: 32px;">Retry</button>
</div>
<div class="dialogContainer" v-if="state == 'success'">
Your Remote is now able to control Apple Music Electron.
<button class="md-btn md-btn-primary" @click="close()" style="display:block;margin: 0 auto;margin-top: 32px;">OK</button>
</div>
</div>
<div class="md-footer">
</div>
</div>
<style>
.dialogContainer {
border: 0px solid var(--systemGray);
padding: 32px;
text-align: center;
}
.pairNumberContainer {
margin: 0 auto;
width: 600px;
justify-content: center;
margin-top: 32px;
}
.pairNumber {
text-align: center;
border-radius: 5px;
height: 58px;
font-size: 24px;
width: 54px;
background: white;
color: black;
border: 1px solid rgb(0 0 0 / 25%);
box-shadow: inset 0px 2px 2px rgb(0 0 0 / 35%);
}
.pairNumber::-webkit-outer-spin-button,
.pairNumber::-webkit-inner-spin-button {
-webkit-appearance: none;
margin: 0;
}
</style>

View file

@ -1,827 +0,0 @@
<div id="oobe-vue">
<transition name="fade_simple">
<template v-if="page == 'intro'">
<div class="md-container">
<video class="md-video" id="introVideo" playsinline src="ameres://content/oobe/oobe.webm"
autoplay="1"></video>
</div>
</template>
</transition>
<transition name="fade">
<template v-if="page == 'welcome'">
<div class="md-container">
<div class="md-header">
<h1 class="md-h1">Welcome to Apple Music Electron</h1>
</div>
<div class="md-body">
<div style="text-align: center">A free and <a href="#"
onclick="window.open('https://github.com/Apple-Music-Electron')">open
source</a> Apple Music streaming player based on Electron 15
</div>
</div>
<div class="md-body">
<div style="text-align: center">In a few steps, you can setup your Apple Music Electron
experience.
</div>
</div>
<div class="md-footer">
<button class="md-btn md-btn-primary" @click="page = 'region'">Continue</button>
</div>
</div>
</template>
</transition>
<transition name="fade">
<template v-if="page == 'region'">
<div class="md-container">
<div class="md-header">
<h1 class="md-h1">Localization and Region</h1>
</div>
<div class="md-body" style="height: auto;display:flex;align-items: center;justify-content: center;">
Select your region and preferred language
<br>
</div>
<div class="md-body" style="display:flex;align-items: center;justify-content: center;">
<div style="
display: flex;
width: 100%;
justify-content: center;
">
<div style="margin: 12px;">
Choose another country or region to see content specific to your location.
<select v-model="prefs.general.storefront" class="md-select" size="5"
style="width:100%;height:100%;">
<option value=''>Automatic</option>
<option disabled>Africa, Middle East and India</option>
<option value='dz'>Algeria</option>
<option value='ao'>Angola</option>
<option value='az'>Azerbaijan</option>
<option value='bh'>Bahrain</option>
<option value='bj'>Benin</option>
<option value='bw'>Botswana</option>
<option value='cm'>Cameroon</option>
<option value='cv'>Cape Verde</option>
<option value='td'>Chad</option>
<option value='cd'>Congo, Democratic Republic of The</option>
<option value='ci'>Cote d'Ivoire</option>
<option value='eg'>Egypt</option>
<option value='ga'>Gabon</option>
<option value='gh'>Ghana</option>
<option value='gm'>Gambia</option>
<option value='gw'>Guinea Bissau</option>
<option value='il'>Israel</option>
<option value='in'>India</option>
<option value='in?l=hi'>India (Hindi)</option>
<option value='iq'>Iraq</option>
<option value='jo'>Jordan</option>
<option value='ke'>Kenya</option>
<option value='kw'>Kuwait</option>
<option value='lb'>Lebanon</option>
<option value='lr'>Liberia</option>
<option value='ly'>Libya</option>
<option value='lk'>Sri Lanka</option>
<option value='mg'>Madagascar</option>
<option value='mw'>Malawi</option>
<option value='ml'>Mali</option>
<option value='mr'>Mauritania</option>
<option value='mu'>Mauritius</option>
<option value='ma'>Morocco</option>
<option value='mz'>Mozambique</option>
<option value='na'>Namibia</option>
<option value='ne'>Niger</option>
<option value='ng'>Nigeria</option>
<option value='om'>Oman</option>
<option value='qa'>Qatar</option>
<option value='sa'>Saudi Arabia</option>
<option value='cg'>Republic of Congo</option>
<option value='rw'>Rwanda</option>
<option value='sn'>Senegal</option>
<option value='sc'>Seychelles</option>
<option value='sl'>Sierra Leone</option>
<option value='za'>South Africa</option>
<option value='sz'>Swaziland</option>
<option value='tj'>Tajikistan</option>
<option value='tz'>Tanzania</option>
<option value='tn'>Tunisia</option>
<option value='ug'>Uganda</option>
<option value='ae'>United Arab Emirates</option>
<option value='ye'>Yemen</option>
<option value='zm'>Zambia</option>
<option value='zw'>Zimbabwe</option>
<option disabled>Asia Pacific</option>
<option value='au'>Australia</option>
<option value='bt'>Bhutan</option>
<option value='cn'>China</option>
<option value='fj'>Fiji</option>
<option value='fm'>Micronesian, Federated States of</option>
<option value='hk'>Hong Kong</option>
<option value='id'>Indonesia</option>
<option value='jp'>Japan</option>
<option value='kr'>Korea</option>
<option value='jp?l=en'>Japan (English)</option>
<option value='kh'>Cambodia</option>
<option value='kz'>Kazakhstan</option>
<option value='kg'>Kyrgyzstan</option>
<option value='la'>Laos</option>
<option value='mn'>Mongolia</option>
<option value='mo'>Macau</option>
<option value='my'>Malaysia</option>
<option value='mv'>Maldives</option>
<option value='mm'>Myanmar</option>
<option value='np'>Nepal</option>
<option value='nz'>New Zealand</option>
<option value='pg'>Papua New Guinea</option>
<option value='ph'>Philippines</option>
<option value='sg'>Singapore</option>
<option value='sb'>Solomon Islands</option>
<option value='th'>Thailand</option>
<option value='tw'>Taiwan</option>
<option value='to'>Tonga</option>
<option value='tm'>Turkmenistan</option>
<option value='uz'>Uzbekistan</option>
<option value='vu'>Vanuatu</option>
<option value='vn'>Vietnam</option>
<option disabled>Europe</option>
<option value='at'>Austria</option>
<option value='am'>Armenia</option>
<option value='be?l=nl'>Belgium (Dutch)</option>
<option value='be?l=fr'>Belgium (French)</option>
<option value='be'>Belgium (English)</option>
<option value='bg'>Bulgaria</option>
<option value='by'>Belarus</option>
<option value='ba'>Bosnia and Herzegovina</option>
<option value='hr'>Croatia</option>
<option value='cy'>Cyprus</option>
<option value='cz'>Czech Republic</option>
<option value='de'>Germany</option>
<option value='dk'>Denmark</option>
<option value='ee'>Estonia</option>
<option value='es'>Spain</option>
<option value='fi'>Finland</option>
<option value='fr'>France</option>
<option value='ge'>Georgia</option>
<option value='gr'>Greece</option>
<option value='hu'>Hungary</option>
<option value='is'>Iceland</option>
<option value='ie'>Ireland</option>
<option value='it'>Italy</option>
<option value='xk'>Kosovo</option>
<option value='lt'>Lithuania</option>
<option value='lu?l=fr'>Luxembourg (French)</option>
<option value='lu?l=de'>Luxembourg (German)</option>
<option value='lu'>Luxembourg (English)</option>
<option value='lv'>Latvia</option>
<option value='md'>Moldova</option>
<option value='me'>Montenegro</option>
<option value='mt'>Malta, Republic of</option>
<option value='nl'>Netherlands</option>
<option value='no'>Norway</option>
<option value='mk'>North Macedonia</option>
<option value='pl'>Poland</option>
<option value='pt'>Portugal</option>
<option value='ro'>Romania</option>
<option value='ru'>Russia</option>
<option value='rs'>Serbia</option>
<option value='se'>Sweden</option>
<option value='si'>Slovenia</option>
<option value='sk'>Slovakia</option>
<option value='ch'>Switzerland (German)</option>
<option value='ch?l=fr'>Switzerland (French)</option>
<option value='ch?l=it'>Switzerland (Italian)</option>
<option value='tr'>Turkey</option>
<option value='ua'>Ukraine</option>
<option value='gb'>United Kingdom</option>
<option disabled>Latin America and the Caribbean</option>
<option value='ag'>Antigua & Barbuda</option>
<option value='ai'>Anguilla</option>
<option value='ar'>Argentina</option>
<option value='bs'>Bahamas</option>
<option value='bb'>Barbados</option>
<option value='bm'>Bermuda</option>
<option value='bo'>Bolivia</option>
<option value='br'>Brazil</option>
<option value='bz'>Belize</option>
<option value='cl'>Chile</option>
<option value='co'>Colombia</option>
<option value='cr'>Costa Rica</option>
<option value='dm'>Dominica</option>
<option value='do'>Dominican Republic</option>
<option value='ec'>Ecuador</option>
<option value='gd'>Grenada</option>
<option value='gt'>Guatemala</option>
<option value='gy'>Guyana</option>
<option value='hn'>Honduras</option>
<option value='jm'>Jamaica</option>
<option value='kn'>St. Kitts & Nevis</option>
<option value='ky'>Cayman Islands</option>
<option value='mx'>Mexico</option>
<option value='ms'>Montserrat</option>
<option value='ni'>Nicaragua</option>
<option value='pa'>Panama</option>
<option value='pe'>Peru</option>
<option value='py'>Paraguay</option>
<option value='lc'>Saint Lucia</option>
<option value='vc'>Saint Vincent and The Grenadines</option>
<option value='sv'>El Salvador</option>
<option value='sr'>Suriname</option>
<option value='tt'>Trinidad & Tobago</option>
<option value='tc'>Turks and Caicos</option>
<option value='uy'>Uruguay</option>
<option value='ve'>Venezuela</option>
<option value='vg'>British Virgin Islands</option>
<option disabled>The United States and Canada</option>
<option value='us'>United States</option>
<option value='ca?l=en'>Canada (English)</option>
<option value='ca?l=fr'>Canada (French)</option>
</select>
</div>
</div>
</div>
<div class="md-footer">
<button class="md-btn" @click="page = 'welcome'">Back</button>
<button class="md-btn md-btn-primary" @click="page = 'theme'">Continue</button>
</div>
</div>
</template>
</transition>
<transition name="fade">
<template v-if="page == 'theme'">
<div class="md-container">
<div class="md-header">
<h1 class="md-h1">Appearance</h1>
</div>
<div class="md-body">
<div class="md-option-container">
<div class="md-option-line">
<div class="md-option-segment">
Theme
</div>
<div class="md-option-segment md-option-segment_auto">
<select class="md-select" v-model="prefs.visual.theme"
@change="AMStyling.loadTheme(prefs.visual.theme)"
style="width:180px;">
<option value="">Default
<option v-for="(theme, id) in AM.themesListing" :value="id">{{ theme.name }}
</option>
</select>
</div>
</div>
<div class="md-option-line">
<div class="md-option-segment">
Transparency
</div>
<div class="md-option-segment md-option-segment_auto">
<select class="md-select" v-model="prefs.visual.transparencyEffect"
style="width:180px;">
<option value=''>Disabled</option>
<option value='blur'>Blur Behind</option>
<option value='acrylic'>Acrylic</option>
</select>
</div>
</div>
<div class="md-option-line">
<div class="md-option-segment">
Use OS Accent as Application Accent
<br>
<small>Force the application to use your operating systems' accent.</small>
</div>
<div class="md-option-segment md-option-segment_auto">
<input type="checkbox" v-model="prefs.visual.useOperatingSystemAccent" switch/>
</div>
</div>
<div class="md-option-line">
<div class="md-option-segment">
Remove Scrollbars
</div>
<div class="md-option-segment md-option-segment_auto">
<input type="checkbox" v-model="prefs.visual.removeScrollbars" switch/>
</div>
</div>
</div>
</div>
<div class="md-footer">
<button class="md-btn" @click="page = 'region'">Back</button>
<button class="md-btn md-btn-primary" @click="page = 'otherSettings'">Continue</button>
</div>
</div>
</template>
</transition>
<transition name="fade">
<template v-if="page == 'otherSettings'">
<div class="md-container">
<div class="md-header">
<h1 class="md-h1">Other Settings</h1>
</div>
<div class="md-body" style="overflow-y:overlay;">
<div class="md-option-container">
<div class="md-option-line">
<div class="md-option-segment">
Audio Quality
</div>
<div class="md-option-segment md-option-segment_auto">
<select v-model="prefs.audio.audioQuality" class="md-select" style="width:180px;">
<option value='auto'>Automatic</option>
<option value='extreme'>Extreme (990kbps)</option>
<option value='high'>High (256kbps)</option>
<option value='standard'>Standard (64kbps)</option>
</select>
</div>
</div>
<div class="md-option-line">
<div class="md-option-segment">
Seamless Audio Transitions
<br>
<small>Reduces or completely removes the delay between songs providing a smooth audio
experience.</small>
</div>
<div class="md-option-segment md-option-segment_auto">
<input type="checkbox" v-model="prefs.audio.seamlessAudioTransitions" switch/>
</div>
</div>
<div class="md-option-line">
<div class="md-option-segment">
Discord Rich Presence
</div>
<div class="md-option-segment md-option-segment_auto">
<select class="md-select" v-model="prefs.general.discordRPC" style="width:180px;">
<option value="">Disabled</option>
<option value="am-title">Enabled as "Apple Music"</option>
<option value="ame-title">Enabled as "Apple Music Electron"</option>
</select>
</div>
</div>
<div class="md-option-line">
<div class="md-option-segment">
Close button should minimize Apple Music Electron
</div>
<div class="md-option-segment md-option-segment_auto">
<input type="checkbox" v-model="prefs.window.closeButtonMinimize" switch/>
</div>
</div>
<div class="md-option-line">
<div class="md-option-segment">
Enable Musixmatch Lyrics
<br>
<small>Less stable, but allows for lyrics translation and better lyrics
detection.</small>
</div>
<div class="md-option-segment md-option-segment_auto">
<input type="checkbox" v-model="prefs.visual.mxmon" switch/>
</div>
</div>
<div class="md-option-line" v-if="false">
<div class="md-option-segment">
Enable YouTube Lyrics (for Music Videos)
<br>
<small>(Not Recommended) Better timings and lyrics availability on some Music Videos,
however can be inconsistent.</small>
</div>
<div class="md-option-segment md-option-segment_auto">
<input type="checkbox" v-model="prefs.visual.yton" switch/>
</div>
</div>
<div class="md-option-line" v-if="prefs.visual.yton || prefs.visual.mxmon">
<div class="md-option-segment">
Musixmatch Lyrics / Youtube Lyrics Translation Language
</div>
<div class="md-option-segment md-option-segment_auto">
<select v-model="prefs.visual.mxmlanguage" class="md-select" style="width:180px;">
<option value='disabled'>Disabled</option>
<option value='ab'>Abkhazian</option>
<option value='aa'>Afar</option>
<option value='af'>Afrikaans</option>
<option value='ak'>Akan</option>
<option value='sq'>Albanian</option>
<option value='am'>Amharic</option>
<option value='ar'>Arabic</option>
<option value='an'>Aragonese</option>
<option value='hy'>Armenian</option>
<option value='as'>Assamese</option>
<option value='a5'>Assamese-romaji</option>
<option value='a3'>Asturian</option>
<option value='av'>Avaric</option>
<option value='ae'>Avestan</option>
<option value='ay'>Aymara</option>
<option value='az'>Azerbaijani</option>
<option value='bm'>Bambara</option>
<option value='ba'>Bashkir</option>
<option value='eu'>Basque</option>
<option value='b1'>Bavarian</option>
<option value='be'>Belarusian</option>
<option value='bn'>Bengali</option>
<option value='b5'>Bengali-romaji</option>
<option value='bh'>Bihari languages</option>
<option value='b3'>Bishnupriya</option>
<option value='bi'>Bislama</option>
<option value='bs'>Bosnian</option>
<option value='br'>Breton</option>
<option value='bg'>Bulgarian</option>
<option value='my'>Burmese</option>
<option value='ca'>Catalan</option>
<option value='c2'>Cebuano</option>
<option value='b2'>Central bikol</option>
<option value='c3'>Central kurdish</option>
<option value='ch'>Chamorro</option>
<option value='c1'>Chavacano</option>
<option value='ce'>Chechen</option>
<option value='ny'>Chichewa</option>
<option value='zh'>Chinese (simplified)</option>
<option value='z1'>Chinese (traditional)</option>
<option value='rz'>Chinese-romaji</option>
<option value='cu'>Church slavic</option>
<option value='cv'>Chuvash</option>
<option value='kw'>Cornish</option>
<option value='co'>Corsican</option>
<option value='cr'>Cree</option>
<option value='c4'>Creoles and pidgins</option>
<option value='c5'>Creoles and pidgins, english based</option>
<option value='c6'>Creoles and pidgins, french-based</option>
<option value='c7'>Creoles and pidgins, portuguese-based</option>
<option value='hr'>Croatian</option>
<option value='cs'>Czech</option>
<option value='da'>Danish</option>
<option value='d1'>Dimli (individual language)</option>
<option value='dv'>Divehi</option>
<option value='d3'>Dotyali</option>
<option value='nl'>Dutch</option>
<option value='dz'>Dzongkha</option>
<option value='m2'>Eastern mari</option>
<option value='a2'>Egyptian arabic</option>
<option value='e1'>Emilian-romagnol</option>
<option value='en'>English</option>
<option value='m6'>Erzya</option>
<option value='eo'>Esperanto</option>
<option value='et'>Estonian</option>
<option value='ee'>Ewe</option>
<option value='fo'>Faroese</option>
<option value='h1'>Fiji hindi</option>
<option value='fj'>Fijian</option>
<option value='f1'>Filipino</option>
<option value='fi'>Finnish</option>
<option value='fr'>French</option>
<option value='f2'>Frisian, northern</option>
<option value='fy'>Frisian, western</option>
<option value='ff'>Fulah</option>
<option value='gl'>Galician</option>
<option value='lg'>Ganda</option>
<option value='ka'>Georgian</option>
<option value='de'>German</option>
<option value='n2'>German, low</option>
<option value='g1'>Goan konkani</option>
<option value='el'>Greek</option>
<option value='e2'>Greek-romaji</option>
<option value='kl'>Greenlandic</option>
<option value='gn'>Guarani</option>
<option value='gu'>Gujarati</option>
<option value='g2'>Gujarati-romaji</option>
<option value='ht'>Haitian creole</option>
<option value='ha'>Hausa</option>
<option value='he'>Hebrew</option>
<option value='hz'>Herero</option>
<option value='hi'>Hindi</option>
<option value='h3'>Hindi-romaji</option>
<option value='ho'>Hiri motu</option>
<option value='hu'>Hungarian</option>
<option value='is'>Icelandic</option>
<option value='io'>Ido</option>
<option value='ig'>Igbo</option>
<option value='i1'>Iloko</option>
<option value='id'>Indonesian</option>
<option value='ia'>Interlingua</option>
<option value='ie'>Interlingue</option>
<option value='iu'>Inuktitut</option>
<option value='ik'>Inupiaq</option>
<option value='ga'>Irish</option>
<option value='it'>Italian</option>
<option value='ja'>Japanese</option>
<option value='rj'>Japanese-romaji</option>
<option value='jv'>Javanese</option>
<option value='x1'>Kalmyk</option>
<option value='kn'>Kannada</option>
<option value='k2'>Kannada-romaji</option>
<option value='kr'>Kanuri</option>
<option value='k1'>Karachay-balkar</option>
<option value='ks'>Kashmiri</option>
<option value='kk'>Kazakh</option>
<option value='km'>Khmer, central</option>
<option value='ki'>Kikuyu</option>
<option value='rw'>Kinyarwanda</option>
<option value='ky'>Kirghiz</option>
<option value='kv'>Komi</option>
<option value='kg'>Kongo</option>
<option value='ko'>Korean</option>
<option value='rk'>Korean-romaji</option>
<option value='kj'>Kuanyama</option>
<option value='ku'>Kurdish</option>
<option value='lo'>Lao</option>
<option value='la'>Latin</option>
<option value='lv'>Latvian</option>
<option value='l1'>Lezghian</option>
<option value='li'>Limburgish</option>
<option value='ln'>Lingala</option>
<option value='lt'>Lithuanian</option>
<option value='j1'>Lojban</option>
<option value='l2'>Lombard</option>
<option value='lu'>Luba-katanga</option>
<option value='lb'>Luxembourgish</option>
<option value='mk'>Macedonian</option>
<option value='m1'>Maithili</option>
<option value='mg'>Malagasy</option>
<option value='ms'>Malay</option>
<option value='ml'>Malayalam</option>
<option value='m8'>Malayalam-romaji</option>
<option value='mt'>Maltese</option>
<option value='gv'>Manx</option>
<option value='mi'>Maori</option>
<option value='mr'>Marathi</option>
<option value='m9'>Marathi-romaji</option>
<option value='mh'>Marshallese</option>
<option value='m7'>Mazanderani</option>
<option value='m3'>Minangkabau</option>
<option value='x2'>Mingrelian</option>
<option value='m5'>Mirandese</option>
<option value='mo'>Moldavian</option>
<option value='mn'>Mongolian</option>
<option value='n4'>Nahuatl</option>
<option value='na'>Nauru</option>
<option value='nv'>Navajo</option>
<option value='nd'>Ndebele, north</option>
<option value='nr'>Ndebele, south</option>
<option value='ng'>Ndonga</option>
<option value='n1'>Neapolitan</option>
<option value='n3'>Nepal bhasa</option>
<option value='ne'>Nepali</option>
<option value='n5'>Nepali-romaji</option>
<option value='l3'>Northern luri</option>
<option value='no'>Norwegian</option>
<option value='nb'>Norwegian bokmål</option>
<option value='nn'>Norwegian nynorsk</option>
<option value='oc'>Occitan</option>
<option value='oj'>Ojibwa</option>
<option value='or'>Oriya</option>
<option value='o1'>Oriya-romaji</option>
<option value='om'>Oromo</option>
<option value='os'>Ossetian</option>
<option value='pi'>Pali</option>
<option value='p1'>Pampanga</option>
<option value='pa'>Panjabi</option>
<option value='p5'>Panjabi-romaji</option>
<option value='fa'>Persian</option>
<option value='p2'>Pfaelzisch</option>
<option value='p3'>Piemontese</option>
<option value='pl'>Polish</option>
<option value='pt'>Portuguese</option>
<option value='ps'>Pushto</option>
<option value='qu'>Quechua</option>
<option value='ro'>Romanian</option>
<option value='rm'>Romansh</option>
<option value='rn'>Rundi</option>
<option value='b4'>Russia buriat</option>
<option value='ru'>Russian</option>
<option value='r2'>Russian-romaji</option>
<option value='r1'>Rusyn</option>
<option value='se'>Sami, northern</option>
<option value='sm'>Samoan</option>
<option value='sg'>Sango</option>
<option value='sa'>Sanskrit</option>
<option value='s4'>Sanskrit-romaji</option>
<option value='sc'>Sardinian</option>
<option value='s3'>Scots</option>
<option value='gd'>Scottish gaelic</option>
<option value='sr'>Serbian</option>
<option value='sh'>Serbo-croatian</option>
<option value='sn'>Shona</option>
<option value='ii'>Sichuan yi</option>
<option value='s2'>Sicilian</option>
<option value='sd'>Sindhi</option>
<option value='si'>Sinhala</option>
<option value='sk'>Slovak</option>
<option value='sl'>Slovenian</option>
<option value='so'>Somali</option>
<option value='d2'>Sorbian, lower</option>
<option value='h2'>Sorbian, upper</option>
<option value='st'>Sotho, southern</option>
<option value='a4'>South azerbaijani</option>
<option value='es'>Spanish</option>
<option value='su'>Sundanese</option>
<option value='sw'>Swahili</option>
<option value='ss'>Swati</option>
<option value='sv'>Swedish</option>
<option value='tl'>Tagalog</option>
<option value='ty'>Tahitian</option>
<option value='tg'>Tajik</option>
<option value='ta'>Tamil</option>
<option value='t2'>Tamil-romaji</option>
<option value='tt'>Tatar</option>
<option value='te'>Telugu</option>
<option value='t3'>Telugu-romaji</option>
<option value='th'>Thai</option>
<option value='t4'>Thai-romaji</option>
<option value='bo'>Tibetan</option>
<option value='ti'>Tigrinya</option>
<option value='to'>Tonga (tonga islands)</option>
<option value='a1'>Tosk albanian</option>
<option value='ts'>Tsonga</option>
<option value='tn'>Tswana</option>
<option value='tr'>Turkish</option>
<option value='tk'>Turkmen</option>
<option value='t1'>Tuvinian</option>
<option value='tw'>Twi</option>
<option value='ug'>Uighur</option>
<option value='uk'>Ukrainian</option>
<option value='ur'>Urdu</option>
<option value='u1'>Urdu-romaji</option>
<option value='uz'>Uzbek</option>
<option value='ve'>Venda</option>
<option value='v1'>Venetian</option>
<option value='v2'>Veps</option>
<option value='vi'>Vietnamese</option>
<option value='v3'>Vlaams</option>
<option value='vo'>Volapük</option>
<option value='wa'>Walloon</option>
<option value='w1'>Waray</option>
<option value='cy'>Welsh</option>
<option value='m4'>Western mari</option>
<option value='p4'>Western panjabi</option>
<option value='wo'>Wolof</option>
<option value='w2'>Wu chinese</option>
<option value='xh'>Xhosa</option>
<option value='s1'>Yakut</option>
<option value='yi'>Yiddish</option>
<option value='yo'>Yoruba</option>
<option value='y1'>Yue chinese</option>
<option value='za'>Zhuang</option>
<option value='zu'>Zulu</option>
</select>
</div>
</div>
</div>
</div>
<div class="md-footer">
<button class="md-btn" @click="page = 'theme'">Back</button>
<button class="md-btn md-btn-primary" @click="page = 'statistics'">Continue</button>
</div>
</div>
</template>
</transition>
<transition name="fade">
<template v-if="page == 'statistics'">
<div class="md-container">
<div class="md-header">
<h1 class="md-h1">Statistics</h1>
</div>
<div class="md-body" style="height: auto;display:flex;align-items: center;justify-content: center;">
<p>
These logs when enabled allow us to fix bugs and
errors that may occur during your listening sessions to better improve the application. We
understand if you're not comfortable with them on, but it helps us out immensely in figuring out
widespread issues. (Note: We do not gather personal information, only stuff that shows to you as
an
error in the code.)
</p>
</div>
<div class="md-body" style="display:flex;align-items: center;justify-content: center;">
<div class="md-option-container" style="width:100%;">
<div class="md-option-line">
<div class="md-option-segment">
Allow statistics to be collected when errors or crashes
occur
</div>
<div class="md-option-segment md-option-segment_auto">
<input type="checkbox" v-model="prefs.general.analyticsEnabled" switch/>
</div>
</div>
</div>
</div>
<div class="md-footer">
<button class="md-btn" @click="page = 'otherSettings'">Back</button>
<button class="md-btn md-btn-primary" @click="page = 'credits'">Continue</button>
</div>
</div>
</template>
</transition>
<transition name="fade">
<template v-if="page == 'credits'">
<div class="md-container">
<div class="md-header">
<h1 class="md-h1">Credits</h1>
</div>
<div class="md-body">
<div style="display: block;" class="dt-footer__copyright dt-flex-container">
<p>"Apple Music" - Copyright © 2021 <a href="https://www.apple.com/" class="dt-footer__link"
target="_blank"
rel="noopener" data-dt-link-to-exclude="">Apple Inc.</a>
All Rights
Reserved.</p>
<p>Major thanks to the <a href="https://github.com/Apple-Music-Electron" class="dt-footer__link"
target="_blank" rel="noopener" data-dt-link-to-exclude=""> Apple Music
Electron Team</a> and to all of our <a
href="https://github.com/Apple-Music-Electron/Apple-Music-Electron/graphs/contributors"
class="dt-footer__link" target="_blank" rel="noopener" data-dt-link-to-exclude="">contributors</a>.
</p>
<div class="dt-footer__locale"></div>
</div>
<ul class="dt-footer__list dt-flex-container">
<li class="dt-footer__item">
<a href="https://github.com/Apple-Music-Electron" class="dt-footer__link" target="_blank"
rel="noopener" data-dt-link-to-exclude="">Development Team</a>
<ul>
<li class="dt-footer__list-item"><a href="#"
onclick="window.open('https://github.com/cryptofyre')">cryptofyre</a>
</li>
<li class="dt-footer__list-item"><a href="#"
onclick="window.open('https://github.com/coredev-uk')">Core</a>
</li>
<li class="dt-footer__list-item"><a href="#"
onclick="window.open('https://github.com/child-duckling')">Quacksire</a>
</li>
<li class="dt-footer__list-item"><a href="#"
onclick="window.open('https://github.com/booploops')">booploops</a>
</li>
<li class="dt-footer__list-item"><a href="#"
onclick="window.open('https://github.com/vapormusic')">vapormusic</a>
</li>
</ul>
</li>
<li class="dt-footer__item" style="margin: 20px auto 0 auto;">
<p class="dt-footer__link">Social Communications Team</p>
<ul>
<li class="dt-footer__list-item"><a href="#"
onclick="window.open('https://twitter.com/MoonyVoid')">Void</a>
</li>
<li class="dt-footer__list-item"><a href="#"
onclick="window.open('https://twitter.com/noah_grose')">NoseySG</a>
</li>
</ul>
</li>
</ul>
</div>
<div class="md-body" style="display:flex;justify-content: center;align-content: center;">
<img class="md-contributors"
onclick="window.open('https://github.com/Apple-Music-Electron/Apple-Music-Electron/graphs/contributors')"
src="https://contrib.rocks/image?repo=Apple-Music-Electron/Apple-Music-Electron"/>
</div>
<div class="md-footer">
<button class="md-btn" @click="page = 'otherSettings'">Back</button>
<button class="md-btn md-btn-primary" @click="close()">Done</button>
</div>
</div>
</template>
</transition>
<transition name="fade">
<template v-if="page == 'template'">
<div class="md-container">
<div class="md-header">
<h1 class="md-h1">Header</h1>
</div>
<div class="md-body">
body content
</div>
<div class="md-footer">
<button class="md-btn">Back</button>
<button class="md-btn md-btn-primary">Continue</button>
</div>
</div>
</template>
</transition>
</div>
<style>
.md-video {
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
object-fit: cover;
pointer-events: none;
}
.md-contributors {
display: block;
object-fit: contain;
padding: 20px;
width: 90%;
max-width: 900px;
transition: all .25s var(--appleEase);
border-radius: 10px;
box-shadow: 0px 0px 0px rgb(0 0 0 / 25%);
background: rgb(200 200 200 / 10%);
will-change: transform;
cursor: pointer;
}
.md-contributors:hover {
transform: scale(1.02);
background: #eee;
box-shadow: 0px 10px 10px rgb(0 0 0 / 25%);
}
#oobe-vue {
height: 100%;
}
</style>

View file

@ -1,23 +0,0 @@
<div class="md-container" id="outputdevices-vue">
<div class="md-header">
<h1 class="md-h1">Output Device</h1>
</div>
<div class="md-body" style="overflow-y: overlay">
<div class="md-option-container">
<div class="md-option-line" v-for="(device) in devices">
<template v-if="selected == device.deviceId">
<div class="md-option-segment" style="cursor: pointer;background: var(--keyColor);color: white;">
▶ {{ device.label }}
</div>
</template>
<template v-else>
<div class="md-option-segment" @click="setOutputDevice(device.deviceId)" style="cursor: pointer">
{{ device.label }}
</div>
</template>
</div>
</div>
</div>
<div class="md-footer">
</div>
</div>

View file

@ -1,31 +0,0 @@
<button class="typography-title-3-tall" data-test-ls-footer-btn="" disabled="" type="button">Credits</button>
<div class="dt-footer-contents-container">
<div style="display: block;" class="dt-footer__copyright dt-flex-container">
<p>Copyright © 2021 <a href="https://www.apple.com/" class="dt-footer__link" target="_blank" rel="noopener" data-dt-link-to-exclude="">Apple Inc.</a> All Rights Reserved.</p>
<p>Major thanks to the <a href="https://github.com/Apple-Music-Electron" class="dt-footer__link" target="_blank" rel="noopener" data-dt-link-to-exclude=""> Apple Music Electron Team</a> and to all of our <a href="https://github.com/Apple-Music-Electron/Apple-Music-Electron/graphs/contributors" class="dt-footer__link" target="_blank" rel="noopener" data-dt-link-to-exclude="">contributors</a>.</p>
<div class="dt-footer__locale"></div>
</div>
<ul class="dt-footer__list dt-flex-container">
<li class="dt-footer__item">
<a href="https://github.com/Apple-Music-Electron" class="dt-footer__link" target="_blank" rel="noopener" data-dt-link-to-exclude="">Development Team</a>
<ul>
<li class="dt-footer__list-item"><a href="#" onclick="window.open('https://github.com/cryptofyre')">cryptofyre</a></li>
<li class="dt-footer__list-item"><a href="#" onclick="window.open('https://github.com/coredev-uk')">Core</a></li>
<li class="dt-footer__list-item"><a href="#" onclick="window.open('https://github.com/child-duckling')">Quacksire</a></li>
<li class="dt-footer__list-item"><a href="#" onclick="window.open('https://github.com/booploops')">booploops</a></li>
<li class="dt-footer__list-item"><a href="#" onclick="window.open('https://github.com/vapormusic')">vapormusic</a></li>
</ul>
</li>
<li class="dt-footer__item" style="margin: 20px auto 0 auto;">
<p class="dt-footer__link">Social Communications Team</p>
<ul>
<li class="dt-footer__list-item"><a href="#" onclick="window.open('https://twitter.com/MoonyVoid')">Void</a></li>
<li class="dt-footer__list-item"><a href="#" onclick="window.open('https://twitter.com/noah_grose')">NoseySG</a></li>
</ul>
</li>
</ul>
</div>

View file

@ -1,768 +0,0 @@
<div class="application-preferences">
<div class="app-prefs-section general">
<div class="app-prefs-title header-nav" style="height: 10px;">
<div class="header-nav-content">
<h1 class="typography-header-emphasized">General Settings</h1>
</div>
</div>
<ul class="settings-list general">
<li class="app-prefs-toggle">
<span class="typography-title-3-tall">Incognito Mode</span>
<label class="toggle-element list-element">
<input checked id="incognitoMode" type="checkbox">
<span class="slider"></span>
</label>
<span class="app-prefs-help typography-title-3-tall">Music played in this app will not be viewable by your followers on Apple Music and will no longer influence the recommendations you get in 'Listen Now'.
This will also disable updates to various additions in the application. (Such as DiscordRPC and LastFM).</span>
</li>
<li class="app-prefs-dropdown">
<label class="typography-title-3-tall" for="playbackNotifications">Show notifications on Song
Change</label>
<select class="form-dropdown-select list-element" id="playbackNotifications"
name="playbackNotifications">
<option disabled>Select one</option>
<option value=''>Disabled</option>
<option value=true>Enabled</option>
<option value='minimized'>Enabled (Notifications when Minimized)</option>
</select>
<span class="app-prefs-help typography-title-3-tall">Enabling this means you will get notifications when
you change song. The minimized option forces notifications to only appear if the app is hidden /
minimized.</span>
</li>
<li class="app-prefs-toggle">
<span class="typography-title-3-tall">Show song name as tray icon tooltip</span>
<label class="toggle-element list-element">
<input checked id="trayTooltipSongName" type="checkbox">
<span class="slider"></span>
</label>
<span class="app-prefs-help typography-title-3-tall">Enabling this option allows you to see the song
name in the tooltip on the taskbar when the application is minimized to the tray.</span>
</li>
<li class="app-prefs-dropdown">
<label class="typography-title-3-tall" for="startupPage">Startup page</label>
<select class="form-dropdown-select list-element" id="startupPage" name="startupPage">
<option disabled>Select one</option>
<option value='browse'>Browse</option>
<option value='listen-now'>Listen now</option>
<option value='radio'>Radio</option>
<option value='library/recently-added'>Recently Added</option>
<option value='library/albums'>Albums</option>
<option value='library/songs'>Songs</option>
<option value='library/made-for-you'>Made for You</option>
</select>
<span class="app-prefs-help typography-title-3-tall">Select what page you wish to be placed on when you
start the application.</span>
</li>
<li class="app-prefs-toggle">
<span class="typography-title-3-tall">Allow statistics to be collected when errors or crashes
occur</span>
<label class="toggle-element list-element">
<input checked id="analyticsEnabled" type="checkbox">
<span class="slider"></span>
</label>
<span class="app-prefs-help typography-title-3-tall">These logs when enabled allow us to fix bugs and
errors that may occur during your listening sessions to better improve the application. We
understand if you're not comfortable with them on, but it helps us out immensely in figuring out
widespread issues. (Note: We do not gather personal information, only stuff that shows to you as an
error in the code.)</span>
</li>
<li class="app-prefs-divider header-nav">
<h2 class="shelf-title">Discord Rich Presence</h2>
<span class="app-prefs-help typography-title-3-tall">These settings are for managing how you display
your status on Discord. You must have 'Display current activity as status message.' turned on in
your Discord settings for the song to be shown.</span>
</li>
<li class="app-prefs-dropdown">
<label class="typography-title-3-tall" for="discordRPC">Display song data as activity on Discord</label>
<select class="form-dropdown-select list-element" id="discordRPC" name="discordRPC">
<option disabled>Select one</option>
<option value='am-title'>Enabled (Display 'Apple Music' as title)</option>
<option value='ame-title'>Enabled (Display 'Apple Music Electron' as title)</option>
<option value=''>Disabled</option>
</select>
</li>
<li class="app-prefs-toggle">
<span class="typography-title-3-tall">Clear activity on pause</span>
<label class="toggle-element list-element">
<input checked id="discordClearActivityOnPause" type="checkbox">
<span class="slider"></span>
</label>
<span class="app-prefs-help typography-title-3-tall">With this disabled your status will show a
Pause/Play icon whenever you are playing or have a song paused. When you enable this, it is replaced
with a branch icon (Nightly / Stable) and a version title when you hover.</span>
</li>
<li class="app-prefs-divider header-nav">
<h2 class="shelf-title">LastFM</h2>
</li>
<li class="app-prefs-button">
<span class="typography-title-3-tall">LastFM Account</span>
<label class="list-button list-element" id="lfmConnect"
onclick="AMSettings.lastfm.LastFMAuthenticate()">Connect</label>
</li>
<li class="app-prefs-toggle">
<span class="typography-title-3-tall">Remove featuring artists from song title</span>
<label class="toggle-element list-element">
<input checked id="lastfmRemoveFeaturingArtists" type="checkbox">
<span class="slider"></span>
</label>
<span class="app-prefs-help typography-title-3-tall">Enabling this will remove the featuring artists
from the scrobbled data, meaning on LastFM only the primary artist will be shown.</span>
</li>
<li class="app-prefs-toggle">
<span class="typography-title-3-tall">Enable now playing</span>
<label class="toggle-element list-element">
<input checked id="lastfmNowPlaying" type="checkbox">
<span class="slider"></span>
</label>
<span class="app-prefs-help typography-title-3-tall">Enabling this will display what song you are
playing on LastFM.</span>
</li>
<li class="app-prefs-dropdown">
<label class="typography-title-3-tall" for="lastfmScrobbleDelay">Scrobble delay</label>
<input class="form-dropdown-select list-element" id="lastfmScrobbleDelay" name="lastfmScrobbleDelay"
type="number"/>
<span class="app-prefs-help typography-title-3-tall">Sets the wait time before current song is added to scrobble list.</span>
</li>
</ul>
</div>
<div class="app-prefs-section visual">
<div class="app-prefs-title header-nav" style="height: 10px;">
<div class="header-nav-content">
<h1 class="typography-header-emphasized">Appearance</h1>
</div>
</div>
<ul class="settings-list visual">
<li class="app-prefs-dropdown">
<label class="typography-title-3-tall" for="theme">Theme</label>
<select class="form-dropdown-select list-element" id="theme" name="theme">
<option disabled>Select one</option>
<option value='default'>Default</option>
</select>
<span class="app-prefs-help typography-title-3-tall">You will need to restart the application in order
for the default themes to be populated. You can preview all the themes <a href="#"
onclick="window.open('https://github.com/Apple-Music-Electron/Apple-Music-Electron/wiki/Theme-Preview-Images')">here</a>.</span>
</li>
<li class="app-prefs-button">
<span class="typography-title-3-tall">Theme Options</span>
<label class="list-button list-element" id="themeOptions"
onclick="AMStyling.showThemeOptions()">Theme Options</label>
<span class="app-prefs-help typography-title-3-tall">Configure the selected theme</span>
</li>
<li class="app-prefs-button">
<span class="typography-title-3-tall">Update Themes</span>
<label class="list-button list-element" id="updateThemes"
onclick="AMSettings.themes.updateThemes()">Update Themes</label>
<span class="app-prefs-help typography-title-3-tall" style="color: var(--systemRed);">Running this will
delete the 'themes' directory. If you have made a theme, store it elsewhere until it says
Updated.</span>
</li>
<li class="app-prefs-dropdown">
<label class="typography-title-3-tall" for="frameType">Application Frame</label>
<select class="form-dropdown-select list-element" id="frameType" name="frameType">
<option disabled>Select one</option>
<option value=''>Disabled</option>
<option value='mac-right'>macOS Emulation (Right)</option>
<option value='mac'>macOS Emulation</option>
</select>
<span class="app-prefs-help typography-title-3-tall">macOS Emulation shows the 'stoplights' that are
well known for all macOS users and adjusts other UI elements to resemble the macOS Music App.
Selecting the right option shows a more Windows-like representation with the stoplights replacing
the usual close, minimize and maximize buttons. For macOS users its suggested that you disable this
for the best experience. Having this disabled will make the application use the operating system's
frame.</span>
</li>
<li class="app-prefs-divider header-nav">
<h2 class="shelf-title">Transparency Configuration</h2>
<span class="app-prefs-help typography-title-3-tall">Here you can configure the transparency options for
the window. Transparency only works on certain systems, so read the descriptions of each setting. It
is not advised to use transparency on platforms other than Windows or macOS.</span>
</li>
<li class="app-prefs-dropdown">
<label class="typography-title-3-tall" for="transparencyEffect">Transparency Effect</label>
<select class="form-dropdown-select list-element" id="transparencyEffect" name="transparencyEffect">
<option disabled>Select one</option>
<option value=''>Disabled</option>
<option value='blur'>Blur Behind</option>
</select>
<span class="app-prefs-help typography-title-3-tall">Sets the type of Windows transparency effect,
either 'acrylic', 'blur' or leave it empty to disable it. Changing the transparency blur type can
improve performance and compatibility with older hardware and systems.</span>
</li>
<li class="app-prefs-dropdown">
<label class="typography-title-3-tall" for="transparencyTheme">Transparency Theme</label>
<input class="form-dropdown-select list-element" id="transparencyTheme" name="transparencyTheme"/>
<span class="app-prefs-help typography-title-3-tall">Sets color of acrylic effect. Can be 'light',
'dark', 'appearance-based' or a hex color code with alpha ('#0f0f0f00').</span>
</li>
<li class="app-prefs-toggle" id="transparencyDisableBlurToggleLI">
<span class="typography-title-3-tall">Disable Transparency when Unfocused (Acrylic Only)</span>
<label class="toggle-element list-element">
<input checked id="transparencyDisableBlur" type="checkbox">
<span class="slider"></span>
</label>
<span class="app-prefs-help typography-title-3-tall">If enabled, acrylic effect will be disabled when
the window loses focus, to mimic the behaviour of normal UWP apps.</span>
</li>
<li class="app-prefs-dropdown">
<label class="typography-title-3-tall" for="transparencyMaximumRefreshRate">Use Custom Window Refresh
Rate</label>
<select class="form-dropdown-select list-element" id="transparencyMaximumRefreshRate"
name="transparencyMaximumRefreshRate">
<option disabled>Select one</option>
<option value=''>Disabled</option>
<option value='30'>30</option>
<option value='60'>60</option>
<option value='144'>144</option>
<option value='175'>175</option>
<option value='240'>240</option>
<option value='360'>30</option>
</select>
<span class="app-prefs-help typography-title-3-tall">Use custom window resize/move handler for
performance. You can set the maximum refresh rate that the application uses. Disabled would default
to 60hz.</span>
</li>
<li class="app-prefs-divider header-nav">
<h2 class="shelf-title">Lyrics</h2>
</li>
<li class="app-prefs-toggle">
<span class="typography-title-3-tall">Enable Musixmatch Lyrics</span>
<label class="toggle-element list-element">
<input checked id="mxmon" type="checkbox">
<span class="slider"></span>
</label>
<span class="app-prefs-help typography-title-3-tall">Less stable, but allows for lyrics translation and
better lyrics detection</span>
</li>
<li class="app-prefs-toggle">
<span class="typography-title-3-tall">Enable Youtube Lyrics (MVs only)</span>
<label class="toggle-element list-element">
<input checked id="yton" type="checkbox">
<span class="slider"></span>
</label>
<span class="app-prefs-help typography-title-3-tall">(NOT RECOMMENDED!) Better timings on some Music Video, also better lyrics on Selected Tracks (e.g JP AMVs)</span>
</li>
<li class="app-prefs-dropdown">
<label class="typography-title-3-tall" for="mxmlanguage">Lyrics translation language</label>
<select class="form-dropdown-select list-element" id="mxmlanguage" name="mxmlanguage">
<option value='disabled'>Disabled</option>
<option value='ab'>Abkhazian</option>
<option value='aa'>Afar</option>
<option value='af'>Afrikaans</option>
<option value='ak'>Akan</option>
<option value='sq'>Albanian</option>
<option value='am'>Amharic</option>
<option value='ar'>Arabic</option>
<option value='an'>Aragonese</option>
<option value='hy'>Armenian</option>
<option value='as'>Assamese</option>
<option value='a5'>Assamese-romaji</option>
<option value='a3'>Asturian</option>
<option value='av'>Avaric</option>
<option value='ae'>Avestan</option>
<option value='ay'>Aymara</option>
<option value='az'>Azerbaijani</option>
<option value='bm'>Bambara</option>
<option value='ba'>Bashkir</option>
<option value='eu'>Basque</option>
<option value='b1'>Bavarian</option>
<option value='be'>Belarusian</option>
<option value='bn'>Bengali</option>
<option value='b5'>Bengali-romaji</option>
<option value='bh'>Bihari languages</option>
<option value='b3'>Bishnupriya</option>
<option value='bi'>Bislama</option>
<option value='bs'>Bosnian</option>
<option value='br'>Breton</option>
<option value='bg'>Bulgarian</option>
<option value='my'>Burmese</option>
<option value='ca'>Catalan</option>
<option value='c2'>Cebuano</option>
<option value='b2'>Central bikol</option>
<option value='c3'>Central kurdish</option>
<option value='ch'>Chamorro</option>
<option value='c1'>Chavacano</option>
<option value='ce'>Chechen</option>
<option value='ny'>Chichewa</option>
<option value='zh'>Chinese (simplified)</option>
<option value='z1'>Chinese (traditional)</option>
<option value='rz'>Chinese-romaji</option>
<option value='cu'>Church slavic</option>
<option value='cv'>Chuvash</option>
<option value='kw'>Cornish</option>
<option value='co'>Corsican</option>
<option value='cr'>Cree</option>
<option value='c4'>Creoles and pidgins</option>
<option value='c5'>Creoles and pidgins, english based</option>
<option value='c6'>Creoles and pidgins, french-based</option>
<option value='c7'>Creoles and pidgins, portuguese-based</option>
<option value='hr'>Croatian</option>
<option value='cs'>Czech</option>
<option value='da'>Danish</option>
<option value='d1'>Dimli (individual language)</option>
<option value='dv'>Divehi</option>
<option value='d3'>Dotyali</option>
<option value='nl'>Dutch</option>
<option value='dz'>Dzongkha</option>
<option value='m2'>Eastern mari</option>
<option value='a2'>Egyptian arabic</option>
<option value='e1'>Emilian-romagnol</option>
<option value='en'>English</option>
<option value='m6'>Erzya</option>
<option value='eo'>Esperanto</option>
<option value='et'>Estonian</option>
<option value='ee'>Ewe</option>
<option value='fo'>Faroese</option>
<option value='h1'>Fiji hindi</option>
<option value='fj'>Fijian</option>
<option value='f1'>Filipino</option>
<option value='fi'>Finnish</option>
<option value='fr'>French</option>
<option value='f2'>Frisian, northern</option>
<option value='fy'>Frisian, western</option>
<option value='ff'>Fulah</option>
<option value='gl'>Galician</option>
<option value='lg'>Ganda</option>
<option value='ka'>Georgian</option>
<option value='de'>German</option>
<option value='n2'>German, low</option>
<option value='g1'>Goan konkani</option>
<option value='el'>Greek</option>
<option value='e2'>Greek-romaji</option>
<option value='kl'>Greenlandic</option>
<option value='gn'>Guarani</option>
<option value='gu'>Gujarati</option>
<option value='g2'>Gujarati-romaji</option>
<option value='ht'>Haitian creole</option>
<option value='ha'>Hausa</option>
<option value='he'>Hebrew</option>
<option value='hz'>Herero</option>
<option value='hi'>Hindi</option>
<option value='h3'>Hindi-romaji</option>
<option value='ho'>Hiri motu</option>
<option value='hu'>Hungarian</option>
<option value='is'>Icelandic</option>
<option value='io'>Ido</option>
<option value='ig'>Igbo</option>
<option value='i1'>Iloko</option>
<option value='id'>Indonesian</option>
<option value='ia'>Interlingua</option>
<option value='ie'>Interlingue</option>
<option value='iu'>Inuktitut</option>
<option value='ik'>Inupiaq</option>
<option value='ga'>Irish</option>
<option value='it'>Italian</option>
<option value='ja'>Japanese</option>
<option value='rj'>Japanese-romaji</option>
<option value='jv'>Javanese</option>
<option value='x1'>Kalmyk</option>
<option value='kn'>Kannada</option>
<option value='k2'>Kannada-romaji</option>
<option value='kr'>Kanuri</option>
<option value='k1'>Karachay-balkar</option>
<option value='ks'>Kashmiri</option>
<option value='kk'>Kazakh</option>
<option value='km'>Khmer, central</option>
<option value='ki'>Kikuyu</option>
<option value='rw'>Kinyarwanda</option>
<option value='ky'>Kirghiz</option>
<option value='kv'>Komi</option>
<option value='kg'>Kongo</option>
<option value='ko'>Korean</option>
<option value='rk'>Korean-romaji</option>
<option value='kj'>Kuanyama</option>
<option value='ku'>Kurdish</option>
<option value='lo'>Lao</option>
<option value='la'>Latin</option>
<option value='lv'>Latvian</option>
<option value='l1'>Lezghian</option>
<option value='li'>Limburgish</option>
<option value='ln'>Lingala</option>
<option value='lt'>Lithuanian</option>
<option value='j1'>Lojban</option>
<option value='l2'>Lombard</option>
<option value='lu'>Luba-katanga</option>
<option value='lb'>Luxembourgish</option>
<option value='mk'>Macedonian</option>
<option value='m1'>Maithili</option>
<option value='mg'>Malagasy</option>
<option value='ms'>Malay</option>
<option value='ml'>Malayalam</option>
<option value='m8'>Malayalam-romaji</option>
<option value='mt'>Maltese</option>
<option value='gv'>Manx</option>
<option value='mi'>Maori</option>
<option value='mr'>Marathi</option>
<option value='m9'>Marathi-romaji</option>
<option value='mh'>Marshallese</option>
<option value='m7'>Mazanderani</option>
<option value='m3'>Minangkabau</option>
<option value='x2'>Mingrelian</option>
<option value='m5'>Mirandese</option>
<option value='mo'>Moldavian</option>
<option value='mn'>Mongolian</option>
<option value='n4'>Nahuatl</option>
<option value='na'>Nauru</option>
<option value='nv'>Navajo</option>
<option value='nd'>Ndebele, north</option>
<option value='nr'>Ndebele, south</option>
<option value='ng'>Ndonga</option>
<option value='n1'>Neapolitan</option>
<option value='n3'>Nepal bhasa</option>
<option value='ne'>Nepali</option>
<option value='n5'>Nepali-romaji</option>
<option value='l3'>Northern luri</option>
<option value='no'>Norwegian</option>
<option value='nb'>Norwegian bokmål</option>
<option value='nn'>Norwegian nynorsk</option>
<option value='oc'>Occitan</option>
<option value='oj'>Ojibwa</option>
<option value='or'>Oriya</option>
<option value='o1'>Oriya-romaji</option>
<option value='om'>Oromo</option>
<option value='os'>Ossetian</option>
<option value='pi'>Pali</option>
<option value='p1'>Pampanga</option>
<option value='pa'>Panjabi</option>
<option value='p5'>Panjabi-romaji</option>
<option value='fa'>Persian</option>
<option value='p2'>Pfaelzisch</option>
<option value='p3'>Piemontese</option>
<option value='pl'>Polish</option>
<option value='pt'>Portuguese</option>
<option value='ps'>Pushto</option>
<option value='qu'>Quechua</option>
<option value='ro'>Romanian</option>
<option value='rm'>Romansh</option>
<option value='rn'>Rundi</option>
<option value='b4'>Russia buriat</option>
<option value='ru'>Russian</option>
<option value='r2'>Russian-romaji</option>
<option value='r1'>Rusyn</option>
<option value='se'>Sami, northern</option>
<option value='sm'>Samoan</option>
<option value='sg'>Sango</option>
<option value='sa'>Sanskrit</option>
<option value='s4'>Sanskrit-romaji</option>
<option value='sc'>Sardinian</option>
<option value='s3'>Scots</option>
<option value='gd'>Scottish gaelic</option>
<option value='sr'>Serbian</option>
<option value='sh'>Serbo-croatian</option>
<option value='sn'>Shona</option>
<option value='ii'>Sichuan yi</option>
<option value='s2'>Sicilian</option>
<option value='sd'>Sindhi</option>
<option value='si'>Sinhala</option>
<option value='sk'>Slovak</option>
<option value='sl'>Slovenian</option>
<option value='so'>Somali</option>
<option value='d2'>Sorbian, lower</option>
<option value='h2'>Sorbian, upper</option>
<option value='st'>Sotho, southern</option>
<option value='a4'>South azerbaijani</option>
<option value='es'>Spanish</option>
<option value='su'>Sundanese</option>
<option value='sw'>Swahili</option>
<option value='ss'>Swati</option>
<option value='sv'>Swedish</option>
<option value='tl'>Tagalog</option>
<option value='ty'>Tahitian</option>
<option value='tg'>Tajik</option>
<option value='ta'>Tamil</option>
<option value='t2'>Tamil-romaji</option>
<option value='tt'>Tatar</option>
<option value='te'>Telugu</option>
<option value='t3'>Telugu-romaji</option>
<option value='th'>Thai</option>
<option value='t4'>Thai-romaji</option>
<option value='bo'>Tibetan</option>
<option value='ti'>Tigrinya</option>
<option value='to'>Tonga (tonga islands)</option>
<option value='a1'>Tosk albanian</option>
<option value='ts'>Tsonga</option>
<option value='tn'>Tswana</option>
<option value='tr'>Turkish</option>
<option value='tk'>Turkmen</option>
<option value='t1'>Tuvinian</option>
<option value='tw'>Twi</option>
<option value='ug'>Uighur</option>
<option value='uk'>Ukrainian</option>
<option value='ur'>Urdu</option>
<option value='u1'>Urdu-romaji</option>
<option value='uz'>Uzbek</option>
<option value='ve'>Venda</option>
<option value='v1'>Venetian</option>
<option value='v2'>Veps</option>
<option value='vi'>Vietnamese</option>
<option value='v3'>Vlaams</option>
<option value='vo'>Volapük</option>
<option value='wa'>Walloon</option>
<option value='w1'>Waray</option>
<option value='cy'>Welsh</option>
<option value='m4'>Western mari</option>
<option value='p4'>Western panjabi</option>
<option value='wo'>Wolof</option>
<option value='w2'>Wu chinese</option>
<option value='xh'>Xhosa</option>
<option value='s1'>Yakut</option>
<option value='yi'>Yiddish</option>
<option value='yo'>Yoruba</option>
<option value='y1'>Yue chinese</option>
<option value='za'>Zhuang</option>
<option value='zu'>Zulu</option>
</select>
<span class="app-prefs-help typography-title-3-tall">(Only when Musixmatch Lyrics / Youtube Lyrics is enabled) Select the
targeted language for translated lyrics</span>
</li>
<li class="app-prefs-divider header-nav">
<h2 class="shelf-title">Miscellaneous Options</h2>
<span class="app-prefs-help typography-title-3-tall">Various options allowing you to adjust the user
interface to your preference.</span>
</li>
<li class="app-prefs-toggle">
<span class="typography-title-3-tall">Streaming Mode</span>
<label class="toggle-element list-element">
<input checked id="streamerMode" type="checkbox">
<span class="slider"></span>
</label>
<span class="app-prefs-help typography-title-3-tall">Removes certain UI elements and has unique scaling
properties.</span>
</li>
<li class="app-prefs-toggle">
<span class="typography-title-3-tall">Remove Upsell</span>
<label class="toggle-element list-element">
<input checked id="removeUpsell" type="checkbox">
<span class="slider"></span>
</label>
<span class="app-prefs-help typography-title-3-tall">Removes the Open in iTunes and Exit Beta
Buttons.</span>
</li>
<li class="app-prefs-toggle">
<span class="typography-title-3-tall">Remove Apple Music Logo</span>
<label class="toggle-element list-element">
<input checked id="removeAppleLogo" type="checkbox">
<span class="slider"></span>
</label>
<span class="app-prefs-help typography-title-3-tall">Removes the Apple Music Logo and moves search bar
up.</span>
</li>
<li class="app-prefs-toggle">
<span class="typography-title-3-tall">Remove Footer</span>
<label class="toggle-element list-element">
<input checked id="removeFooter" type="checkbox">
<span class="slider"></span>
</label>
<span class="app-prefs-help typography-title-3-tall">Removes the Apple Music footer.</span>
</li>
<li class="app-prefs-toggle">
<span class="typography-title-3-tall">Remove Scrollbars</span>
<label class="toggle-element list-element">
<input checked id="removeScrollbars" type="checkbox">
<span class="slider"></span>
</label>
<span class="app-prefs-help typography-title-3-tall">Currently, the scrollbar is experimental and
incomplete. It is recommended to leave this on.</span>
</li>
<li class="app-prefs-toggle" id="useOperatingSystemAccentToggleLI">
<span class="typography-title-3-tall">Use OS Accent as Application Accent</span>
<label class="toggle-element list-element">
<input checked id="useOperatingSystemAccent" type="checkbox">
<span class="slider"></span>
</label>
<span class="app-prefs-help typography-title-3-tall">Force the application to use your operating
systems' accent.</span>
</li>
<li class="app-prefs-dropdown">
<label class="typography-title-3-tall" for="scaling">Interface Scaling Multiplier</label>
<input class="form-dropdown-select list-element" type="number" id="scaling" name="scaling" min="0.1"
max="4"/>
<span class="app-prefs-help typography-title-3-tall">Set the scale that you would like the interface sized at.</span>
</li>
</ul>
</div>
<div class="app-prefs-section audio">
<div class="app-prefs-title header-nav" style="height: 10px;">
<div class="header-nav-content">
<h1 class="typography-header-emphasized">Audio Settings</h1>
</div>
</div>
<ul class="settings-list audio">
<li class="app-prefs-dropdown">
<label class="typography-title-3-tall" for="audioQuality">Audio Quality</label>
<select class="form-dropdown-select list-element" id="audioQuality" name="audioQuality">
<option disabled>Select one</option>
<option value='auto'>Automatic (Default)</option>
<option value='extreme'>Extreme (990kbps)</option>
<option value='high'>High (256kbps)</option>
<option value='standard'>Standard (64kbps)</option>
</select>
<span class="app-prefs-help typography-title-3-tall">Allows the user to select a preferred audio bitrate
for music playback. NOTE: This may not work on all songs. Extreme mode can have the side effects of
high CPU Usage.</span>
</li>
<li class="app-prefs-toggle">
<span class="typography-title-3-tall">Seamless Audio Transitions</span>
<label class="toggle-element list-element">
<input checked id="seamlessAudioTransitions" type="checkbox">
<span class="slider"></span>
</label>
<span class="app-prefs-help typography-title-3-tall">Reduces or completely removes the delay between
songs providing a smooth audio experience.</span>
</li>
<li class="app-prefs-dropdown">
<label class="typography-title-3-tall" for="castingBitDepth">Chromecast Audio Bit Depth</label>
<select class="form-dropdown-select list-element" id="castingBitDepth" name="castingBitDepth">
<option value='16'>16-bit</option>
<option value='24'>24-bit</option>
</select>
<span class="app-prefs-help typography-title-3-tall">Audio Casting bit-depth, all devices should support 16-bit
audio, however 24-bit preserves quality from original audio (it is sometimes not
supported by cheap / old Chromecast devices).
</span>
</li>
<li class="app-prefs-toggle">
<span class="typography-title-3-tall">Enable DLNA casting</span>
<label class="toggle-element list-element">
<input checked id="enableDLNA" type="checkbox">
<span class="slider"></span>
</label>
<span class="app-prefs-help typography-title-3-tall">DLNA is supported by a wide variety of devices, however a large
number of them don't support live radio (e.g LG TVs).
</span>
</li>
</ul>
</div>
<div class="app-prefs-section window">
<div class="app-prefs-title header-nav" style="height: 10px;">
<div class="header-nav-content">
<h1 class="typography-header-emphasized">Startup and Window Behavior</h1>
</div>
</div>
<ul class="settings-list window">
<li class="app-prefs-dropdown">
<label class="typography-title-3-tall" for="appStartupBehavior">Open Apple Music automatically after
login</label>
<select class="form-dropdown-select list-element" id="appStartupBehavior" name="appStartupBehavior">
<option disabled>Select one</option>
<option value=''>Disabled</option>
<option value='true'>Enabled</option>
<option value='hidden'>Enabled (Application is Hidden)</option>
<option value='minimized'>Enabled (Application is Minimized)</option>
</select>
</li>
<li class="app-prefs-toggle">
<span class="typography-title-3-tall">Close button should minimize Apple Music</span>
<label class="toggle-element list-element">
<input checked id="closeButtonMinimize" type="checkbox">
<span class="slider"></span>
</label>
</li>
<li class="app-prefs-toggle">
<span class="typography-title-3-tall">Show window always on top</span>
<label class="toggle-element list-element">
<input checked id="alwaysOnTop" type="checkbox">
<span class="slider"></span>
</label>
<span class="app-prefs-help typography-title-3-tall">This will make the application persist above all
other windows. Best used for mini player usage.</span>
</li>
</ul>
</div>
<div class="app-prefs-section advanced">
<div class="app-prefs-title header-nav" onclick="AMSettings.revealCollapse()" style="height: 10px;">
<div class="header-nav-content">
<h1 class="typography-header-emphasized">Advanced Settings</h1>
</div>
<img alt="Open Category" class="header-nav-image" src="ameres://icons/webui/down.svg">
</div>
<ul class="settings-list advanced" id="advanced">
<li class="app-prefs-dropdown">
<label class="typography-title-3-tall" for="forceApplicationMode">Application Mode</label>
<select class="form-dropdown-select list-element" id="forceApplicationMode" name="forceApplicationMode">
<option disabled>Select one</option>
<option value='dark'>Dark</option>
<option value='light'>Light</option>
<option value='system'>Sync with computer</option>
</select>
</li>
<li class="app-prefs-toggle">
<span class="typography-title-3-tall">Hardware Acceleration</span>
<label class="toggle-element list-element">
<input id="hardwareAcceleration" type="checkbox">
<span class="slider"></span>
</label>
<span class="app-prefs-help typography-title-3-tall">Turn on Hardware Acceleration, which uses your GPU to make the application smoother. Turn it off to reduce the overall resource consumption of the application, at the cost of some rendering not being as smooth.</span>
</li>
<li class="app-prefs-toggle">
<span class="typography-title-3-tall">Verbose Logging</span>
<label class="toggle-element list-element">
<input checked id="verboseLogging" type="checkbox">
<span class="slider"></span>
</label>
<span class="app-prefs-help typography-title-3-tall">When enabled more logs will be posted, used for
debugging.</span>
</li>
<li class="app-prefs-button">
<span class="typography-title-3-tall">Copy Log File to Clipboard</span>
<label class="list-button list-element" id="copyLogFile"
onclick="AMSettings.copyLogFile()">Copy File</label>
<span class="app-prefs-help typography-title-3-tall">Copy your log file to your clipboard, so you can easily paste it into the Discord server or GitHub.</span>
</li>
<li class="app-prefs-toggle">
<span class="typography-title-3-tall">Auto Update Beta Builds</span>
<label class="toggle-element list-element">
<input checked id="autoUpdaterBetaBuilds" type="checkbox">
<span class="slider"></span>
</label>
<span class="app-prefs-help typography-title-3-tall">This will make the autoUpdater perform updates when
a new pre-release is made on GitHub.</span>
</li>
<li class="app-prefs-toggle">
<span class="typography-title-3-tall">Use Apple Music Beta Site</span>
<label class="toggle-element list-element">
<input checked id="useBetaSite" type="checkbox">
<span class="slider"></span>
</label>
<span class="app-prefs-help typography-title-3-tall">Enabling this makes the application load <a
href="https://beta.music.apple.com">beta.music.apple.com</a> instead of <a
href="https://music.apple.com">music.apple.com</a>. Disabling this will provide a limited
experience on the app.</span>
</li>
<li class="app-prefs-toggle">
<span class="typography-title-3-tall">Prevent Media Key Hijacking</span>
<label class="toggle-element list-element">
<input checked id="preventMediaKeyHijacking" type="checkbox">
<span class="slider"></span>
</label>
<span class="app-prefs-help typography-title-3-tall">This prevents the Chromium window from hijacking
your media key. If you experience issues with pausing or playing videos/media on other applications,
enable this.</span>
</li>
<li class="app-prefs-divider header-nav">
<h2 class="shelf-title">Advanced Development Settings</h2>
<span class="app-prefs-help typography-title-3-tall">These settings are for the use of application
developers.</span>
</li>
<li class="app-prefs-toggle">
<span class="typography-title-3-tall">Open DevTools on Startup</span>
<label class="toggle-element list-element">
<input checked id="devToolsOnStartup" type="checkbox">
<span class="slider"></span>
</label>
<span class="app-prefs-help typography-title-3-tall">This makes the Chromium Dev Tools appear on startup. Read more about them <a
href="#" onclick="window.open('https://developer.chrome.com/docs/devtools/')">here</a>.</span>
</li>
<li class="app-prefs-toggle">
<span class="typography-title-3-tall">Allow Multiple Instances</span>
<label class="toggle-element list-element">
<input checked id="allowMultipleInstances" type="checkbox">
<span class="slider"></span>
</label>
<span class="app-prefs-help typography-title-3-tall">Allows multiple instance of the application to be
opened.</span>
</li>
</ul>
</div>
</div>

View file

@ -1,29 +0,0 @@
<div class="md-container md-container_panel" id="themeOptions-vue">
<div class="md-header-title">
<div class="row">
<div class="col">
<button @click="close()" class="md-close-btn"></button>
</div>
<div class="col-auto">
{{ theme }}
</div>
<div class="col">
</div>
</div>
</div>
<div class="md-body" style="overflow-y: overlay">
<div class="md-option-container">
<div class="md-option-line" v-for="(option) in options">
<div class="md-option-segment">
{{ option.name }}
</div>
<div class="md-option-segment md-option-segment_auto">
<input type="checkbox" v-model="userOptions[option.key]" @change="saveOptions()" switch/>
</div>
</div>
</div>
</div>
<div class="md-footer">
</div>
</div>

View file

@ -1,55 +0,0 @@
<div id="usermenu-vue">
<template v-for="menuitem in menuitems" v-if="menuitem.visible">
<button class="um-option" :style="menuitem.style" @click="close();menuitem.onclick();">
<div class="row">
<div class="col">
{{ menuitem.label }}
</div>
<div class="col-auto" v-if="menuitem['svg']" v-html="menuitem.svg">
</div>
<div class="col-auto" v-else-if="menuitem['icon']">
<div class="context-menu__option-icon"></div>
</div>
</div>
</button>
</template>
</div>
<style>
.um-option {
width: 100%;
display: block;
text-align: left;
padding: 10px;
border-radius: 0px;
}
.um-option:not(:last-child) {
border-bottom-style: solid;
border-bottom-width: .5px;
border-bottom-color: var(--contextMenuBorderColor);
}
.um-option:hover {
background: var(--systemQuinary);
}
.um-option:active {
animation: um-blink .1s var(--appleEase)
}
@keyframes um-blink {
0% {
background: var(--systemQuinary);
}
50% {
background: transparent;
}
100% {
background: var(--systemQuinary);
}
}
</style>

View file

@ -1,32 +0,0 @@
<div class="md-container">
<div class="md-header">
<h1 class="md-h1">Header</h1>
</div>
<div class="md-body">
<button>Button</button>
<button class="md-btn">Button</button>
<button class="md-btn md-btn-primary">Button</button>
<div class="md-option-container">
<div class="md-option-line">
<div class="md-option-segment">Switch</div>
<div class="md-option-segment_auto">
<input type="checkbox" switch/>
</div>
</div>
<div class="md-option-line">
<div class="md-option-segment">Select</div>
<div class="md-option-segment_auto">
<select class="md-select">
<option>Option 1</option>
<option>Option 2</option>
<option>Option 3</option>
<option>Option 4</option>
</select>
</div>
</div>
</div>
</div>
<div class="md-footer">
Footer
</div>
</div>

View file

@ -1,148 +0,0 @@
// preload.js
const electron = require('electron');
let cache = {playParams: {id: 0}, status: null, remainingTime: 0},
playbackCache = {status: null, time: Date.now()};
const MusicKitInterop = {
init: function () {
const self = this;
MusicKit.getInstance().addEventListener(MusicKit.Events.playbackStateDidChange, () => {
/** wsapi */
ipcRenderer.send('wsapi-updatePlaybackState', self.getAttributes());
/** wsapi */
if (MusicKitInterop.filterTrack(MusicKitInterop.getAttributes(), true, false)) {
global.ipcRenderer.send('playbackStateDidChange', MusicKitInterop.getAttributes())
if (typeof _plugins != "undefined") {
_plugins.execute("OnPlaybackStateChanged", {Attributes: MusicKitInterop.getAttributes()})
}
const nowPlayingItem = MusicKit.getInstance().nowPlayingItem;
if (typeof nowPlayingItem != "undefined") {
if (nowPlayingItem["type"] === "musicVideo") {
document.querySelector(`.web-chrome`).setAttribute('style', 'height: 20px !important');
document.querySelector(`#MVLyricsBox`).style.display = 'block';
} else {
document.querySelector(`.web-chrome`).setAttribute('style', 'height: 55px !important');
if (nowPlayingItem["type"] !== "song"){
document.querySelector(`.web-chrome__grid-container`).setAttribute('style', 'margin: 15px auto 0')
} else {
document.querySelector(`.web-chrome__grid-container`).setAttribute('style', 'margin: dsds');}
document.querySelector(`#MVLyricsBox`).style.display = 'none';
}
}
} else {
document.querySelector(`.web-chrome`).setAttribute('style', 'height: 55px !important');
document.querySelector(`#MVLyricsBox`).style.display = 'none';
try {
const nowPlayingItem = MusicKit.getInstance().nowPlayingItem;
if (typeof nowPlayingItem != "undefined") {
if (nowPlayingItem["type"] === "musicVideo") {
document.querySelector(`.web-chrome`).setAttribute('style', 'height: 20px !important');
document.querySelector(`#MVLyricsBox`).style.display = 'block';
} else {
document.querySelector(`.web-chrome`).setAttribute('style', 'height: 55px !important');
if (nowPlayingItem["type"] !== "song"){
document.querySelector(`.web-chrome__grid-container`).setAttribute('style', 'margin: 15px auto 0')
} else {
document.querySelector(`.web-chrome__grid-container`).setAttribute('style', 'margin: dsds');}
document.querySelector(`#MVLyricsBox`).style.display = 'none';
}
}
} catch (e) {
console.error(e);
}
}
});
/** wsapi */
MusicKit.getInstance().addEventListener(MusicKit.Events.playbackTimeDidChange, () => {
ipcRenderer.send('wsapi-updatePlaybackState', self.getAttributes());
});
/** wsapi */
MusicKit.getInstance().addEventListener(MusicKit.Events.nowPlayingItemDidChange, () => {
if (MusicKitInterop.filterTrack(MusicKitInterop.getAttributes(), false, true)) {
global.ipcRenderer.send('nowPlayingItemDidChange', MusicKitInterop.getAttributes());
AMStyling.updateMeta()
}
});
MusicKit.getInstance().addEventListener(MusicKit.Events.authorizationStatusDidChange, () => {
global.ipcRenderer.send('authorizationStatusDidChange', MusicKit.getInstance().authorizationStatus)
})
MusicKit.getInstance().addEventListener(MusicKit.Events.mediaPlaybackError, (e) => {
console.warn(`[mediaPlaybackError] ${e}`);
})
},
getAttributes: function () {
const mk = MusicKit.getInstance();
const nowPlayingItem = mk.nowPlayingItem;
const isPlayingExport = mk.isPlaying;
const remainingTimeExport = mk.currentPlaybackTimeRemaining;
const attributes = (nowPlayingItem != null ? nowPlayingItem.attributes : {});
attributes.status = isPlayingExport ? isPlayingExport : false;
attributes.name = attributes.name ? attributes.name : 'No Title Found';
attributes.artwork = attributes.artwork ? attributes.artwork : {url: ''};
attributes.artwork.url = attributes.artwork.url ? attributes.artwork.url : '';
attributes.playParams = attributes.playParams ? attributes.playParams : {id: 'no-id-found'};
attributes.playParams.id = attributes.playParams.id ? attributes.playParams.id : 'no-id-found';
attributes.albumName = attributes.albumName ? attributes.albumName : '';
attributes.artistName = attributes.artistName ? attributes.artistName : '';
attributes.genreNames = attributes.genreNames ? attributes.genreNames : [];
attributes.remainingTime = remainingTimeExport ? (remainingTimeExport * 1000) : 0;
attributes.durationInMillis = attributes.durationInMillis ? attributes.durationInMillis : 0;
attributes.startTime = Date.now();
attributes.endTime = Math.round((attributes.playParams.id === cache.playParams.id ? (Date.now() + attributes.remainingTime) : (attributes.startTime + attributes.durationInMillis)));
attributes.endTime = attributes.endTime ? attributes.endTime : Date.now();
attributes.volume = mk.volume;
attributes.shuffleMode = mk.shuffleMode;
attributes.repeatMode = mk.repeatMode;
attributes.autoplayEnabled = mk.autoplayEnabled;
return attributes
},
filterTrack: function (a, playbackCheck, mediaCheck) {
if (a.title === "No Title Found" || a.playParams.id === "no-id-found") {
return;
} else if (mediaCheck && a.playParams.id === cache.playParams.id) {
return;
} else if (playbackCheck && a.status === playbackCache.status) {
return;
} else if (playbackCheck && !a.status && a.remainingTime === playbackCache.time) { /* Pretty much have to do this to prevent multiple runs when a song starts playing */
return;
}
cache = a;
if (playbackCheck) playbackCache = {status: a.status, time: a.remainingTime};
return true;
},
pausePlay: function () {
if (MusicKit.getInstance().isPlaying) {
MusicKit.getInstance().pause();
} else if (MusicKit.getInstance().nowPlayingItem != null) {
MusicKit.getInstance().play().then(r => console.log(`[MusicKitInterop] Playing ${r}`));
}
},
nextTrack: function () {
MusicKit.getInstance().skipToNextItem().then(r => console.log(`[MusicKitInterop] Skipping to Next ${r}`));
},
previousTrack: function () {
MusicKit.getInstance().skipToPreviousItem().then(r => console.log(`[MusicKitInterop] Skipping to Previous ${r}`));
}
}
process.once('loaded', () => {
global.ipcRenderer = electron.ipcRenderer;
global.MusicKitInterop = MusicKitInterop;
});
// MusicKit.getInstance().addEventListener( MusicKit.Events.queueItemsDidChange,logIt );
// MusicKit.getInstance().addEventListener( MusicKit.Events.queuePositionDidChange, logIt );

File diff suppressed because one or more lines are too long

View file

@ -1,74 +0,0 @@
const wsapi = {
search(term, limit) {
MusicKit.getInstance().api.search(term, {limit: limit, types: 'songs,artists,albums'}).then((results)=>{
ipcRenderer.send('wsapi-returnSearch', JSON.stringify(results))
})
},
searchLibrary(term, limit) {
MusicKit.getInstance().api.library.search(term, {limit: limit, types: 'library-songs,library-artists,library-albums'}).then((results)=>{
ipcRenderer.send('wsapi-returnSearchLibrary', JSON.stringify(results))
})
},
moveQueueItem(oldPosition, newPosition) {
MusicKit.getInstance().queue._queueItems.splice(newPosition,0,MusicKit.getInstance().queue._queueItems.splice(oldPosition,1)[0])
MusicKit.getInstance().queue._reindex()
},
setAutoplay(value) {
MusicKit.getInstance().autoplayEnabled = value
},
returnDynamic(data, type) {
ipcRenderer.send('wsapi-returnDynamic', JSON.stringify(data), type)
},
musickitApi(method, id, params) {
MusicKit.getInstance().api[method](id, params).then((results)=>{
ipcRenderer.send('wsapi-returnMusicKitApi', JSON.stringify(results), method)
})
},
getPlaybackState () {
ipcRenderer.send('wsapi-updatePlaybackState', MusicKitInterop.getAttributes());
},
getLyrics() {
_lyrics.GetLyrics(1, false)
},
getQueue() {
ipcRenderer.send('wsapi-returnQueue', JSON.stringify(MusicKit.getInstance().queue))
},
playNext(type, id) {
var request = {}
request[type] = id
MusicKit.getInstance().playNext(request)
},
playLater(type, id) {
var request = {}
request[type] = id
MusicKit.getInstance().playLater(request)
},
love() {
},
playTrackById(id, kind = "song") {
MusicKit.getInstance().setQueue({ [kind]: id }).then(function (queue) {
MusicKit.getInstance().play()
})
},
quickPlay(term) {
// Quick play by song name
MusicKit.getInstance().api.search(term, { limit: 2, types: 'songs' }).then(function (data) {
MusicKit.getInstance().setQueue({ song: data["songs"][0]["id"] }).then(function (queue) {
MusicKit.getInstance().play()
})
})
},
toggleShuffle() {
MusicKit.getInstance().shuffleMode = MusicKit.getInstance().shuffleMode === 0 ? 1 : 0
},
toggleRepeat() {
if(MusicKit.getInstance().repeatMode == 0) {
MusicKit.getInstance().repeatMode = 2
}else if(MusicKit.getInstance().repeatMode == 2){
MusicKit.getInstance().repeatMode = 1
}else{
MusicKit.getInstance().repeatMode = 0
}
}
}

View file

@ -1,32 +0,0 @@
try {
if (MusicKit.getInstance().isAuthorized) {
if (!document.querySelector('#backButtonBar')) {
document.getElementById('web-main').insertAdjacentHTML("afterbegin", `
<div id="backButtonBar">
<div class="button-area" onclick="ipcRenderer.send('back');">
<img src="https://developer.apple.com/design/human-interface-guidelines/macos/images/icons/system-images/control/chevron-backward.png" alt="Back Button">
</div>
</div>
`);
}
if (document.getElementsByClassName('dragDiv right-aligned').length > 0) {
document.getElementById('backButtonBar').style.top = '25px'
}
document.getElementById('web-main').addEventListener('scroll', function () {
if (document.getElementById('web-main').scrollTop > 80) {
document.getElementById('backButtonBar').style.backgroundColor = 'var(--playerBackground)';
document.getElementById('backButtonBar').style.position = 'fixed';
} else {
document.getElementById('backButtonBar').style.backgroundColor = 'transparent';
document.getElementById('backButtonBar').style.position = 'absolute';
}
});
}
} catch (e) {
console.error("[JS] Error while trying to apply backButton.js", e);
}

View file

@ -1,19 +0,0 @@
try {
const preferences = ipcRenderer.sendSync('getStore');
if (MusicKit.getInstance().isAuthorized) {
let url = window.location.href;
if (preferences.general.startupPage !== "browse") {
if (preferences.general.startupPage.includes('library/')) {
url = `${window.location.origin}/${preferences.general.startupPage}`;
} else {
url = `${window.location.origin}/${MusicKit.getInstance().storefrontId}/${preferences.general.startupPage}`;
}
window.location.href = url;
}
ipcRenderer.send('userAuthorized', url);
}
} catch (e) {
console.error("[JS] Error while trying to apply CheckAuth.js", e);
}

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1,591 +0,0 @@
var EAOverride = true;
var AErecorderNode;
var GCOverride = true;
var outputID = -1;
var EAoutputID = -1;
var queueExclusive = false;
var queueChromecast = false;
var selectedGC ;
var MVsource;
var windowAudioNode;
const workerOptions = {
OggOpusEncoderWasmPath: 'https://cdn.jsdelivr.net/npm/opus-media-recorder@latest/OggOpusEncoder.wasm',
WebMOpusEncoderWasmPath: 'https://cdn.jsdelivr.net/npm/opus-media-recorder@latest/WebMOpusEncoder.wasm'
};
var recorder;
window.MediaRecorder = OpusMediaRecorder;
var audioWorklet = `class RecorderWorkletProcessor extends AudioWorkletProcessor {
static get parameterDescriptors() {
return [{
name: 'isRecording',
defaultValue: 0
},
{
name: 'numberOfChannels',
defaultValue: 2
}
];
}
constructor() {
super();
this._bufferSize = 32768;
this._buffers = null;
this._initBuffer();
}
_initBuffers(numberOfChannels) {
this._buffers = [];
for (let channel=0; channel < numberOfChannels; channel++) {
this._buffers.push(new Float32Array(this._bufferSize));
}
}
_initBuffer() {
this._bytesWritten = 0;
}
_isBufferEmpty() {
return this._bytesWritten === 0;
}
_isBufferFull() {
return this._bytesWritten === this._bufferSize;
}
_pushToBuffers(audioRawData, numberOfChannels) {
if (this._isBufferFull()) {
this._flush();
}
let dataLength = audioRawData[0].length;
for (let idx=0; idx<dataLength; idx++) {
for (let channel=0; channel < numberOfChannels; channel++) {
let value = audioRawData[channel][idx];
this._buffers[channel][this._bytesWritten] = value;
}
this._bytesWritten += 1;
}
}
_flush() {
let buffers = [];
this._buffers.forEach((buffer, channel) => {
if (this._bytesWritten < this._bufferSize) {
buffer = buffer.slice(0, this._bytesWritten);
}
buffers[channel] = buffer;
});
this.port.postMessage({
eventType: 'data',
audioBuffer: buffers,
bufferSize: this._bufferSize
});
this._initBuffer();
}
_recordingStopped() {
this.port.postMessage({
eventType: 'stop'
});
}
process(inputs, outputs, parameters) {
const isRecordingValues = parameters.isRecording;
const numberOfChannels = parameters.numberOfChannels[0];
if (this._buffers === null) {
this._initBuffers(numberOfChannels);
}
for (let dataIndex = 0; dataIndex < isRecordingValues.length; dataIndex++)
{
const shouldRecord = isRecordingValues[dataIndex] === 1;
if (!shouldRecord && !this._isBufferEmpty()) {
this._flush();
this._recordingStopped();
}
if (shouldRecord) {
let audioRawData = inputs[0];
this._pushToBuffers(audioRawData, numberOfChannels);
}
}
return true;
}
}
registerProcessor('recorder-worklet', RecorderWorkletProcessor);`;
var GCstream;
var searchInt;
var AMEx = {
context: new AudioContext(),
result: {},
filter: [],
EQRanges: [{
f: 32,
type: 'lowshelf'
}, {
f: 64,
type: 'peaking'
}, {
f: 125,
type: 'peaking'
}, {
f: 250,
type: 'peaking'
}, {
f: 500,
type: 'peaking'
}, {
f: 1000,
type: 'peaking'
}, {
f: 2000,
type: 'peaking'
}, {
f: 4000,
type: 'peaking'
}, {
f: 8000,
type: 'peaking'
}, {
f: 16000,
type: 'highshelf'
}]
};
var bassFilter;
var trebleFilter;
var AudioOutputs = {
fInit: false,
eqReady: false,
activeCasts: [],
castUI() {
AMJavaScript.getRequest("ameres://html/cast_device.html", (content) => {
var vm = new Vue({
data: {
devices: {
cast: [],
airplay: []
},
scanning: false,
activeCasts: AudioOutputs.activeCasts
},
methods: {
scan() {
let self = this;
this.scanning = true;
AudioOutputs.getGCDevices();
setTimeout(()=>{
self.devices.cast = ipcRenderer.sendSync("getKnownCastDevices");
self.scanning = false;
}, 2000);
console.log(this.devices);
vm.$forceUpdate();
},
setCast(device) {
console.log(`requesting: ${device}`);
AudioOutputs.playGC(device);
},
stopCasting() {
AudioOutputs.stopGC();
this.activeCasts = AudioOutputs.activeCasts;
vm.$forceUpdate();
},
close() {
modal.close();
}
}
});
var modal = new AMEModal({
content: content,
CloseButton: false,
Style: {
maxWidth: "600px"
},
OnCreate() {
vm.$mount("#castdevices-vue");
vm.scan();
},
OnClose() {
_vues.destroy(vm);
}
});
})
},
init: function (cb = function () {}) {
AudioOutputs.fInit = true;
searchInt = setInterval(function () {
if (document.getElementById("apple-music-player")) {
AudioOutputs.eqReady = true;
document.getElementById("apple-music-player").crossOrigin = "anonymous";
AudioOutputs.amplifyMedia(document.getElementById("apple-music-player"), 0);
var context = AMEx.context;
var source = AMEx.result.source;
bassFilter = context.createBiquadFilter();
bassFilter.type = "lowshelf";
bassFilter.frequency.value = 200;
bassFilter.gain.value = 0;
trebleFilter = context.createBiquadFilter();
trebleFilter.type = "highshelf";
trebleFilter.frequency.value = 2000;
trebleFilter.gain.value = 0;
source.connect(bassFilter);
bassFilter.connect(trebleFilter);
trebleFilter.connect(context.destination);
console.log("Attached EQ");
if (queueExclusive){
console.log('we good');
AudioOutputs.startExclusiveAudio(outputID); }
cb();
clearInterval(searchInt);
}
}, 1000);
waitFor(()=>{return queueChromecast &&
((document.getElementById("apple-music-player") != null&&
document.getElementById("apple-music-player").readyState == 4) || (
document.querySelector('apple-music-video-player') &&
document.querySelector('apple-music-video-player').shadowRoot &&
document.querySelector('apple-music-video-player').shadowRoot.querySelector('amp-video-player-internal') &&
document.querySelector('apple-music-video-player').shadowRoot.querySelector('amp-video-player-internal').shadowRoot &&
document.querySelector('apple-music-video-player').shadowRoot.querySelector('amp-video-player-internal').shadowRoot.querySelector('amp-video-player') &&
document.querySelector('apple-music-video-player').shadowRoot.querySelector('amp-video-player-internal').shadowRoot.querySelector('amp-video-player').shadowRoot &&
document.querySelector('apple-music-video-player').shadowRoot.querySelector('amp-video-player-internal').shadowRoot.querySelector('amp-video-player').shadowRoot.getElementById('apple-music-video-player') &&
document.querySelector('apple-music-video-player').shadowRoot.querySelector('amp-video-player-internal').shadowRoot.querySelector('amp-video-player').shadowRoot.getElementById('apple-music-video-player').readyState == 4)) ;},() => AudioOutputs.playGC(selectedGC))
},
amplifyMedia: function (mediaElem, multiplier) {
AMEx.context = new(window.AudioContext || window.webkitAudioContext),
AMEx.result = {
context: AMEx.context,
source: AMEx.context.createMediaElementSource(mediaElem),
gain: AMEx.context.createGain(),
media: mediaElem,
amplify: function (multiplier) {
AMEx.result.gain.gain.value = multiplier;
},
getAmpLevel: function () {
return AMEx.result.gain.gain.value;
}
};
AMEx.result.source.connect(AMEx.result.gain);
AMEx.result.gain.connect(AMEx.context.destination);
AMEx.result.amplify(multiplier);
return AMEx.result;
},
popup_generic: function ({
title = "",
content = document.createElement("div"),
closefn = function () {},
transparentBg = false,
windowStyle = {},
backdropStyle = {}
}) {
let backdrop = document.createElement("div");
backdrop.style.width = "100%";
backdrop.style.height = "100%";
backdrop.style.position = "fixed";
backdrop.style.top = 0;
backdrop.style.left = 0;
if (!transparentBg) {
backdrop.style.background = "rgba(0,0,0,0.5)";
} else {
backdrop.style.background = "rgba(0,0,0,0.0)";
};
backdrop.style.zIndex = 10000;
backdrop.style.display = "flex";
backdrop.style.alignItems = "center";
backdrop.style.justifyContent = "center";
let win = document.createElement("div");
win.style.width = "300px";
win.style.background = "var(--modalBGColor)";
win.style.zIndex = 10000;
win.style.padding = "16px";
win.style.borderRadius = "10px";
Object.assign(backdrop.style, backdropStyle);
Object.assign(win.style, windowStyle);
let closeBtn = document.createElement("button");
closeBtn.style.background = "var(--primaryColor)";
closeBtn.style.borderRadius = "4px";
closeBtn.style.padding = "8px 0px 8px 0px";
closeBtn.style.width = "100%";
closeBtn.style.fontWeight = "bold";
closeBtn.style.margin = "12px 0px 0px 0px";
closeBtn.innerHTML = "Close";
closeBtn.id = "eq-close";
closeBtn.addEventListener("click", function () {
backdrop.remove();
closefn();
});
let titleText = document.createElement("div");
titleText.innerHTML = (title);
titleText.style.fontWeight = "bold";
win.appendChild(titleText);
win.appendChild(content);
win.appendChild(closeBtn);
backdrop.appendChild(win);
document.body.appendChild(backdrop);
},
ShowEQ: function () {
if (!AudioOutputs.eqReady) {
alert("Audio is not ready, Play a song to use this function.");
};
let backdrop = document.createElement("div");
backdrop.style.width = "100%";
backdrop.style.height = "100%";
backdrop.style.position = "fixed";
backdrop.style.top = 0;
backdrop.style.left = 0;
backdrop.style.background = "rgba(0,0,0,0.5)";
backdrop.style.zIndex = 9999;
backdrop.style.display = "flex";
backdrop.style.alignItems = "center";
backdrop.style.justifyContent = "center";
backdrop.style.backdropFilter = "blur(12px) saturate(180%)";
let win = document.createElement("div");
win.style.width = "300px";
win.style.background = "var(--modalBGColor)";
win.style.zIndex = 10000;
win.style.padding = "16px";
win.style.borderRadius = "10px";
let closeBtn = document.createElement("button");
closeBtn.style.background = "var(--primaryColor)";
closeBtn.style.borderRadius = "4px";
closeBtn.style.padding = "8px 0px 8px 0px";
closeBtn.style.width = "100%";
closeBtn.style.fontWeight = "bold";
closeBtn.style.margin = "12px 0px 0px 0px";
closeBtn.innerHTML = "Close";
closeBtn.addEventListener("click", function () {
backdrop.remove()
});
let titleText = document.createElement("div");
let bassText = document.createElement("div");
let trebleText = document.createElement("div");
let gainText = document.createElement("div");
titleText.id = 'eq-menu';
titleText.innerHTML = (`Equalizer`);
titleText.style.fontWeight = "bold";
bassText.innerHTML = (`Bass (${bassFilter.gain.value})`);
trebleText.innerHTML = (`Treble (${trebleFilter.gain.value})`);
gainText.innerHTML = (`Gain (${AMEx.result.gain.gain.value})`);
let bassAdjust = document.createElement("input");
bassAdjust.style.width = "100%";
bassAdjust.type = "range";
bassAdjust.min = -10;
bassAdjust.max = 10;
bassAdjust.value = bassFilter.gain.value;
bassAdjust.addEventListener("input", function () {
bassFilter.gain.value = this.value;
bassText.innerHTML = `Bass (${bassFilter.gain.value})`;
});
let trebleAdjust = document.createElement("input");
trebleAdjust.style.width = "100%";
trebleAdjust.min = -10;
trebleAdjust.max = 10;
trebleAdjust.type = "range";
trebleAdjust.value = trebleFilter.gain.value;
trebleAdjust.addEventListener("input", function () {
trebleFilter.gain.value = this.value;
trebleText.innerHTML = `Treble (${trebleFilter.gain.value})`;
});
let gainAdjust = document.createElement("input");
gainAdjust.style.width = "100%";
gainAdjust.min = -1;
gainAdjust.max = 1;
gainAdjust.type = "range";
gainAdjust.value = AMEx.result.gain.gain.value;
gainAdjust.addEventListener("input", function () {
AMEx.result.gain.gain.value = this.value;
gainText.innerHTML = `Gain (${AMEx.result.gain.gain.value})`;
});
let bassLabel = document.createElement("label");
let trebleLabel = document.createElement("label");
let gainLabel = document.createElement("label");
bassLabel.appendChild(bassText);
trebleLabel.appendChild(trebleText);
gainLabel.appendChild(gainText);
bassLabel.appendChild(bassAdjust);
bassLabel.appendChild(document.createElement("br"));
trebleLabel.appendChild(trebleAdjust);
trebleLabel.appendChild(document.createElement("br"));
gainLabel.appendChild(gainAdjust);
win.appendChild(titleText);
win.appendChild(bassLabel);
win.appendChild(trebleLabel);
win.appendChild(gainLabel);
win.appendChild(closeBtn);
backdrop.appendChild(win);
document.body.appendChild(backdrop);
},
getAudioDevices: function(){
ipcRenderer.send('getAudioDevices','');
},
startExclusiveAudio: async function(id){
if(AMEx.result.source != null || MVsource != null){
if(EAoutputID!= id){
EAoutputID = id;
EAOverride = false;
ipcRenderer.send('muteAudio',true);
ipcRenderer.send('enableExclusiveAudio',id);
windowAudioNode = AMEx.context.createGain();
try{
AMEx.result.source.connect(windowAudioNode);}
catch(e){}
var options = {
mimeType : 'audio/wav'
};
var destnode = AMEx.context.createMediaStreamDestination();
windowAudioNode.connect(destnode);
if(!recorder){
recorder = new MediaRecorder(destnode.stream,options,workerOptions);
recorder.start(1);
recorder.ondataavailable = function(e) {
e.data.arrayBuffer().then(buffer => {
if(!GCOverride) {ipcRenderer.send('writeWAV',buffer,preferences.audio.castingBitDepth);}
if(!EAOverride) {ipcRenderer.send('writePCM',buffer);}
}
);
}}
} else {console.log('device already in exclusive mode');}
} else {
outputID = id;
queueExclusive = true;
}
},
stopExclusiveAudio: function(){
try{
recorder.stop();
recorder = null;
} catch(e){}
EAOverride = true;
EAoutputID = -1;
outputID = -1;
queueExclusive = false;
ipcRenderer.send('muteAudio',false);
ipcRenderer.send('disableExclusiveAudio','');
},
getGCDevices: function(){
ipcRenderer.send('getChromeCastDevices','');
},
playGC : async function(device){
console.log('wot');
AudioOutputs.activeCasts.push(device);
GCOverride = false;
if(AMEx.result.source != null || MVsource != null ){
queueChromecast = false;
const musicType = (MusicKit.getInstance().nowPlayingItem != null) ? MusicKit.getInstance().nowPlayingItem["type"] ?? '' : '';
const trackName = ((MusicKit.getInstance().nowPlayingItem != null) ? MusicKit.getInstance().nowPlayingItem.title ?? '' : '');
const artistName = ((MusicKit.getInstance().nowPlayingItem != null) ? MusicKit.getInstance().nowPlayingItem.artistName ?? '' : '');
const albumName = ((MusicKit.getInstance().nowPlayingItem != null) ? MusicKit.getInstance().nowPlayingItem.albumName ?? '' : '');
ipcRenderer.send('performGCCast',device, "Apple Music Electron","Playing ...","3.0.0 beta",'');
windowAudioNode = AMEx.context.createGain();
try{
AMEx.result.source.connect(windowAudioNode);}
catch(e){}
var options = {
mimeType : 'audio/wav'
};
var destnode = AMEx.context.createMediaStreamDestination();
windowAudioNode.connect(destnode);
if(!recorder){
recorder = new MediaRecorder(destnode.stream,options,workerOptions);
recorder.start(1);
recorder.ondataavailable = function(e) {
e.data.arrayBuffer().then(buffer => {
if(!GCOverride) {
ipcRenderer.send('writeWAV',buffer,preferences.audio.castingBitDepth);
}
if(!EAOverride) {ipcRenderer.send('writePCM',buffer);}
}
);
}}
} else {queueChromecast = true; selectedGC = device}
},
stopGC : function(){
queueChromecast = false;
try{
recorder.stop();
recorder = null;
} catch(e){}
GCOverride = true;
this.activeCasts = [];
ipcRenderer.send('stopGCast','');
}
};
document.addEventListener('keydown', function (event) {
if (event.ctrlKey || event.metaKey) {
switch (String.fromCharCode(event.which).toLowerCase()) {
case "2":
if (document.getElementById('eq-menu')){
document.getElementById('eq-menu').parentNode.getElementsByTagName('button')[0].click();
}
else{AudioOutputs.ShowEQ();}
break;
case "3":
(EAOverride) ? (EAOverride = false) : (EAOverride = true);
break;
}
}
});
function waitFor(condition, callback) {
if(condition() == null || !condition() ) {
window.setTimeout(waitFor.bind(null, condition, callback), 1000);
} else {
callback();
}
}
function setIntervalX(callback, delay, repetitions) {
var x = 0;
var intervalID = window.setInterval(function () {
callback();
if (++x === repetitions) {
window.clearInterval(intervalID);
}
}, delay);
}
AudioOutputs.init()

View file

@ -1,91 +0,0 @@
try {
if (document.querySelector('.web-nav-window-controls') === null && document.getElementsByClassName('web-nav-window-controls').length === 0) {
class ClassWatcher {
constructor(targetNode, classToWatch, classAddedCallback, classRemovedCallback) {
this.targetNode = targetNode;
this.classToWatch = classToWatch;
this.classAddedCallback = classAddedCallback;
this.classRemovedCallback = classRemovedCallback;
this.observer = null;
this.lastClassState = targetNode.classList.contains(this.classToWatch);
this.init();
};
init() {
this.observer = new MutationObserver(this.mutationCallback);
this.observe();
}
observe() {
this.observer.observe(this.targetNode, { attributes: true })
};
disconnect() {
this.observer.disconnect()
};
mutationCallback = mutationsList => {
for(let mutation of mutationsList) {
if (mutation.type === 'attributes' && mutation.attributeName === 'class') {
let currentClassState = mutation.target.classList.contains(this.classToWatch);
if(this.lastClassState !== currentClassState) {
this.lastClassState = currentClassState;
if(currentClassState) {
this.classAddedCallback();
}
else {
this.classRemovedCallback();
}
}
}
}
}
}
function UserAuthorized() { /* When user is authenticated (Signed In) and web-chrome appears */
document.getElementsByClassName('web-nav-window-controls')[0].classList.add('web-chrome-window-controls');
document.getElementsByClassName('web-main-drag')[0].style.zIndex = '1'; /* Hide the drag bar */
}
function UserUnauthorized() { /* When user is unauthenticated (Signed Out) and web-chrome display: none */
if (document.getElementsByClassName('web-chrome-window-controls').length !== 0) {
console.log(`Length: ${document.getElementsByClassName('web-chrome-window-controls').length}`);
document.getElementsByClassName('web-chrome-window-controls')[0].classList.remove('web-chrome-window-controls');
}
document.getElementsByClassName('web-main-drag')[0].style.zIndex = '2'; /* Show the drag bar */
document.getElementsByClassName('header-nav')[0].style.margin = '5px var(--bodyGutter) 0'
}
new ClassWatcher(document.body, 'not-authenticated', UserUnauthorized, UserAuthorized);
document.getElementsByClassName('web-navigation')[0].insertAdjacentHTML('afterbegin', `
<div class="web-main-drag">
</div>
<div class="web-nav-window-controls">
<span id="minimize" onclick="ipcRenderer.send('minimize')"></span>
<span id="maximize" onclick="ipcRenderer.send('maximize')"></span>
<span id="close" onclick="ipcRenderer.send('close')"></span>
</div>
`);
if ((document.getElementsByClassName('web-chrome')[0].style.display === 'none' || document.body.classList.contains('not-authenticated')) && document.getElementsByClassName('web-nav-window-controls').length > 0) {
UserUnauthorized();
} else {
UserAuthorized();
}
/* Clean Up Search bar */
if (document.getElementsByClassName('search-box dt-search-box web-navigation__search-box').length > 0) {
document.getElementsByClassName('search-box dt-search-box web-navigation__search-box')[0].style.marginTop = '15px';
}
if (document.getElementById('web-navigation-container')) {
document.getElementById('web-navigation-container').style.gridTemplateRows = 'auto auto 1fr auto'
}
}
} catch (e) {
console.error("[CSS] Error while trying to apply frame_Windows.js", e);
}

View file

@ -1,30 +0,0 @@
try {
if (document.getElementById('web-navigation-search-box') && !document.querySelector('.web-nav-window-controls')) {
document.getElementById('web-navigation-search-box').insertAdjacentHTML('beforebegin', `
<div class="web-nav-window-controls-outer macos" ondblclick="ipcRenderer.send('maximize')" style="width: 100%; height: 55px; -webkit-app-region: no-drag; background-color: transparent !important; -webkit-user-select: none; padding-left: 2px; padding-top: 2px;">
<div class="web-nav-window-controls" style="-webkit-app-region: drag; position: relative; height: 100%; width: 100%; display: flex; padding: 10px 0 0 10px;">
<span id="close" onclick="ipcRenderer.send('close')"></span>
<span id="minimize" onclick="ipcRenderer.send('minimize')"></span>
<span id="maximize" onclick="ipcRenderer.send('maximize')"></span>
</div>
</div>
`);
if (document.getElementById('web-navigation-search-box')) {
document.getElementById('web-navigation-search-box').style.gridArea = "auto !important";
document.getElementById('web-navigation-search-box').style.marginTop = '0px !important';
}
if (document.getElementById('web-navigation-container')) {
document.getElementById('web-navigation-container').style.gridTemplateRows = '55px auto 1fr auto !important';
}
if (document.querySelector('.web-chrome')) {
document.querySelector('.web-chrome').style.width = "calc(100vw - var(--web-navigation-width))";
}
}
} catch (e) {
console.error("[JS] Error while trying to apply frame_macOS.js", e);
}

View file

@ -1,213 +0,0 @@
(function () {
const lineClicked = function (self, id) {
return function () {
const detail = {"time": self.rangeLrc[id].startTime};
const e = new CustomEvent(self.clickEventName, {
'detail': detail,
"bubbles": true
});
const elem = document.getElementById(self.lineidPrefix + id);
elem.dispatchEvent(e);
};
};
const setHtml = function (self) {
let i;
self.currentLine = 0;
const container = document.getElementById(self.divID);
if(!container) {
return;
}
container.innerHTML = "";
const ul = document.createElement("ul");
container.appendChild(ul);
for (i = 0; i < self.totalLines; i++) {
const li = document.createElement("li");
if (self.rangeLrc[i].line === 'lrcInstrumental'){
li.innerHTML = `<div class="lyricWaiting"><div></div><div></div><div></div></div>`;
} else {
li.innerHTML = self.rangeLrc[i].line;
if (!li.innerHTML) {
li.innerHTML = "&nbsp;"
}}
li.setAttribute("id", self.lineidPrefix + i);
if (self.clickable) {
li.onclick = lineClicked(self, i);
li.style.cursor = 'pointer';
}
ul.appendChild(li);
}
/* hide the later ones*/
for (i = self.totalLines; i < self.totalLines; i++) {
document.getElementById(self.lineidPrefix + i).style.display = "block";
}
};
const moveToLine = function (self, line) {
const startShow = line - self.showLines;
const endShow = line + self.showLines;
for (let i = 0; i < self.totalLines; i++) {
const li = document.getElementById(self.lineidPrefix + i);
if (i >= startShow && i <= endShow) {
try{
li.style.display = "block";}
catch(e){}
} else {
li.style.display = "block";
}
if (i === line) {
li.classList.add(self.currentcss);
if(this.focus == 'start'){
li.scrollIntoView({behavior: 'smooth', block: 'start'});
}else{
li.scrollIntoView({behavior: 'smooth', block: 'center'})};
try{
if (li.innerText == '&nbsp;'){
document.querySelector(`#MVLyricsBox`).style.display = 'none';
} else if (MusicKit.getInstance().nowPlayingItem["type"] === "musicVideo"){
document.querySelector(`#MVLyricsBox`).style.display = 'block';
}
var u = '';
if (li.getElementsByClassName('lyrics-translation').length > 0 ){
try{
if(!li.innerText.includes('Instrumental. / Lyrics not found.')){
u = li.getElementsByClassName('lyrics-translation')[0].innerText;
document.querySelector(`#MVLyricsBox`).childNodes[1].innerHTML= li.getElementsByClassName('lyrics-translation')[0].innerText;
document.querySelector(`#MVLyricsBox`).childNodes[0].innerHTML= (li.innerText).replace(u,'');}
} catch(e){}
} else {
if(!li.innerText.includes('Instrumental. / Lyrics not found.')){
document.querySelector(`#MVLyricsBox`).childNodes[0].innerHTML= li.innerText;
document.querySelector(`#MVLyricsBox`).childNodes[1].innerHTML= ''; }
}
} catch(e){console.log('mverr',e);}
} else {
try{
li.classList.remove(self.currentcss);
} catch(e){}
}
}
};
/* The constructor can be empty or passed in the lrc string*/
const Lyricer = function (options) {
this.divID = "lyricer"; /* the default html container id */
this.currentcss = "lyricer-current-line"; /* this css for the line current playing*/
this.lineidPrefix = "lyricer-line"; /* the id prefix for each line*/
this.showLines = 8; /*lines showing before and after;*/
this.clickable = true;
this.clickEventName = "lyricerclick";
this.focus = 'center';
if (options) {
for (const prop in options) {
if (typeof this[prop] != "undefined" && options.hasOwnProperty(prop)) {
this[prop] = options[prop];
}
}
}
};
Lyricer.prototype.setFocus = function(focus2){
this.focus = focus2;
};
Lyricer.prototype.setLrc = function (rawLrc) {
let i;
this.tags = {};
this.lrc = [];
this.rangeLrc = [];
const tagRegex = /\[([a-z]+):(.*)].*/;
const lrcAllRegex = /(\[[0-9.:\[\]]*])+(.*)/;
const timeRegex = /\[([0-9]+):([0-9.]+)]/;
const rawLrcArray = rawLrc.split(/[\r\n]/);
for (i = 0; i < rawLrcArray.length; i++) {
/* handle tags first*/
const tag = tagRegex.exec(rawLrcArray[i]);
if (tag && tag[0]) {
this.tags[tag[1]] = tag[2];
continue;
}
/* handle lrc*/
const lrc = lrcAllRegex.exec(rawLrcArray[i]);
if (lrc && lrc[0]) {
const times = lrc[1].replace(/]\[/g, "],[").split(",");
for (let j = 0; j < times.length; j++) {
const time = timeRegex.exec(times[j]);
if (time && time[0]) {
this.lrc.push({"startTime": parseInt(time[1], 10) * 60 + parseFloat(time[2]), "line": lrc[2]});
}
}
}
}
/*sort lrc array*/
this.lrc.sort(function (a, b) {
return a.startTime - b.startTime;
});
/* crate the range lrc array*/
/* dummy lines*/
/* for (var i = 0; i < rawLrcArray.length; i++) {
/* this.rangeLrc.push( { "startTime": -1, "endTime": 0, "line": "&nbsp;" } );
/* };
/* real data*/
let startTime = 0;
let line = "";
for (i = 0; i < this.lrc.length; i++) {
endTime = parseFloat(this.lrc[i].startTime);
if (startTime == 10 && line == 'lrcInstrumental') startTime=0;
if (!this.rangeLrc.includes({"startTime": startTime, "endTime": endTime, "line": line})){
this.rangeLrc.push({"startTime": startTime, "endTime": endTime, "line": line});} else {console.log('blocked');}
startTime = endTime;
line = this.lrc[i].line;
}
this.rangeLrc.push({"startTime": startTime, "endTime": 999.99, "line": line});
/* dummy lines
/* for (var i = 0; i < this.showLines; i++) {
/* this.rangeLrc.push( { "startTime": -1, "endTime": 0, "line": "&nbsp;" } );
/* };*/
this.totalLines = this.rangeLrc.length;
console.log(this.rangeLrc);
/* set html and move to start*/
setHtml(this);
this.move(0);
if(typeof _lyrics !== "undefined") {
_lyrics.setLyrics(this.rangeLrc);
}
};
Lyricer.prototype.move = function (time) {
for (let i = 0; i < this.totalLines; i++) {
if (time >= this.rangeLrc[i].startTime && time < this.rangeLrc[i].endTime) {
if (this.currentLine !== i) {
this.currentLine = i;
moveToLine(this, this.currentLine);
}
return;
}
}
};
Lyricer.prototype.setMXMTranslation = function (translation_list) {
const container = document.getElementById(this.divID);
const lines = container.getElementsByTagName('li');
for (var line of lines){
for (var trans_line of translation_list){
if (line.textContent == " "+trans_line["translation"]["matched_line"]){
const trans = document.createElement("div");
trans.className = "lyrics-translation";
trans.textContent = trans_line["translation"]["description"];
line.appendChild(trans);
break;
}
}
}
};
window.Lyricer = Lyricer; /*exposed to global*/
})();

View file

@ -1,118 +0,0 @@
var _plugins = {
events: {
Start: [],
OnNavigation: [],
OnPlaybackStateChanged: [],
OnExit: [],
OnHide: [],
OnShow: []
},
plugins: [],
menuitems: [],
chromeitems: [],
loadPlugin(plugin = "") {
if (plugin == "") {
return
}
ipcRenderer.send("load-plugin", plugin)
},
execute(type = "Start", args = {}) {
let self = this
if (!this.events[type]) {
console.warn(`[Plugins] Event type: ${type} not found!`)
return
} else {
console.info(`[Plugins] Event type: ${type} called`) //info makes it more distingishable in the console (more Beginner friendly)
}
this.events[type].forEach(element => {
element(args)
});
}
};
class AMEPlugin_Menuitem {
constructor() {
this.Text = ""
this.Icon = ""
this.OnClick = () => {}
}
get() {
JSON.stringify(this)
}
}
class AMEPluginHelper {
constructor() {
/**
* Adds all events to the _plugins event queue
*/
_plugins.events.Start.push(this.Start)
_plugins.events.OnNavigation.push(this.OnNavigation)
_plugins.events.OnPlaybackStateChanged.push(this.OnPlaybackStateChanged)
_plugins.events.OnExit.push(this.OnExit)
_plugins.events.OnHide.push(this.OnHide)
_plugins.events.OnShow.push(this.OnShow)
this.name = "Plugin Name"
this.Start()
this.Announce()
}
/**
* Announces that the plugin has loaded in console
*/
Announce() {
console.info(`[Plugins] Plugin: ${this.name} loaded.`)
}
/**
* Excutes when the web player has fully loaded
*/
Start() {}
/**
* Executes when playback state is changed (WIP)
*/
OnPlaybackStateChanged() {}
/**
* Executes when the user changes pages on the site or opens a context menu
* ex: Songs to Playlist screen
*/
OnNavigation() {}
/**
* Executes when the application exits (WIP)
*/
OnExit() {}
/**
* Executes when the application is hidden to the taskbar
*/
OnHide() {}
/**
* Executes when the application is unhidden (WIP)
*/
OnShow() {}
/**
* Adds a menu item to the profile menu (WIP)
*/
AddMenuItem({
Text = "",
Icon = "",
OnClick = () => {}
}) {
var menuitem = new AMEPlugin_Menuitem()
menuitem.Text = Text
menuitem.Icon = Icon
menuitem.OnClick = OnClick
_plugins.menuitems.push(menuitem)
}
/**
* Adds a button to the web chrome after the volume meter (WIP)
*/
AddChromeButton({
text = "",
style = {},
onclick = () => {}
}) {
var btn = document.createElement("button")
btn.classList.add("button-reset")
var btnStyle = {
width: 38
}
}
}

View file

@ -1,19 +0,0 @@
try {
function matchRuleShort(str, rule) {
var escapeRegex = (str) => str.replace(/([.*+?^=!:${}()|\[\]\/\\])/g, "\\$1");
return new RegExp("^" + rule.split("*").map(escapeRegex).join(".*") + "$").test(str);
}
if(AMJavaScript.getQuery("amesettings")) {
if (!storedInnerHTML && document.getElementsByTagName('footer').length !== 0) {
var storedInnerHTML = document.getElementsByTagName('footer')[0].innerHTML;
}
if (matchRuleShort(window.location.href, '*settings*') && document.getElementsByClassName('application-preferences').length === 0) {
AMSettings.CreateMenu('commerce-full-content');
} else if (document.getElementsByTagName('footer').length === 1) {
document.getElementsByTagName('footer')[0].innerHTML = storedInnerHTML; /* Revert the footer */
}
}
} catch (e) {
console.error("[JS] Error while trying to apply settingsPage.js", e);
}

View file

@ -1,542 +0,0 @@
var _tests = {
remoteUI() {
AMJavaScript.getRequest("ameres://html/itunes_remote.html", (content)=>{
var vm = new Vue({
data: {
passcode: {
0: "",
1: "",
2: "",
3: ""
},
state: "pin"
},
methods: {
close() {
modal.close()
},
jumpToNum(num) {
document.querySelector(`#passcode-num-${num}`).focus()
document.querySelector(`#passcode-num-${num}`).select()
},
retry() {
this.passcode = {0:"",1:"",2:"",3:""}
this.state = "pin"
},
connect() {
let self = this
this.state = "connecting"
setTimeout(()=>{
self.state = "success"
}, 2000)
}
}
})
var modal = new AMEModal({
content: content,
CloseButton: false,
Dismissible: false,
Style: {
maxWidth: "700px",
maxHeight: "400px"
},
OnCreate() {
vm.$mount("#itunes-remote-vue")
vm.jumpToNum(0)
},
OnClose() {
_vues.destroy(vm)
}
})
})
},
usermenuinit() {
// MOVE ME ONCE IMPLEMENTED!
// Clone the user menu
var umClone = document.querySelector(".web-chrome-controls-container>.web-navigation__auth").cloneNode(true)
// Hide the existing menu
document.querySelector(".web-chrome-controls-container>.web-navigation__auth").style.display = "none"
// Append cloned menu
document.querySelector(".web-chrome-controls-container").append(umClone)
// Set cloned menu events
umClone.addEventListener("click", (e)=>{
_tests.usermenu(e)
})
},
usermenu(e) {
// MOVE ME ONCE IMPLEMENTED!
AMJavaScript.getRequest("ameres://html/usermenu.html", (content) => {
var vm = new Vue({
data: {
menuitems: [
{
label: "Help",
visible: true,
icon: "",
svg: `<svg class="context-menu__option-icon" viewBox="0 0 64 64"><path d="M32.32 61.417c16.075 0 29.08-13.032 29.08-29.164 0-16.103-13.005-29.135-29.08-29.135C16.215 3.117 3.238 16.15 3.238 32.253c0 16.132 12.977 29.164 29.082 29.164zm0-5.672c-13.033 0-23.243-10.515-23.243-23.492 0-12.95 10.21-23.463 23.243-23.463 13.032 0 23.213 10.515 23.213 23.463 0 12.977-10.183 23.492-23.213 23.492zm-.665-17.985c1.522 0 2.517-.885 2.6-2.02v-.333c.083-1.437 1.08-2.379 2.878-3.54 2.74-1.8 4.484-3.377 4.484-6.585 0-4.594-4.15-7.222-9.077-7.222-4.758 0-7.967 2.13-8.827 4.732-.166.496-.276.966-.276 1.466 0 1.327 1.051 2.185 2.325 2.185 1.605 0 1.991-.83 2.821-1.8.887-1.355 2.075-2.156 3.709-2.156 2.185 0 3.596 1.245 3.596 3.071 0 1.715-1.161 2.6-3.486 4.234-1.964 1.355-3.404 2.793-3.404 5.256v.305c0 1.577.942 2.407 2.657 2.407zm-.027 8.495c1.77 0 3.237-1.3 3.237-3.043 0-1.772-1.438-3.045-3.237-3.045-1.826 0-3.266 1.3-3.266 3.045 0 1.715 1.466 3.043 3.266 3.043z"></path></svg>`,
onclick: () => {
window.open(`https://support.apple.com/guide/music-web`)
}
},
{
label: "Discord",
visible: true,
icon: "",
svg: `<svg xmlns="http://www.w3.org/2000/svg" width="28" height="20" fill-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2" clip-rule="evenodd" viewBox="0 0 28 20" xml:space="preserve" class="context-menu__option-icon">
<path d="M23.0212 1.67671C21.3107 0.879656 19.5079 0.318797 17.6584 0C17.4062 0.461742 17.1749 0.934541 16.9708 1.4184C15.003 1.12145 12.9974 1.12145 11.0283 1.4184C10.819 0.934541 10.589 0.461744 10.3368 0.00546311C8.48074 0.324393 6.67795 0.885118 4.96746 1.68231C1.56727 6.77853 0.649666 11.7538 1.11108 16.652C3.10102 18.1418 5.3262 19.2743 7.69177 20C8.22338 19.2743 8.69519 18.4993 9.09812 17.691C8.32996 17.3997 7.58522 17.0424 6.87684 16.6135C7.06531 16.4762 7.24726 16.3387 7.42403 16.1847C11.5911 18.1749 16.408 18.1749 20.5763 16.1847C20.7531 16.3332 20.9351 16.4762 21.1171 16.6135C20.41 17.0369 19.6639 17.3997 18.897 17.691C19.3052 18.4993 19.7718 19.2689 20.3021 19.9945C22.6677 19.2689 24.8929 18.1364 26.8828 16.6466H26.8893C27.43 10.9731 25.9665 6.04728 23.0212 1.67671ZM9.68041 13.6383C8.39754 13.6383 7.34085 12.4453 7.34085 10.994C7.34085 9.54272 8.37155 8.34973 9.68041 8.34973C10.9893 8.34973 12.0395 9.54272 12.0187 10.994C12.0187 12.4453 10.9828 13.6383 9.68041 13.6383ZM18.3161 13.6383C17.0332 13.6383 15.9765 12.4453 15.9765 10.994C15.9765 9.54272 17.0124 8.34973 18.3161 8.34973C19.6184 8.34973 20.6751 9.54272 20.6543 10.994C20.6543 12.4453 19.6184 13.6383 18.3161 13.6383Z"</path>
</svg>`,
onclick: () => {
window.open(`https://discord.gg/CezHYdXHEM`)
}
},
{
label: "Account Settings",
visible: true,
icon: "",
svg: `<svg width="24" height="24" viewBox="0 0 24 24" stroke="#212b36" stroke-width="2" fill-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2" clip-rule="evenodd" xml:space="preserve" class="context-menu__option-icon">
<circle cx="12" cy="8" r="5" />
<path d="M3,21 h18 C 21,12 3,12 3,21"/>
</svg>`,
onclick: () => {
history.pushState("settings", "Settings", "/account/settings/")
window.location.href = "#"
}
},
{
label: "Preferences",
visible: true,
icon: "",
svg: `<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" fill-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2" clip-rule="evenodd" version="1.1" viewBox="0 0 16 16" xml:space="preserve" class="context-menu__option-icon"><path fill-rule="nonzero" d="M31.475,57.622C32.114,57.622 32.702,57.571 33.34,57.52L34.77,60.228C35.077,60.891 35.766,61.249 36.558,61.12C37.298,60.994 37.809,60.43 37.912,59.665L38.346,56.651C39.546,56.32 40.696,55.885 41.845,55.4L44.066,57.392C44.629,57.928 45.369,58.031 46.085,57.648C46.749,57.263 47.005,56.575 46.877,55.809L46.238,52.82C47.26,52.115 48.218,51.321 49.098,50.445L51.883,51.62C52.597,51.928 53.313,51.748 53.849,51.11C54.334,50.548 54.411,49.806 53.977,49.143L52.367,46.537C53.079,45.524 53.695,44.446 54.207,43.318L57.247,43.472C58.012,43.498 58.677,43.089 58.907,42.349C59.163,41.658 58.933,40.876 58.345,40.432L55.945,38.543C56.249,37.393 56.505,36.143 56.606,34.866L59.468,33.946C60.234,33.716 60.694,33.128 60.694,32.362C60.694,31.571 60.234,31.008 59.468,30.752L56.606,29.834C56.505,28.557 56.249,27.357 55.945,26.157L58.318,24.265C58.932,23.806 59.162,23.091 58.906,22.375C58.676,21.66 58.012,21.226 57.245,21.252L54.206,21.38C53.645,20.23 53.083,19.183 52.368,18.135L53.977,15.555C54.387,14.965 54.334,14.17 53.849,13.64C53.312,12.977 52.597,12.825 51.883,13.105L49.098,14.254C48.198,13.4 47.242,12.606 46.237,11.878L46.877,8.915C47.005,8.149 46.723,7.434 46.085,7.077C45.369,6.692 44.629,6.769 44.066,7.332L41.846,9.298C40.702,8.821 39.535,8.404 38.348,8.048L37.914,5.058C37.834,4.32 37.267,3.722 36.534,3.603C35.768,3.5 35.078,3.833 34.772,4.471L33.342,7.178C32.703,7.154 32.115,7.102 31.477,7.102C30.838,7.102 30.251,7.154 29.612,7.178L28.182,4.471C27.849,3.832 27.186,3.501 26.394,3.603C25.654,3.731 25.144,4.293 25.04,5.058L24.606,8.048C23.406,8.405 22.231,8.814 21.108,9.298L18.885,7.332C18.298,6.769 17.583,6.694 16.842,7.077C16.203,7.434 15.949,8.149 16.075,8.942L16.714,11.878C15.709,12.606 14.753,13.4 13.852,14.254L11.069,13.104C10.329,12.824 9.639,12.977 9.077,13.64C8.618,14.179 8.566,14.96 8.949,15.555L10.559,18.135C9.875,19.17 9.269,20.255 8.746,21.38L5.68,21.252C4.941,21.219 4.264,21.677 4.02,22.375C3.79,23.091 3.995,23.806 4.608,24.266L6.982,26.154C6.7,27.354 6.445,28.554 6.343,29.831L3.457,30.751C2.717,30.981 2.282,31.569 2.282,32.36C2.282,33.126 2.717,33.714 3.457,33.945L6.343,34.889C6.445,36.14 6.675,37.392 6.982,38.542L4.606,40.43C4.022,40.877 3.785,41.65 4.018,42.347C4.253,43.052 4.938,43.515 5.68,43.47L8.745,43.316C9.28,44.466 9.868,45.539 10.557,46.534L8.947,49.141C8.551,49.751 8.604,50.554 9.077,51.107C9.64,51.745 10.329,51.924 11.069,51.617L13.828,50.442C14.722,51.312 15.688,52.107 16.714,52.817L16.075,55.807C15.948,56.573 16.203,57.262 16.868,57.645C17.583,58.028 18.298,57.925 18.86,57.415L21.106,55.397C22.231,55.882 23.406,56.317 24.606,56.648L25.04,59.664C25.143,60.428 25.654,60.991 26.394,61.144C27.186,61.247 27.849,60.888 28.182,60.225L29.612,57.517C30.251,57.568 30.838,57.619 31.477,57.619L31.475,57.621L31.475,57.622ZM38.168,30.345C36.891,27.049 34.337,25.262 31.322,25.262C30.762,25.261 30.205,25.33 29.662,25.466L22.766,13.64C25.492,12.368 28.466,11.714 31.474,11.724C42.254,11.724 50.732,19.822 51.729,30.344L38.168,30.344L38.168,30.345ZM11.145,32.362C11.145,25.543 14.286,19.515 19.242,15.762L26.188,27.637C24.834,29.145 24.222,30.752 24.222,32.438C24.222,34.074 24.809,35.58 26.188,37.138L19.063,48.835C14.209,45.055 11.145,39.105 11.145,32.362ZM28.283,32.412C28.283,30.702 29.738,29.374 31.373,29.374C33.085,29.374 34.489,30.702 34.489,32.412C34.481,34.114 33.076,35.509 31.374,35.505C29.738,35.505 28.282,34.125 28.282,32.412L28.283,32.412ZM31.475,53.025C28.257,53.025 25.218,52.285 22.562,50.982L29.637,39.386C30.377,39.565 30.887,39.616 31.322,39.616C34.362,39.616 36.915,37.776 38.168,34.405L51.729,34.405C50.732,44.903 42.252,53.025 31.475,53.025Z" transform="matrix(.27119 0 0 .27119 -.54 -.78)"></path></svg>`,
onclick: () => {
history.pushState("settings", "Settings", "/account/settings/?amesettings=1")
window.location.href = "#"
}
},
{
label: "Equalizer",
visible: AudioOutputs.eqReady,
svg: `<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="context-menu__option-icon" width="100%" height="100%" viewBox="0 0 16 16" version="1.1">
<g>
<path style=" stroke:none;fill-rule:nonzero;fill:currentColor;fill-opacity:1;" d="M 12.050781 0 L 14.214844 0 L 14.214844 4.808594 L 12.050781 4.808594 Z M 12.050781 0 "/>
<path style=" stroke:none;fill-rule:nonzero;fill:currentColor;fill-opacity:1;" d="M 12.050781 7.421875 L 14.214844 7.421875 L 14.214844 15.988281 L 12.050781 15.988281 Z M 12.050781 7.421875 "/>
<path style=" stroke:none;fill-rule:nonzero;fill:currentColor;fill-opacity:1;" d="M 6.914062 0 L 9.078125 0 L 9.078125 8.910156 L 6.914062 8.910156 Z M 6.914062 0 "/>
<path style=" stroke:none;fill-rule:nonzero;fill:currentColor;fill-opacity:1;" d="M 6.914062 11.527344 L 9.078125 11.527344 L 9.078125 15.988281 L 6.914062 15.988281 Z M 6.914062 11.527344 "/>
<path style=" stroke:none;fill-rule:nonzero;fill:currentColor;fill-opacity:1;" d="M 1.773438 0 L 3.9375 0 L 3.9375 1.472656 L 1.773438 1.472656 Z M 1.773438 0 "/>
<path style=" stroke:none;fill-rule:nonzero;fill:currentColor;fill-opacity:1;" d="M 1.773438 4.085938 L 3.9375 4.085938 L 3.9375 15.988281 L 1.773438 15.988281 Z M 1.773438 4.085938 "/>
<path style=" stroke:none;fill-rule:nonzero;fill:currentColor;fill-opacity:1;" d="M 0.871094 1.921875 L 0.871094 3.636719 L 4.839844 3.636719 L 4.839844 1.921875 Z M 0.871094 1.921875 "/>
<path style=" stroke:none;fill-rule:nonzero;fill:currentColor;fill-opacity:1;" d="M 6.011719 9.363281 L 6.011719 11.074219 L 9.976562 11.074219 L 9.976562 9.363281 Z M 6.011719 9.363281 "/>
<path style=" stroke:none;fill-rule:nonzero;fill:currentColor;fill-opacity:1;" d="M 12.050781 5.257812 L 11.152344 5.257812 L 11.152344 6.972656 L 15.117188 6.972656 L 15.117188 5.257812 Z M 12.050781 5.257812 "/>
</g>
</svg>`,
onclick: () => {
_tests.eq()
}
},
{
label: "Sign Out",
visible: true,
icon: "",
style: {
color: "var(--systemRed)"
},
onclick: () => {
MusicKit.getInstance().unauthorize()
}
}
]
},
methods: {
close() {
modal.close()
}
}
})
var calc = {
width: 185,
left: e.clientX - (185 / 2)
}
// calculate the position of the menu based on the mouse position and the width of the menu itself
if (calc.left + calc.width > window.innerWidth) {
calc.left = (window.innerWidth - calc.width)
}
if (calc.left < 0) {
calc.left = 0
}
var modal = new AMEModal({
content: content,
CloseButton: false,
ModalClasses: ["ameUserMenu"],
BackdropStyle: {
background: "transparent"
},
Style: {
height: "auto",
width: `${calc["width"]}px`,
position: "absolute",
// top: "46px",
// right: "142px"
top: `46px`,
left: `${calc.left}px`
},
OnCreate() {
vm.$mount("#usermenu-vue")
if(typeof _plugins != "undefined") {
_plugins.menuitems.forEach((menuitem)=>{
vm.menuitems.unshift({
label: menuitem["Text"],
onclick: menuitem["OnClick"],
icon: "",
visible: true
})
})
}
},
OnClose() {
_vues.destroy(vm)
}
})
})
},
eq() {
AMJavaScript.getRequest("ameres://html/eq.html", (content) => {
var vm = new Vue({
data: {
manualEntry: false,
bass: bassFilter.gain.value.toFixed(2),
treble: trebleFilter.gain.value.toFixed(2),
gain: AMEx.result.gain.gain.value.toFixed(2)
},
methods: {
reset() {
this.bass = 0
bassFilter.gain.value = 0
this.treble = 0
trebleFilter.gain.value = 0
this.gain = 0
AMEx.result.gain.gain.value = 0
},
close() {
modal.close()
}
}
})
var modal = new AMEModal({
content: content,
CloseButton: false,
ModalClasses: ["ameUserMenu"],
BackdropStyle: {
background: "transparent"
},
Style: {
animation: "ameEQIn .10s var(--appleEase)",
width: "306px",
height: "254px",
position: "absolute",
top: "46px",
right: "42px"
},
OnCreate() {
vm.$mount("#eq-vm")
}
})
})
},
zoo() {
AMJavaScript.getRequest("ameres://html/zoo.html", (content) => {
var modal = new AMEModal({
content: content
})
})
},
outputDevice() {
AMJavaScript.getRequest("ameres://html/outputdevice.html", (content) => {
var vm = new Vue({
data: {
selected: "",
audio: document.querySelector("#apple-music-player"),
devices: []
},
methods: {
setOutputDevice(id) {
if (this.audio) {
selected = id
sessionStorage.setItem("outputDevice", id)
this.audio.setSinkId(id)
}
}
}
})
var modal = new AMEModal({
content: content,
Style: {
width: "30%",
minWidth: "500px"
},
OnCreate() {
vm.$mount("#outputdevices-vue")
if (vm.audio) {
vm.selected = audio.sinkId
} else {
vm.selected = "default"
}
navigator.mediaDevices.enumerateDevices()
.then(function (devices) {
vm.devices = devices.filter((device) => {
if (device.kind == "audiooutput") {
return device
}
})
})
.catch(function (err) {
console.log(err.name + ": " + err.message)
})
},
OnClose() {
_vues.destroy(vm)
}
})
})
},
stats() {
var container = document.createElement("div")
var frameRate = document.createElement("div")
var listeners = document.createElement("div")
Object.assign(container.style,
{
textAlign: "center",
position: "absolute",
fontSize: "18px",
bottom: "16px",
right: "16px",
pointerEvents: "none",
zIndex: 99991,
color: "white",
webkitTextStroke: "0.2px black"
})
document.body.appendChild(container)
container.appendChild(frameRate)
container.appendChild(listeners)
const times = [];
let fps;
function refreshLoop() {
window.requestAnimationFrame(() => {
const now = performance.now();
while (times.length > 0 && times[0] <= now - 1000) {
times.shift();
}
times.push(now);
fps = times.length;
frameRate.innerText = `${fps} FPS`
refreshLoop();
});
}
refreshLoop();
},
oobe(skipIntro = false, closeBtn = false) {
// MOVE ME ONCE IMPLEMENTED!
AMJavaScript.getRequest("ameres://html/oobe.html", (content) => {
var vm = new Vue({
data: {
prefs: {
general: {
storefront: "us",
discordRPC: "",
analyticsEnabled: true
},
visual: {
theme: "",
transparencyEffect: "",
useOperatingSystemAccent: false,
scaling: 1,
mxmon: false,
yton: false,
mxmlanguage: "en",
removeScrollbars: true
},
audio: {
audioQuality: "auto",
seamlessAudioTransitions: true,
castingBitDepth: '16',
enableDLNA: false,
},
window: {
closeButtonMinimize: true
}
},
page: "intro",
},
methods: {
btn() {
console.info("Button clicked")
},
getPrefs() {
let self = this
ipcRenderer.invoke("getStoreValue", "audio.audioQuality").then((result) => {
self.prefs.audio.audioQuality = result
})
ipcRenderer.invoke("getStoreValue", "audio.seamlessAudioTransitions").then((result) => {
self.prefs.audio.seamlessAudioTransitions = result
})
ipcRenderer.invoke("getStoreValue", "audio.castingBitDepth").then((result) => {
self.prefs.audio.castingBitDepth = result
})
ipcRenderer.invoke("getStoreValue", "audio.enableDLNA").then((result) => {
self.prefs.audio.enableDLNA = result
})
ipcRenderer.invoke("getStoreValue", "general.storefront").then((result) => {
self.prefs.general.storefront = result
})
ipcRenderer.invoke("getStoreValue", "general.discordRPC").then((result) => {
self.prefs.general.discordRPC = result
})
ipcRenderer.invoke("getStoreValue", "general.analyticsEnabled").then((result) => {
self.prefs.general.analyticsEnabled = result
})
ipcRenderer.invoke("getStoreValue", "window.closeButtonMinimize").then((result) => {
self.prefs.window.closeButtonMinimize = result
})
ipcRenderer.invoke("getStoreValue", "visual.theme").then((result) => {
self.prefs.visual.theme = result
})
ipcRenderer.invoke("getStoreValue", "visual.transparencyEffect").then((result) => {
self.prefs.visual.transparencyEffect = result
})
ipcRenderer.invoke("getStoreValue", "visual.useOperatingSystemAccent").then((result) => {
self.prefs.visual.useOperatingSystemAccent = result
})
ipcRenderer.invoke("getStoreValue", "visual.mxmon").then((result) => {
self.prefs.visual.mxmon = result
})
ipcRenderer.invoke("getStoreValue", "visual.yton").then((result) => {
self.prefs.visual.yton = result
})
ipcRenderer.invoke("getStoreValue", "visual.mxmlanguage").then((result) => {
self.prefs.visual.mxmlanguage = result
})
ipcRenderer.invoke("getStoreValue", "visual.removeScrollbars").then((result) => {
self.prefs.visual.removeScrollbars = result
})
},
setPrefs() {
let self = this
ipcRenderer.invoke("setStoreValue", "audio.audioQuality", self.prefs.audio.audioQuality)
ipcRenderer.invoke("setStoreValue", "audio.seamlessAudioTransitions", self.prefs.audio.seamlessAudioTransitions)
ipcRenderer.invoke("setStoreValue", "audio.castingBitDepth", self.prefs.audio.castingBitDepth)
ipcRenderer.invoke("setStoreValue", "audio.enableDLNA", self.prefs.audio.enableDLNA)
ipcRenderer.invoke("setStoreValue", "general.storefront", self.prefs.general.storefront)
ipcRenderer.invoke("setStoreValue", "general.discordRPC", self.prefs.general.discordRPC)
ipcRenderer.invoke("setStoreValue", "general.analyticsEnabled", self.prefs.general.analyticsEnabled)
ipcRenderer.invoke("setStoreValue", "window.closeButtonMinimize", self.prefs.window.closeButtonMinimize)
ipcRenderer.invoke("setStoreValue", "visual.theme", self.prefs.visual.theme)
ipcRenderer.invoke("setStoreValue", "visual.transparencyEffect", self.prefs.visual.transparencyEffect)
ipcRenderer.invoke("setStoreValue", "visual.useOperatingSystemAccent", self.prefs.visual.useOperatingSystemAccent)
ipcRenderer.invoke("setStoreValue", "visual.mxmon", self.prefs.visual.mxmon)
ipcRenderer.invoke("setStoreValue", "visual.yton", self.prefs.visual.yton)
ipcRenderer.invoke("setStoreValue", "visual.mxmlanguage", self.prefs.visual.mxmlanguage)
ipcRenderer.invoke("setStoreValue", "visual.removeScrollbars", self.prefs.visual.removeScrollbars)
},
promptRelaunch() {
var relaunch = confirm(
"Relaunch Required\nA relaunch is required in order for the settings you have changed to apply."
)
if (relaunch) {
ipcRenderer.send("relaunchApp")
}
},
close() {
this.setPrefs()
// this.promptRelaunch()
modal.close()
},
init() {
let self = this
document.getElementById('introVideo').addEventListener('ended', () => {
self.page = "welcome"
}, false);
this.getPrefs()
},
enableBlur() {
modal.setStyle("backdrop", {
backdropFilter: "blur(16px) saturate(180%)"
})
},
disableBlur() {
modal.setStyle("backdrop", {
backdropFilter: "blur(0px)"
})
}
}
})
var modal = new AMEModal({
content: content,
CloseButton: closeBtn,
Dismissible: closeBtn,
OnCreate() {
vm.$mount("#oobe-vue")
if (skipIntro) {
vm.page = "welcome"
} else {
vm.init()
}
},
OnClose() {
_vues.destroy(vm);
if (!MusicKit.getInstance().isAuthorized) {
MusicKit.getInstance().authorize();
}
}
})
})
}
};
if (ipcRenderer.sendSync('showOOBE')) {
setTimeout(() => {
_tests.oobe();
}, 200)
}

View file

@ -1,147 +0,0 @@
var _vues = {
instances: [],
killVue(id) {
let self = this
this.instances = this.instances.filter((instance) => {
console.warn(`Requested destroy: ${id}`)
if (instance["_amID"] != id) {
console.warn("Found vue")
console.warn("Destroying Vue")
instance.$destroy()
} else {
return instance
}
})
},
gc() {
var needsGC = this.instances.every((val, i, arr) => val == undefined)
if (needsGC) {
this.instances = []
}
},
destroy(vue) {
vue.$destroy()
vue = undefined
console.info("Destroyed Vue instance")
},
killAll() {
// Kill all Vue instances
this.instances.forEach((instance) => {
instance.$destroy()
instance = null
})
this.instances = []
}
};
class AMEModal {
constructor({
content = "",
OnCreate = () => {
},
OnClose = () => {
},
CloseButton = true,
Style = {},
ModalClasses = [],
BackdropStyle = {},
Dismissible = true
}) {
this.Style = Style
this.BackdropStyle = BackdropStyle
this.ModalClasses = ModalClasses
this.closeButton = CloseButton
this.content = content
this.OnClose = OnClose
this.OnCreate = OnCreate
this.Dismissible = Dismissible
this.modal = {}
this.create()
}
create() {
let self = this
var backdrop = document.createElement("div")
var dismissArea = document.createElement("div")
var modalWin = document.createElement("div")
var modalCloseBtn = document.createElement("button")
var modalContent = document.createElement("div")
backdrop.classList.add("ameModal-Backdrop")
modalWin.classList.add("ameModal")
modalCloseBtn.classList.add("ameModal-Close")
modalCloseBtn.innerHTML = ("Close")
modalCloseBtn.addEventListener("click", () => {
self.close()
}, {once: true})
Object.assign(dismissArea.style, {
width: "100%",
height: "100%",
position: "absolute",
top: "0px",
left: "0px",
cursor: "pointer"
})
modalContent.style.height = "100%"
setInnerHTML(modalContent, this.content)
if(this.closeButton) {
modalWin.appendChild(modalCloseBtn)
}
if(this.Dismissible) {
dismissArea.addEventListener("click",()=>{
self.close()
}, {once: true})
document.addEventListener("keyup", (e)=>{
if(e.key == "Escape") {
self.close()
}
}, {once: true})
backdrop.appendChild(dismissArea)
}
modalWin.appendChild(modalContent)
Object.assign(backdrop.style, this.BackdropStyle)
this.ModalClasses.forEach((cssClass)=>{
modalWin.classList.add(cssClass)
})
if(document.querySelectorAll(".ameModal").length == 0) {
document.body.classList.add("no-acrylic")
}
Object.assign(modalWin.style, this.Style)
backdrop.appendChild(modalWin)
document.body.appendChild(backdrop)
this.modal = {
backdrop: backdrop,
window: modalWin,
content: modalContent,
closeBtn: modalCloseBtn
}
this.OnCreate()
}
close() {
this.OnClose()
this.modal.backdrop.style.background = "transparent"
this.modal.window.classList.add("ameModal-closing")
setTimeout(()=>{
this.modal.backdrop.remove()
if(document.querySelectorAll(".ameModal").length == 0) {
document.body.classList.remove("no-acrylic")
}
}, 100)
}
setStyle (element, style = {}) {
if(this.modal[element]) {
Object.assign(this.modal[element].style, style)
}else{
console.warn(`Undefined modal element "${element}", available modals are: "backdrop", "window", "closeBtn"`)
}
}
OnCreate() {
}
OnClose() {
}
};

File diff suppressed because one or more lines are too long

View file

@ -1,4 +0,0 @@
{
"key": "174905d201451602407b428a86e8344d",
"secret": "be61d4081f6adec150f0130939f854bb"
}

View file

@ -1,872 +0,0 @@
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
/*
* quantize.js Copyright 2008 Nick Rabinowitz
* Ported to node.js by Olivier Lesnicki
* Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php
*/
// fill out a couple protovis dependencies
/*
* Block below copied from Protovis: http://mbostock.github.com/protovis/
* Copyright 2010 Stanford Visualization Group
* Licensed under the BSD License: http://www.opensource.org/licenses/bsd-license.php
*/
if (!pv) {
var pv = {
map: function(array, f) {
var o = {};
return f ? array.map(function(d, i) {
o.index = i;
return f.call(o, d);
}) : array.slice();
},
naturalOrder: function(a, b) {
return (a < b) ? -1 : ((a > b) ? 1 : 0);
},
sum: function(array, f) {
var o = {};
return array.reduce(f ? function(p, d, i) {
o.index = i;
return p + f.call(o, d);
} : function(p, d) {
return p + d;
}, 0);
},
max: function(array, f) {
return Math.max.apply(null, f ? pv.map(array, f) : array);
}
}
}
/**
* Basic Javascript port of the MMCQ (modified median cut quantization)
* algorithm from the Leptonica library (http://www.leptonica.com/).
* Returns a color map you can use to map original pixels to the reduced
* palette. Still a work in progress.
*
* @author Nick Rabinowitz
* @example
// array of pixels as [R,G,B] arrays
var myPixels = [[190,197,190], [202,204,200], [207,214,210], [211,214,211], [205,207,207]
// etc
];
var maxColors = 4;
var cmap = MMCQ.quantize(myPixels, maxColors);
var newPalette = cmap.palette();
var newPixels = myPixels.map(function(p) {
return cmap.map(p);
});
*/
var MMCQ = (function() {
// private constants
var sigbits = 5,
rshift = 8 - sigbits,
maxIterations = 1000,
fractByPopulations = 0.75;
// get reduced-space color index for a pixel
function getColorIndex(r, g, b) {
return (r << (2 * sigbits)) + (g << sigbits) + b;
}
// Simple priority queue
function PQueue(comparator) {
var contents = [],
sorted = false;
function sort() {
contents.sort(comparator);
sorted = true;
}
return {
push: function(o) {
contents.push(o);
sorted = false;
},
peek: function(index) {
if (!sorted) sort();
if (index === undefined) index = contents.length - 1;
return contents[index];
},
pop: function() {
if (!sorted) sort();
return contents.pop();
},
size: function() {
return contents.length;
},
map: function(f) {
return contents.map(f);
},
debug: function() {
if (!sorted) sort();
return contents;
}
};
}
// 3d color space box
function VBox(r1, r2, g1, g2, b1, b2, histo) {
var vbox = this;
vbox.r1 = r1;
vbox.r2 = r2;
vbox.g1 = g1;
vbox.g2 = g2;
vbox.b1 = b1;
vbox.b2 = b2;
vbox.histo = histo;
}
VBox.prototype = {
volume: function(force) {
var vbox = this;
if (!vbox._volume || force) {
vbox._volume = ((vbox.r2 - vbox.r1 + 1) * (vbox.g2 - vbox.g1 + 1) * (vbox.b2 - vbox.b1 + 1));
}
return vbox._volume;
},
count: function(force) {
var vbox = this,
histo = vbox.histo;
if (!vbox._count_set || force) {
var npix = 0,
i, j, k;
for (i = vbox.r1; i <= vbox.r2; i++) {
for (j = vbox.g1; j <= vbox.g2; j++) {
for (k = vbox.b1; k <= vbox.b2; k++) {
index = getColorIndex(i, j, k);
npix += (histo[index] || 0);
}
}
}
vbox._count = npix;
vbox._count_set = true;
}
return vbox._count;
},
copy: function() {
var vbox = this;
return new VBox(vbox.r1, vbox.r2, vbox.g1, vbox.g2, vbox.b1, vbox.b2, vbox.histo);
},
avg: function(force) {
var vbox = this,
histo = vbox.histo;
if (!vbox._avg || force) {
var ntot = 0,
mult = 1 << (8 - sigbits),
rsum = 0,
gsum = 0,
bsum = 0,
hval,
i, j, k, histoindex;
for (i = vbox.r1; i <= vbox.r2; i++) {
for (j = vbox.g1; j <= vbox.g2; j++) {
for (k = vbox.b1; k <= vbox.b2; k++) {
histoindex = getColorIndex(i, j, k);
hval = histo[histoindex] || 0;
ntot += hval;
rsum += (hval * (i + 0.5) * mult);
gsum += (hval * (j + 0.5) * mult);
bsum += (hval * (k + 0.5) * mult);
}
}
}
if (ntot) {
vbox._avg = [~~(rsum / ntot), ~~ (gsum / ntot), ~~ (bsum / ntot)];
} else {
//console.log('empty box');
vbox._avg = [~~(mult * (vbox.r1 + vbox.r2 + 1) / 2), ~~ (mult * (vbox.g1 + vbox.g2 + 1) / 2), ~~ (mult * (vbox.b1 + vbox.b2 + 1) / 2)];
}
}
return vbox._avg;
},
contains: function(pixel) {
var vbox = this,
rval = pixel[0] >> rshift;
gval = pixel[1] >> rshift;
bval = pixel[2] >> rshift;
return (rval >= vbox.r1 && rval <= vbox.r2 &&
gval >= vbox.g1 && gval <= vbox.g2 &&
bval >= vbox.b1 && bval <= vbox.b2);
}
};
// Color map
function CMap() {
this.vboxes = new PQueue(function(a, b) {
return pv.naturalOrder(
a.vbox.count() * a.vbox.volume(),
b.vbox.count() * b.vbox.volume()
)
});;
}
CMap.prototype = {
push: function(vbox) {
this.vboxes.push({
vbox: vbox,
color: vbox.avg()
});
},
palette: function() {
return this.vboxes.map(function(vb) {
return vb.color
});
},
size: function() {
return this.vboxes.size();
},
map: function(color) {
var vboxes = this.vboxes;
for (var i = 0; i < vboxes.size(); i++) {
if (vboxes.peek(i).vbox.contains(color)) {
return vboxes.peek(i).color;
}
}
return this.nearest(color);
},
nearest: function(color) {
var vboxes = this.vboxes,
d1, d2, pColor;
for (var i = 0; i < vboxes.size(); i++) {
d2 = Math.sqrt(
Math.pow(color[0] - vboxes.peek(i).color[0], 2) +
Math.pow(color[1] - vboxes.peek(i).color[1], 2) +
Math.pow(color[2] - vboxes.peek(i).color[2], 2)
);
if (d2 < d1 || d1 === undefined) {
d1 = d2;
pColor = vboxes.peek(i).color;
}
}
return pColor;
},
forcebw: function() {
// XXX: won't work yet
var vboxes = this.vboxes;
vboxes.sort(function(a, b) {
return pv.naturalOrder(pv.sum(a.color), pv.sum(b.color))
});
// force darkest color to black if everything < 5
var lowest = vboxes[0].color;
if (lowest[0] < 5 && lowest[1] < 5 && lowest[2] < 5)
vboxes[0].color = [0, 0, 0];
// force lightest color to white if everything > 251
var idx = vboxes.length - 1,
highest = vboxes[idx].color;
if (highest[0] > 251 && highest[1] > 251 && highest[2] > 251)
vboxes[idx].color = [255, 255, 255];
}
};
// histo (1-d array, giving the number of pixels in
// each quantized region of color space), or null on error
function getHisto(pixels) {
var histosize = 1 << (3 * sigbits),
histo = new Array(histosize),
index, rval, gval, bval;
pixels.forEach(function(pixel) {
rval = pixel[0] >> rshift;
gval = pixel[1] >> rshift;
bval = pixel[2] >> rshift;
index = getColorIndex(rval, gval, bval);
histo[index] = (histo[index] || 0) + 1;
});
return histo;
}
function vboxFromPixels(pixels, histo) {
var rmin = 1000000,
rmax = 0,
gmin = 1000000,
gmax = 0,
bmin = 1000000,
bmax = 0,
rval, gval, bval;
// find min/max
pixels.forEach(function(pixel) {
rval = pixel[0] >> rshift;
gval = pixel[1] >> rshift;
bval = pixel[2] >> rshift;
if (rval < rmin) rmin = rval;
else if (rval > rmax) rmax = rval;
if (gval < gmin) gmin = gval;
else if (gval > gmax) gmax = gval;
if (bval < bmin) bmin = bval;
else if (bval > bmax) bmax = bval;
});
return new VBox(rmin, rmax, gmin, gmax, bmin, bmax, histo);
}
function medianCutApply(histo, vbox) {
if (!vbox.count()) return;
var rw = vbox.r2 - vbox.r1 + 1,
gw = vbox.g2 - vbox.g1 + 1,
bw = vbox.b2 - vbox.b1 + 1,
maxw = pv.max([rw, gw, bw]);
// only one pixel, no split
if (vbox.count() == 1) {
return [vbox.copy()]
}
/* Find the partial sum arrays along the selected axis. */
var total = 0,
partialsum = [],
lookaheadsum = [],
i, j, k, sum, index;
if (maxw == rw) {
for (i = vbox.r1; i <= vbox.r2; i++) {
sum = 0;
for (j = vbox.g1; j <= vbox.g2; j++) {
for (k = vbox.b1; k <= vbox.b2; k++) {
index = getColorIndex(i, j, k);
sum += (histo[index] || 0);
}
}
total += sum;
partialsum[i] = total;
}
} else if (maxw == gw) {
for (i = vbox.g1; i <= vbox.g2; i++) {
sum = 0;
for (j = vbox.r1; j <= vbox.r2; j++) {
for (k = vbox.b1; k <= vbox.b2; k++) {
index = getColorIndex(j, i, k);
sum += (histo[index] || 0);
}
}
total += sum;
partialsum[i] = total;
}
} else { /* maxw == bw */
for (i = vbox.b1; i <= vbox.b2; i++) {
sum = 0;
for (j = vbox.r1; j <= vbox.r2; j++) {
for (k = vbox.g1; k <= vbox.g2; k++) {
index = getColorIndex(j, k, i);
sum += (histo[index] || 0);
}
}
total += sum;
partialsum[i] = total;
}
}
partialsum.forEach(function(d, i) {
lookaheadsum[i] = total - d
});
function doCut(color) {
var dim1 = color + '1',
dim2 = color + '2',
left, right, vbox1, vbox2, d2, count2 = 0;
for (i = vbox[dim1]; i <= vbox[dim2]; i++) {
if (partialsum[i] > total / 2) {
vbox1 = vbox.copy();
vbox2 = vbox.copy();
left = i - vbox[dim1];
right = vbox[dim2] - i;
if (left <= right)
d2 = Math.min(vbox[dim2] - 1, ~~ (i + right / 2));
else d2 = Math.max(vbox[dim1], ~~ (i - 1 - left / 2));
// avoid 0-count boxes
while (!partialsum[d2]) d2++;
count2 = lookaheadsum[d2];
while (!count2 && partialsum[d2 - 1]) count2 = lookaheadsum[--d2];
// set dimensions
vbox1[dim2] = d2;
vbox2[dim1] = vbox1[dim2] + 1;
// console.log('vbox counts:', vbox.count(), vbox1.count(), vbox2.count());
return [vbox1, vbox2];
}
}
}
// determine the cut planes
return maxw == rw ? doCut('r') :
maxw == gw ? doCut('g') :
doCut('b');
}
function quantize(pixels, maxcolors) {
// short-circuit
if (!pixels.length || maxcolors < 2 || maxcolors > 256) {
// console.log('wrong number of maxcolors');
return false;
}
// XXX: check color content and convert to grayscale if insufficient
var histo = getHisto(pixels),
histosize = 1 << (3 * sigbits);
// check that we aren't below maxcolors already
var nColors = 0;
histo.forEach(function() {
nColors++
});
if (nColors <= maxcolors) {
// XXX: generate the new colors from the histo and return
}
// get the beginning vbox from the colors
var vbox = vboxFromPixels(pixels, histo),
pq = new PQueue(function(a, b) {
return pv.naturalOrder(a.count(), b.count())
});
pq.push(vbox);
// inner function to do the iteration
function iter(lh, target) {
var ncolors = 1,
niters = 0,
vbox;
while (niters < maxIterations) {
vbox = lh.pop();
if (!vbox.count()) { /* just put it back */
lh.push(vbox);
niters++;
continue;
}
// do the cut
var vboxes = medianCutApply(histo, vbox),
vbox1 = vboxes[0],
vbox2 = vboxes[1];
if (!vbox1) {
// console.log("vbox1 not defined; shouldn't happen!");
return;
}
lh.push(vbox1);
if (vbox2) { /* vbox2 can be null */
lh.push(vbox2);
ncolors++;
}
if (ncolors >= target) return;
if (niters++ > maxIterations) {
// console.log("infinite loop; perhaps too few pixels!");
return;
}
}
}
// first set of colors, sorted by population
iter(pq, fractByPopulations * maxcolors);
// console.log(pq.size(), pq.debug().length, pq.debug().slice());
// Re-sort by the product of pixel occupancy times the size in color space.
var pq2 = new PQueue(function(a, b) {
return pv.naturalOrder(a.count() * a.volume(), b.count() * b.volume())
});
while (pq.size()) {
pq2.push(pq.pop());
}
// next set - generate the median cuts using the (npix * vol) sorting.
iter(pq2, maxcolors - pq2.size());
// calculate the actual colors
var cmap = new CMap();
while (pq2.size()) {
cmap.push(pq2.pop());
}
return cmap;
}
return {
quantize: quantize
}
})();
module.exports = MMCQ.quantize
},{}],2:[function(require,module,exports){
/*
Vibrant.js
by Jari Zwarts
Color algorithm class that finds variations on colors in an image.
Credits
--------
Lokesh Dhakar (http://www.lokeshdhakar.com) - Created ColorThief
Google - Palette support library in Android
*/
(function() {
var CanvasImage, Swatch, Vibrant,
bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
slice = [].slice;
window.Swatch = Swatch = (function() {
Swatch.prototype.hsl = void 0;
Swatch.prototype.rgb = void 0;
Swatch.prototype.population = 1;
Swatch.yiq = 0;
function Swatch(rgb, population) {
this.rgb = rgb;
this.population = population;
}
Swatch.prototype.getHsl = function() {
if (!this.hsl) {
return this.hsl = Vibrant.rgbToHsl(this.rgb[0], this.rgb[1], this.rgb[2]);
} else {
return this.hsl;
}
};
Swatch.prototype.getPopulation = function() {
return this.population;
};
Swatch.prototype.getRgb = function() {
return this.rgb;
};
Swatch.prototype.getHex = function() {
return "#" + ((1 << 24) + (this.rgb[0] << 16) + (this.rgb[1] << 8) + this.rgb[2]).toString(16).slice(1, 7);
};
Swatch.prototype.getTitleTextColor = function() {
this._ensureTextColors();
if (this.yiq < 200) {
return "#fff";
} else {
return "#000";
}
};
Swatch.prototype.getBodyTextColor = function() {
this._ensureTextColors();
if (this.yiq < 150) {
return "#fff";
} else {
return "#000";
}
};
Swatch.prototype._ensureTextColors = function() {
if (!this.yiq) {
return this.yiq = (this.rgb[0] * 299 + this.rgb[1] * 587 + this.rgb[2] * 114) / 1000;
}
};
return Swatch;
})();
window.Vibrant = Vibrant = (function() {
Vibrant.prototype.quantize = require('quantize');
Vibrant.prototype._swatches = [];
Vibrant.prototype.TARGET_DARK_LUMA = 0.26;
Vibrant.prototype.MAX_DARK_LUMA = 0.45;
Vibrant.prototype.MIN_LIGHT_LUMA = 0.55;
Vibrant.prototype.TARGET_LIGHT_LUMA = 0.74;
Vibrant.prototype.MIN_NORMAL_LUMA = 0.3;
Vibrant.prototype.TARGET_NORMAL_LUMA = 0.5;
Vibrant.prototype.MAX_NORMAL_LUMA = 0.7;
Vibrant.prototype.TARGET_MUTED_SATURATION = 0.3;
Vibrant.prototype.MAX_MUTED_SATURATION = 0.4;
Vibrant.prototype.TARGET_VIBRANT_SATURATION = 1;
Vibrant.prototype.MIN_VIBRANT_SATURATION = 0.35;
Vibrant.prototype.WEIGHT_SATURATION = 3;
Vibrant.prototype.WEIGHT_LUMA = 6;
Vibrant.prototype.WEIGHT_POPULATION = 1;
Vibrant.prototype.VibrantSwatch = void 0;
Vibrant.prototype.MutedSwatch = void 0;
Vibrant.prototype.DarkVibrantSwatch = void 0;
Vibrant.prototype.DarkMutedSwatch = void 0;
Vibrant.prototype.LightVibrantSwatch = void 0;
Vibrant.prototype.LightMutedSwatch = void 0;
Vibrant.prototype.HighestPopulation = 0;
function Vibrant(sourceImage, colorCount, quality) {
this.swatches = bind(this.swatches, this);
var a, allPixels, b, cmap, g, i, image, imageData, offset, pixelCount, pixels, r;
if (typeof colorCount === 'undefined') {
colorCount = 64;
}
if (typeof quality === 'undefined') {
quality = 5;
}
image = new CanvasImage(sourceImage);
imageData = image.getImageData();
pixels = imageData.data;
pixelCount = image.getPixelCount();
allPixels = [];
i = 0;
while (i < pixelCount) {
offset = i * 4;
r = pixels[offset + 0];
g = pixels[offset + 1];
b = pixels[offset + 2];
a = pixels[offset + 3];
if (a >= 125) {
if (!(r > 250 && g > 250 && b > 250)) {
allPixels.push([r, g, b]);
}
}
i = i + quality;
}
cmap = this.quantize(allPixels, colorCount);
this._swatches = cmap.vboxes.map((function(_this) {
return function(vbox) {
return new Swatch(vbox.color, vbox.vbox.count());
};
})(this));
this.maxPopulation = this.findMaxPopulation;
this.generateVarationColors();
this.generateEmptySwatches();
image.removeCanvas();
}
Vibrant.prototype.generateVarationColors = function() {
this.VibrantSwatch = this.findColorVariation(this.TARGET_NORMAL_LUMA, this.MIN_NORMAL_LUMA, this.MAX_NORMAL_LUMA, this.TARGET_VIBRANT_SATURATION, this.MIN_VIBRANT_SATURATION, 1);
this.LightVibrantSwatch = this.findColorVariation(this.TARGET_LIGHT_LUMA, this.MIN_LIGHT_LUMA, 1, this.TARGET_VIBRANT_SATURATION, this.MIN_VIBRANT_SATURATION, 1);
this.DarkVibrantSwatch = this.findColorVariation(this.TARGET_DARK_LUMA, 0, this.MAX_DARK_LUMA, this.TARGET_VIBRANT_SATURATION, this.MIN_VIBRANT_SATURATION, 1);
this.MutedSwatch = this.findColorVariation(this.TARGET_NORMAL_LUMA, this.MIN_NORMAL_LUMA, this.MAX_NORMAL_LUMA, this.TARGET_MUTED_SATURATION, 0, this.MAX_MUTED_SATURATION);
this.LightMutedSwatch = this.findColorVariation(this.TARGET_LIGHT_LUMA, this.MIN_LIGHT_LUMA, 1, this.TARGET_MUTED_SATURATION, 0, this.MAX_MUTED_SATURATION);
return this.DarkMutedSwatch = this.findColorVariation(this.TARGET_DARK_LUMA, 0, this.MAX_DARK_LUMA, this.TARGET_MUTED_SATURATION, 0, this.MAX_MUTED_SATURATION);
};
Vibrant.prototype.generateEmptySwatches = function() {
var hsl;
if (this.VibrantSwatch === void 0) {
if (this.DarkVibrantSwatch !== void 0) {
hsl = this.DarkVibrantSwatch.getHsl();
hsl[2] = this.TARGET_NORMAL_LUMA;
this.VibrantSwatch = new Swatch(Vibrant.hslToRgb(hsl[0], hsl[1], hsl[2]), 0);
}
}
if (this.DarkVibrantSwatch === void 0) {
if (this.VibrantSwatch !== void 0) {
hsl = this.VibrantSwatch.getHsl();
hsl[2] = this.TARGET_DARK_LUMA;
return this.DarkVibrantSwatch = new Swatch(Vibrant.hslToRgb(hsl[0], hsl[1], hsl[2]), 0);
}
}
};
Vibrant.prototype.findMaxPopulation = function() {
var j, len, population, ref, swatch;
population = 0;
ref = this._swatches;
for (j = 0, len = ref.length; j < len; j++) {
swatch = ref[j];
population = Math.max(population, swatch.getPopulation());
}
return population;
};
Vibrant.prototype.findColorVariation = function(targetLuma, minLuma, maxLuma, targetSaturation, minSaturation, maxSaturation) {
var j, len, luma, max, maxValue, ref, sat, swatch, value;
max = void 0;
maxValue = 0;
ref = this._swatches;
for (j = 0, len = ref.length; j < len; j++) {
swatch = ref[j];
sat = swatch.getHsl()[1];
luma = swatch.getHsl()[2];
if (sat >= minSaturation && sat <= maxSaturation && luma >= minLuma && luma <= maxLuma && !this.isAlreadySelected(swatch)) {
value = this.createComparisonValue(sat, targetSaturation, luma, targetLuma, swatch.getPopulation(), this.HighestPopulation);
if (max === void 0 || value > maxValue) {
max = swatch;
maxValue = value;
}
}
}
return max;
};
Vibrant.prototype.createComparisonValue = function(saturation, targetSaturation, luma, targetLuma, population, maxPopulation) {
return this.weightedMean(this.invertDiff(saturation, targetSaturation), this.WEIGHT_SATURATION, this.invertDiff(luma, targetLuma), this.WEIGHT_LUMA, population / maxPopulation, this.WEIGHT_POPULATION);
};
Vibrant.prototype.invertDiff = function(value, targetValue) {
return 1 - Math.abs(value - targetValue);
};
Vibrant.prototype.weightedMean = function() {
var i, sum, sumWeight, value, values, weight;
values = 1 <= arguments.length ? slice.call(arguments, 0) : [];
sum = 0;
sumWeight = 0;
i = 0;
while (i < values.length) {
value = values[i];
weight = values[i + 1];
sum += value * weight;
sumWeight += weight;
i += 2;
}
return sum / sumWeight;
};
Vibrant.prototype.swatches = function() {
return {
Vibrant: this.VibrantSwatch,
Muted: this.MutedSwatch,
DarkVibrant: this.DarkVibrantSwatch,
DarkMuted: this.DarkMutedSwatch,
LightVibrant: this.LightVibrantSwatch,
LightMuted: this.LightMuted
};
};
Vibrant.prototype.isAlreadySelected = function(swatch) {
return this.VibrantSwatch === swatch || this.DarkVibrantSwatch === swatch || this.LightVibrantSwatch === swatch || this.MutedSwatch === swatch || this.DarkMutedSwatch === swatch || this.LightMutedSwatch === swatch;
};
Vibrant.rgbToHsl = function(r, g, b) {
var d, h, l, max, min, s;
r /= 255;
g /= 255;
b /= 255;
max = Math.max(r, g, b);
min = Math.min(r, g, b);
h = void 0;
s = void 0;
l = (max + min) / 2;
if (max === min) {
h = s = 0;
} else {
d = max - min;
s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
switch (max) {
case r:
h = (g - b) / d + (g < b ? 6 : 0);
break;
case g:
h = (b - r) / d + 2;
break;
case b:
h = (r - g) / d + 4;
}
h /= 6;
}
return [h, s, l];
};
Vibrant.hslToRgb = function(h, s, l) {
var b, g, hue2rgb, p, q, r;
r = void 0;
g = void 0;
b = void 0;
hue2rgb = function(p, q, t) {
if (t < 0) {
t += 1;
}
if (t > 1) {
t -= 1;
}
if (t < 1 / 6) {
return p + (q - p) * 6 * t;
}
if (t < 1 / 2) {
return q;
}
if (t < 2 / 3) {
return p + (q - p) * (2 / 3 - t) * 6;
}
return p;
};
if (s === 0) {
r = g = b = l;
} else {
q = l < 0.5 ? l * (1 + s) : l + s - (l * s);
p = 2 * l - q;
r = hue2rgb(p, q, h + 1 / 3);
g = hue2rgb(p, q, h);
b = hue2rgb(p, q, h - (1 / 3));
}
return [r * 255, g * 255, b * 255];
};
return Vibrant;
})();
/*
CanvasImage Class
Class that wraps the html image element and canvas.
It also simplifies some of the canvas context manipulation
with a set of helper functions.
Stolen from https://github.com/lokesh/color-thief
*/
window.CanvasImage = CanvasImage = (function() {
function CanvasImage(image) {
this.canvas = document.createElement('canvas');
this.context = this.canvas.getContext('2d');
document.body.appendChild(this.canvas);
this.width = this.canvas.width = image.width;
this.height = this.canvas.height = image.height;
this.context.drawImage(image, 0, 0, this.width, this.height);
}
CanvasImage.prototype.clear = function() {
return this.context.clearRect(0, 0, this.width, this.height);
};
CanvasImage.prototype.update = function(imageData) {
return this.context.putImageData(imageData, 0, 0);
};
CanvasImage.prototype.getPixelCount = function() {
return this.width * this.height;
};
CanvasImage.prototype.getImageData = function() {
return this.context.getImageData(0, 0, this.width, this.height);
};
CanvasImage.prototype.removeCanvas = function() {
return this.canvas.parentNode.removeChild(this.canvas);
};
return CanvasImage;
})();
}).call(this);
},{"quantize":1}]},{},[2]);

View file

@ -1,90 +0,0 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Lyrics</title>
<script type="text/javascript" src="Vibrant.js"></script>
<script type="text/javascript" src="../js/lyrics.js"></script>
<link rel="stylesheet" href="../css/lyricer.css">
<link rel="stylesheet" href="https://www.apple.com/wss/fonts?families=SF+Pro,v4|SF+Pro+Icons,v1&display=swap">
<link href="https://fonts.googleapis.com/css?family=M+PLUS+1p" rel="stylesheet">
</head>
<body style="margin: 0;">
<img style="" id="backgroundImage"></img>
<div style="width: 100%; height: 100%; opacity: 0.8; z-index: 1; background-color: rgba(0, 0, 0, 0.5); position: absolute;"></div>
<div id ='info' style="z-index: 2;">
<img id="albumart"></img>
<div id="title"></div>
<div id="details"></div>
</div>
<div id="lyricer">
</div>
<script type="text/javascript">
const { ipcRenderer } = require('electron');
function changeStylesheetRule(stylesheet, selector, property, value) {
selector = selector.toLowerCase();
property = property.toLowerCase();
value = value.toLowerCase();
for(var i = 0; i < stylesheet.cssRules.length; i++) {
var rule = stylesheet.cssRules[i];
if(rule.selectorText === selector) {
rule.style[property] = value;
return;
}
}
stylesheet.insertRule(selector + " { " + property + ": " + value + "; }", 0);
}
var w = window.innerWidth;
var h = window.innerHeight;
document.getElementById("title").style.top = Math.floor(0.1*h + 0.40*w)+'px'
document.getElementById("details").style.top = Math.floor(0.1*h + 0.42*w)+'px'
var text = "";
var lrc = new Lyricer({focus:'start'});
lrc.setFocus('start');
ipcRenderer.on('truelyrics', function (event, lrcfile) {
if (lrc != null && lrcfile!= null && lrcfile.length > 0)
lrc.setLrc(lrcfile);
});
ipcRenderer.on('albumart', function (event, data) {
document.getElementById("albumart").setAttribute('src',`${data}`);
document.getElementById("backgroundImage").setAttribute('src',`${data}`);
document.getElementById("backgroundImage").onload = function() {
var vibrant = new Vibrant(this,128,3);
for (var swatch in swatches);
var swatches = vibrant.swatches();
if (swatches.hasOwnProperty(swatch) && swatches[swatch])
console.log(swatch, swatches[swatch].getHex());
var selectedswatch = (swatches['LightVibrant'] != null ) ? swatches['LightVibrant'] : swatches['Vibrant'];
changeStylesheetRule(document.styleSheets[0],'#lyricer ul li','color',selectedswatch.getHex());
}
});
ipcRenderer.on('updateMiniPlayerMetaData', function (event, track, artist, album) {
console.log('ugh');
var w = window.innerWidth;
var h = window.innerHeight;
document.getElementById("title").style.top = Math.floor(0.1*h + 0.40*w)+'px'
document.getElementById("details").style.top = Math.floor(0.1*h + 0.42*w)+'px'
document.getElementById("title").textContent = track;
document.getElementById("details").textContent = artist + " - " + album ;
});
ipcRenderer.on('ProgressTimeUpdate', function (event, data) {
if (data < 0){data = 0};
lrc.move(data);
});
lrc.setLrc(text);
window.addEventListener("lyricerclick", function(e){
ipcRenderer.send('ProgressTimeUpdateFromLyrics',e.detail.time);
console.log('clicked on ' + e.detail.time);
});
</script>
</body>
</html>

View file

@ -1,190 +0,0 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Lyrics</title>
<script type="text/javascript" src="../js/lyrics.js"></script>
<link rel="stylesheet" href="../css/lyricer.css">
<link href="https://fonts.googleapis.com/css?family=M+PLUS+1p" rel="stylesheet">
</head>
<body style="margin: 0;">
<img style="" id="backgroundImage" alt="Background Image"></img>
<div style="width: 100%; height: 100%; opacity: 0.8; z-index: 1; background-color: rgba(0, 0, 0, 0.5); position: absolute;"></div>
<div id="lyricer">
</div>
<script type="text/javascript">
const { ipcRenderer } = require('electron');
var text = "";
var lrcfile = "";
var lrc = new Lyricer();
var prevartist = '';
var prevtrack = '';
var prevlyrics = ['','','','','']; //track, artist, songid, lyrics, translated lyrics
var globaltoken = '';
function revisedRandId() {
return Math.random().toString(36).replace(/[^a-z]+/g, '').substr(2, 10);
}
/* get token */
function getToken(mode, track, artist, songid, lang, time) {
var url = "https://apic-desktop.musixmatch.com/ws/1.1/token.get?app_id=web-desktop-app-v1.0&t="+revisedRandId();
var req = new XMLHttpRequest();
req.overrideMimeType("application/json");
req.open('GET', url, true);
req.setRequestHeader("authority", "apic-desktop.musixmatch.com");
req.onload = function() {
var jsonResponse = JSON.parse(this.responseText);
var status2 = jsonResponse["message"]["header"]["status_code"] ;
if (status2 == 200){
token = jsonResponse["message"]["body"]["user_token"] ?? '';
if (token != "" && token != "UpgradeOnlyUpgradeOnlyUpgradeOnlyUpgradeOnly"){
console.log('200 token');
// token good
globaltoken = token;
if (mode == 1){
getMXMSubs(track, artist, token, lang, time);
} else {
getMXMTrans(songid, lang, token);
}
} else {
console.log('fake 200 token');
if (mode == 1){
ipcRenderer.send('LyricsMXMFailed','');
}
}} else {
console.log('token 4xx');
if (mode == 1){
ipcRenderer.send('LyricsMXMFailed','');
}
}
}
req.send();
}
function getMXMSubs(track, artist, token, lang, time) {
var usertoken = encodeURIComponent(token);
var timecustom = `&f_subtitle_length=${time}&q_duration=${time}&f_subtitle_length_max_deviation=40`;
var url = "https://apic-desktop.musixmatch.com/ws/1.1/macro.subtitles.get?format=json&namespace=lyrics_richsynched&subtitle_format=lrc&q_artist="+artist+"&q_track="+track+"&usertoken="+usertoken+timecustom+"&app_id=web-desktop-app-v1.0&t="+revisedRandId();
var req = new XMLHttpRequest();
req.overrideMimeType("application/json");
req.open('GET', url, true);
req.setRequestHeader("authority", "apic-desktop.musixmatch.com");
req.onload = function() {
var jsonResponse = JSON.parse(this.responseText);
console.log(jsonResponse);
var status1 = jsonResponse["message"]["header"]["status_code"] ;
if (status1 == 200){
var id = '';
try{
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) {
prevartist = artist;
prevtrack = track;
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"];}
// /* MXM Instrumentals detection */
// else if (jsonResponse["message"]["body"]["macro_calls"]["track.subtitles.get"]["message"]["header"]["instrumental"] == 1){
// print('Nah');
// ipcRenderer.send('LyricsHandlerNE','[00:00] Instrumental. / Lyrics not found.');
// return '';
// }
if (lrcfile == "" ){
// track not found
console.log('track not found');
prevlyrics = [track,artist,'','',''];
ipcRenderer.send('LyricsMXMFailed','');
} else {
lrcfile = lrcfile.concat("\r\n");
var timearr = lrcfile.match(/\[([0-9]+):([0-9.]+)]/g);
timearr.unshift('[00:00.000]');
for (i = 0; i < timearr.length -1 ; i++){
var rawTime = timearr[i+1].match(/(\d+:)?(\d+:)?(\d+)(\.\d+)?/);
var hours = (rawTime[2] != null) ? (rawTime[1].replace(":", "")) : "0";
var minutes =(rawTime[2] != null) ? (hours * 60 + rawTime[2].replace(":", "") * 1 + ":") : ((rawTime[1] != null) ? rawTime[1] : "00:");
var seconds = (rawTime[3] != null) ? (rawTime[3]) : "00";
var milliseconds = (rawTime[4] != null) ? (rawTime[4]) : ".000";
var lrcTime = minutes + seconds + milliseconds;
var rawTime2 = timearr[i].match(/(\d+:)?(\d+:)?(\d+)(\.\d+)?/);
var hours2 = (rawTime2[2] != null) ? (rawTime2[1].replace(":", "")) : "0";
var minutes2 = (rawTime2[2] != null) ? (hours2 * 60 + rawTime2[2].replace(":", "") * 1 + ":") : ((rawTime2[1] != null) ? rawTime2[1] : "00:");
var seconds2 = (rawTime2[3] != null) ? (rawTime2[3]) : "00";
var milliseconds2 = (rawTime2[4] != null) ? (rawTime2[4]) : ".000";
var lrcTime2 = minutes2 + seconds2 + milliseconds2;
if ( minutes.replace(":","") * 60 + seconds * 1 - minutes2.replace(":","") * 60 - seconds2 * 1 > 10) {
if (minutes2 + (seconds2*1+10) + milliseconds2 != '00:10.000'){
lrcfile = lrcfile.concat(`[${minutes2 + (seconds2*1+10) + milliseconds2}]lrcInstrumental` + "\r\n");}
else {lrcfile = lrcfile.concat(`[00:00.00]lrcInstrumental` + "\r\n");}
}
}
console.log(lrcfile);
ipcRenderer.send('LyricsHandlerNE',lrcfile);
if(lrcfile != null && lrcfile != ''){
// load translation
getMXMTrans(id, lang, token);
} else {
ipcRenderer.send('LyricsMXMFailed','');
}
}
} catch(e) {
console.log(e);
// track not found ??
console.log('track not found ??');
ipcRenderer.send('LyricsMXMFailed','');
}
} else { //4xx rejected
getToken(1, track, artist, '', lang, time);}
}
req.send();
}
function getMXMTrans(id, lang, token){
if (lang != "disabled" && id != ''){
var usertoken = encodeURIComponent(token);
var url2 = "https://apic-desktop.musixmatch.com/ws/1.1/crowd.track.translations.get?translation_fields_set=minimal&selected_language="+lang+"&track_id="+id+"&comment_format=text&part=user&format=json&usertoken="+usertoken+"&app_id=web-desktop-app-v1.0&t="+revisedRandId();
var req2 = new XMLHttpRequest();
req2.overrideMimeType("application/json");
req2.open('GET', url2, true);
req2.setRequestHeader("authority", "apic-desktop.musixmatch.com");
req2.onload = function() {
var jsonResponse2 = JSON.parse(this.responseText);
console.log(jsonResponse2);
var status2 = jsonResponse2["message"]["header"]["status_code"] ;
if (status2 == 200){
try{
var lyrics = jsonResponse2["message"]["body"]["translations_list"];
console.log(lyrics);
if (lyrics.length > 0) {
ipcRenderer.send('LyricsHandlerTranslation',lyrics);}
}catch(e){
/// not found trans -> ignore
}
} else { //4xx rejected
getToken(2,'', '', id, lang, '');
}
}
req2.send();
}
}
ipcRenderer.on('mxmcors', function (event, track, artist, lang, time) {
console.log("hello");
if (track != "" & track != "No Title Found"){
if ( globaltoken != null && globaltoken != '' ) {
console.log("we good");
getMXMSubs(track, artist, token, lang, time)
} else {
console.log("get token");
getToken(1,track, artist, '', lang, time);
}
}
});
lrc.setLrc(text);
</script>
</body>
</html>

View file

@ -1,81 +0,0 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Lyrics</title>
<script type="text/javascript" src="../js/lyrics.js"></script>
<link rel="stylesheet" href="../css/lyricer.css">
<link href="https://fonts.googleapis.com/css?family=M+PLUS+1p" rel="stylesheet">
</head>
<body style="margin: 0;">
<img style="" id="backgroundImage" alt="Background Image"></img>
<div style="width: 100%; height: 100%; opacity: 0.8; z-index: 1; background-color: rgba(0, 0, 0, 0.5); position: absolute;"></div>
<div id="lyricer">
</div>
<script type="text/javascript">
const { ipcRenderer } = require('electron');
function changeStylesheetRule(stylesheet, selector, property, value) {
selector = selector.toLowerCase();
property = property.toLowerCase();
value = value.toLowerCase();
for(var i = 0; i < stylesheet.cssRules.length; i++) {
var rule = stylesheet.cssRules[i];
if(rule.selectorText === selector) {
rule.style[property] = value;
return;
}
}
stylesheet.insertRule(selector + " { " + property + ": " + value + "; }", 0);
}
var text = "";
var lrc = new Lyricer();
ipcRenderer.on('neteasecors', function (event, lrcfile) {
if (lrcfile.startsWith("netease=")){
try{
var url = "https://music.163.com/api/search/pc?s="+lrcfile.substring(8)+"&type=1&limit=1";
var req = new XMLHttpRequest();
req.overrideMimeType("application/json");
req.open('GET', url, true);
req.onload = function() {
try{
var jsonResponse = JSON.parse(req.responseText);
var id = jsonResponse["result"]["songs"][0]["id"];
var url2 = "https://music.163.com/api/song/lyric?os=pc&id="+id+"&lv=-1&kv=-1&tv=-1";
var req2 = new XMLHttpRequest();
req2.overrideMimeType("application/json");
req2.open('GET', url2, true);
req2.onload = function() {
try{
var jsonResponse2 = JSON.parse(req2.responseText);
var lyrics = jsonResponse2["lrc"]["lyric"];
ipcRenderer.send('LyricsHandlerNE',lyrics);
window.close();}
catch (e) {
ipcRenderer.send('LyricsHandlerNE','[00:00] Instrumental. / Lyrics not found.');
window.close();
}
};
req2.send();
}catch(e){
ipcRenderer.send('LyricsHandlerNE','[00:00] Instrumental. / Lyrics not found.');
window.close();
}
};
req.send();
}catch(e){
console.log(e);
ipcRenderer.send('LyricsHandlerNE','[00:00] Instrumental. / Lyrics not found.');
window.close();
} }
else{}
});
lrc.setLrc(text);
</script>
</body>
</html>

View file

@ -1,121 +0,0 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Lyrics</title>
<script type="text/javascript" src="../js/lyrics.js"></script>
<link rel="stylesheet" href="../css/lyricer.css">
<link href="https://fonts.googleapis.com/css?family=M+PLUS+1p" rel="stylesheet">
</head>
<body style="margin: 0;">
<img style="" id="backgroundImage" alt="Background Image"></img>
<div style="width: 100%; height: 100%; opacity: 0.8; z-index: 1; background-color: rgba(0, 0, 0, 0.5); position: absolute;"></div>
<div id="lyricer">
</div>
<script type="text/javascript">
const { ipcRenderer } = require('electron');
const yt = require('youtube-search-without-api-key');
var text = "";
var lrcfile = "";
var lrc = new Lyricer();
var prevartist = '';
var prevtrack = '';
var prevlyrics = ['','','','','']; //track, artist, songid, lyrics, translated lyrics
var globaltoken = '';
function revisedRandId() {
return Math.random().toString(36).replace(/[^a-z]+/g, '').substr(2, 10);
}
async function getYTSubs(track, artist, lang) {
console.log(decodeURIComponent(track) +" "+ decodeURIComponent(artist) + " official video");
const videos = await yt.search(decodeURIComponent(track) +" "+ decodeURIComponent(artist) + " official video");
try{
if (videos != null & videos.length > 0){
var id = videos[0]['id']['videoId'];
getYTTrans(id,lang);
}
}catch(e){}
}
function getYTTrans(id, lang){
if (lang != "disabled" && id != ''){
var url2 = `http://video.google.com/timedtext?lang=${lang}&v=${id}`;
var req2 = new XMLHttpRequest();
req2.open('GET', url2, true);
req2.onload = function() {
const ttmlLyrics = this.responseText;
let lyrics = "";
const parser = new DOMParser();
const doc = parser.parseFromString(ttmlLyrics, "text/xml");
const lyricsLines = doc.getElementsByTagName('text');
const endTime = [0];
try {
for (let element of lyricsLines) {
rawTime = element.getAttribute('start').match(/(\d+:)?(\d+:)?(\d+)(\.\d+)?/);
hours = (rawTime[2] != null) ? (rawTime[1].replace(":", "")) : "0";
minutes = (rawTime[2] != null) ? (hours * 60 + rawTime[2].replace(":", "") * 1 + ":") : ((rawTime[1] != null) ? rawTime[1] : "00:");
seconds = (rawTime[3] != null) ? (rawTime[3]) : "00";
milliseconds = (rawTime[4] != null) ? (rawTime[4]) : ".000";
lrcTime = minutes + seconds + milliseconds;
const rawTime2 = element.getAttribute('dur').match(/(\d+:)?(\d+:)?(\d+)(\.\d+)?/);
const hours2 = (rawTime2[2] != null) ? (rawTime2[1].replace(":", "")) : "0";
const minutes2 = (rawTime2[2] != null) ? (hours2 * 60 + rawTime2[2].replace(":", "") * 1 + ":") : ((rawTime2[1] != null) ? rawTime2[1] : "00:");
const seconds2 = (rawTime2[3] != null) ? (rawTime2[3]) : "00";
const milliseconds2 = (rawTime2[4] != null) ? (rawTime2[4]) : ".000";
const lrcTime2 = minutes2 + seconds2 + milliseconds2;
if (minutes.replace(":", "") * 60 + seconds * 1 - endTime[endTime.length - 1] > 10) {
const time = endTime[endTime.length - 1];
const minutes = Math.floor(time / 60);
const secs = time - minutes * 60;
lyrics = lyrics.concat(`[${minutes}:${secs}]lrcInstrumental` + "\r\n");
}
endTime.push(minutes.replace(":", "") * 60 + minutes2.replace(":", "") * 60 + seconds2 * 1 + seconds * 1);
lyrics = lyrics.concat(`[${lrcTime}]${element.textContent}` + "\r\n");
}
if (lyrics != ""){
console.log(lyrics);
ipcRenderer.send('LyricsHandlerNE',lyrics);
}
} catch(e) {
lyrics = "";
for (let element of lyricsLines) {
rawTime = element.getAttribute('begin').match(/(\d+:)?(\d+:)?(\d+)(\.\d+)?/);
hours = (rawTime[2] != null) ? (rawTime[1].replace(":", "")) : "0";
minutes = (rawTime[2] != null) ? (hours * 60 + rawTime[2].replace(":", "") * 1 + ":") : ((rawTime[1] != null) ? rawTime[1] : "00:");
seconds = (rawTime[3] != null) ? (rawTime[3]) : "00";
milliseconds = (rawTime[4] != null) ? (rawTime[4]) : ".000";
lrcTime = minutes + seconds + milliseconds;
lyrics = lyrics.concat(`[${lrcTime}]${element.textContent}` + "\r\n");
}
if (lyrics != ""){
console.log(lyrics);
ipcRenderer.send('LyricsHandlerNE',lyrics);
}
}
if (lyrics == ""){
ipcRenderer.send('LyricsYTFailed',"");
console.log('yt no found')
}
// window.close();
}
req2.send();
}
}
ipcRenderer.on('ytcors', function (event, track, artist, lang) {
console.log("hello");
if (track != "" && track != "No Title Found"){
console.log("we good");
getYTSubs(track, artist, lang)
}
});
lrc.setLrc(text);
</script>
</body>
</html>

View file

@ -1,26 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Splash Screen</title>
</head>
<body>
<style>
html, body {
background: transparent;
height: 100%;
width: 100%;
overflow: hidden;
}
body {
background-color: transparent;
background-image: url("ameres://appx/logo.png");
background-size: contain;
background-repeat: no-repeat;
-webkit-app-region: drag;
}
</style>
</body>
</html>

View file

@ -1,6 +0,0 @@
# Apple-Music-Electron-Themes
Simple theme repository for use with https://github.com/Apple-Music-Electron/Apple-Music-Electron
## [Instructions](https://github.com/Apple-Music-Electron/Apple-Music-Electron/wiki/Theme-Creation#instructions)
## [Theme Preview Images](https://github.com/Apple-Music-Electron/Apple-Music-Electron/wiki/Theme-Preview-Images)

View file

@ -1,508 +0,0 @@
:root {
--bodyGutter:25px;
color-scheme:light dark;
--systemRed:#ff3b30;
--systemRed-vibrant:#f53126;
--systemRed-default_IC:#d70015;
--systemRed-vibrant_IC:#c20618;
--systemOrange:#ff9500;
--systemOrange-vibrant:#f58b00;
--systemOrange-default_IC:#c93400;
--systemOrange-vibrant_IC:#ad3a00;
--systemYellow:#ffcc00;
--systemYellow-vibrant:#f5c200;
--systemYellow-default_IC:#a05a00;
--systemYellow-vibrant_IC:#925100;
--systemGreen:#28cd41;
--systemGreen-vibrant:#1ec337;
--systemGreen-default_IC:#007d1b;
--systemGreen-vibrant_IC:#007018;
--systemMint:#00c7be;
--systemMint-vibrant:#00bdb4;
--systemMint-default_IC:#0c817b;
--systemMint-vibrant_IC:#0b7570;
--systemTeal:#59adc4;
--systemTeal-vibrant:#2ea7bd;
--systemTeal-default_IC:#008299;
--systemTeal-vibrant_IC:#00778c;
--systemCyan:#55bef0;
--systemCyan-vibrant:#41afdc;
--systemCyan-default_IC:#0071a4;
--systemCyan-vibrant_IC:#006796;
--systemBlue:#007aff;
--systemBlue-vibrant:#0070f5;
--systemBlue-default_IC:#0040dd;
--systemBlue-vibrant_IC:#0040dd;
--systemBlue-rollover:#0045b7;
--systemBlue-pressed:#005cd7;
--systemBlue-deepPressed:#0045b7;
--systemBlue-disabled:rgba(0, 122, 255, 0.35);
--systemIndigo:#5856d6;
--systemIndigo-vibrant:#5452cc;
--systemIndigo-default_IC:#3634a3;
--systemIndigo-vibrant_IC:#3634a3;
--systemPurple:#af52de;
--systemPurple-vibrant:#9f4bc9;
--systemPurple-default_IC:#ad44ab;
--systemPurple-vibrant_IC:#ad44ab;
--systemPink:#ff2d55;
--systemPink-vibrant:#f5234b;
--systemPink-default_IC:#d30f45;
--systemPink-vibrant_IC:#c11032;
--systemBrown:#a2845e;
--systemBrown-vibrant:#987a54;
--systemBrown-default_IC:#7f6545;
--systemBrown-vibrant_IC:#775d3b;
--systemGray:#8e8e93;
--systemGray-vibrant:#848489;
--systemGray-default_IC:#69696e;
--systemGray-vibrant_IC:#616165;
--systemPrimary:rgba(0, 0, 0, 0.85);
--systemPrimary-vibrant:#4c4c4c;
--systemPrimary-vibrant-rgb:76,76,76;
--systemPrimary-default_IC:black;
--systemPrimary-default_IC-rgb:0,0,0;
--systemPrimary-vibrant_IC:black;
--systemPrimary-vibrant_IC-rgb:0,0,0;
--systemSecondary:rgba(0, 0, 0, 0.5);
--systemSecondary-vibrant:gray;
--systemSecondary-default_IC:rgba(0, 0, 0, 0.76);
--systemSecondary-vibrant_IC:rgba(0, 0, 0, 0.76);
--systemTertiary:rgba(0, 0, 0, 0.25);
--systemTertiary-vibrant:#bfbfbf;
--systemTertiary-default_IC:rgba(0, 0, 0, 0.56);
--systemTertiary-vibrant_IC:rgba(0, 0, 0, 0.56);
--systemQuaternary:rgba(0, 0, 0, 0.1);
--systemQuaternary-vibrant:#e6e6e6;
--systemQuaternary-default_IC:rgba(0, 0, 0, 0.35);
--systemQuaternary-vibrant_IC:rgba(0, 0, 0, 0.35);
--systemQuinary:rgba(0, 0, 0, 0.05);
--systemQuinary-vibrant:#f2f2f2;
--systemQuinary-default_IC:rgba(0, 0, 0, 0.1);
--systemQuinary-vibrant_IC:rgba(0, 0, 0, 0.1);
--keyColor:#fa233b;
--keyColor-rgb:250,35,59;
--keyColor-rollover:#c60007;
--keyColor-rollover-rgb:198,0,7;
--keyColor-pressed:#e00921;
--keyColor-pressed-rgb:224,9,33;
--keyColor-deepPressed:#c60007;
--keyColor-deepPressed-rgb:198,0,7;
--keyColor-disabled:rgba(250, 35, 59, 0.35);
--keyColor-default_IC:#d60017;
--keyColor-default_IC-rgb:214,0,23;
--keyColor-rollover_IC:#a20000;
--keyColor-rollover_IC-rgb:162,0,0;
--keyColor-pressed_IC:#bb0000;
--keyColor-pressed_IC-rgb:187,0,0;
--keyColor-deepPressed_IC:#a20000;
--keyColor-deepPressed_IC-rgb:162,0,0;
--keyColor-disabled_IC:rgba(214, 0, 23, 0.25);
--systemStandardUltrathinMaterialSover:rgba(246, 246, 246, 0.36);
--systemStandardUltrathinMaterialSover-inactive:#f0f0f0;
--systemStandardUltrathinMaterialSover-default_IC:#d2d2d2;
--systemStandardUltrathinMaterialSover-inactive_IC:#ececec;
--systemStandardThinMaterialSover:rgba(246, 246, 246, 0.48);
--systemStandardThinMaterialSover-inactive:#f0f0f0;
--systemStandardThinMaterialSover-default_IC:gainsboro;
--systemStandardThinMaterialSover-inactive_IC:#ececec;
--systemStandardMediumMaterialSover:rgba(246, 246, 246, 0.6);
--systemStandardMediumMaterialSover-inactive:#f0f0f0;
--systemStandardMediumMaterialSover-default_IC:#e6e6e6;
--systemStandardMediumMaterialSover-inactive_IC:#ececec;
--systemStandardThickMaterialSover:rgba(246, 246, 246, 0.72);
--systemStandardThickMaterialSover-inactive:#f0f0f0;
--systemStandardThickMaterialSover-default_IC:#f0f0f0;
--systemStandardThickMaterialSover-inactive_IC:#ececec;
--systemStandardUltrathickMaterialSover:rgba(246, 246, 246, 0.84);
--systemStandardUltrathickMaterialSover-inactive:#f0f0f0;
--systemStandardUltrathickMaterialSover-default_IC:#fafafa;
--systemStandardUltrathickMaterialSover-inactive_IC:#ececec;
--systemHeaderMaterialSover:rgba(255, 255, 255, 0.8);
--systemHeaderMaterialSover-default_IC:white;
--systemToolbarTitlebarMaterialSover:rgba(253, 253, 253, 0.8);
--systemToolbarTitlebarMaterialSover-inactive:#f0f0f0;
--systemToolbarTitlebarMaterialSover-default_IC:white;
--systemToolbarTitlebarMaterialSover-inactive_IC:#ececec;
--labelDivider:rgba(0, 0, 0, 0.15);
--vibrantDivider:rgba(60, 60, 67, 0.29);
--pageBG:white;
--shelfBG:rgba(0, 0, 0, 0.05);
--genericJoeColor:#ebebeb;
--fallbackMaterialBG:rgba(255, 255, 255, 0.97);
--musicKeyColor:#fa233b;
--musicKeyColor-rollover:#c60007;
--musicKeyColor-pressed:#e00921;
--musicKeyColor-deepPressed:#c60007;
--musicKeyColor-disabled:rgba(250, 35, 59, 0.35);
--musicKeyColor-default_IC:#d60017;
--musicKeyColor-rollover_IC:#a20000;
--musicKeyColor-pressed_IC:#bb0000;
--musicKeyColor-deepPressed_IC:#a20000;
--musicKeyColor-disabled_IC:rgba(214, 0, 23, 0.25);
--systemAccentBG:#fa233b;
--systemAccentBG-rollover:#c60007;
--systemAccentBG-pressed:#e00921;
--systemAccentBG-deepPressed:#c60007;
--systemAccentBG-disabled:rgba(250, 35, 59, 0.35);
--systemAccentBG-default_IC:#d60017;
--systemAccentBG-rollover_IC:#a20000;
--systemAccentBG-pressed_IC:#bb0000;
--systemAccentBG-deepPressed_IC:#a20000;
--systemAccentBG-disabled_IC:rgba(214, 0, 23, 0.25);
--musicBrandBG:#fa233b;
--musicBrandBG-default_IC:#d60017;
--modalBGColor:white;
--modalBGColor-rgb:255,255,255;
--modalBGHeaderColor:rgba(255, 255, 255, 0.97);
--modalScrimColor:rgba(0, 0, 0, 0.45);
--opaqueShelfBG:#f2f2f2;
--profileBadgeJoeColor:#e2e4e7;
--selectionColor:#dd1f34;
--selectionColor-default_IC:#d60017;
--selectionColorRollover:#af0007;
--selectionColorRollover-default_IC:#a20000;
--selectionColorPressed:#c6081d;
--selectionColorPressed-default_IC:#bb0000;
--selectionColorDeepPressed:#af0007;
--selectionColorDeepPressed-default_IC:#a20000;
--selectionColorDisabled:rgba(250, 35, 59, 0.35);
--selectionColorDisabled-default_IC:rgba(214, 0, 23, 0.25);
--topResultsBGColor:rgba(0, 0, 0, 0.1);
--lockupHoverBGColor:rgba(51, 51, 51, 0.3);
--opaquePageBGColor:white;
--replayCardBG:#f7f3eb;
--replayComponentBG:#fbf9f5;
--barButtonDeselectedGradientTop:#fefefe;
--barButtonDeselectedGradientBottom:#fafafa;
--barButtonSelectedBGFill:#7f7f7f;
--barButtonSelectedTextColor:white;
--lockupSuperlabelPrimary:rgba(255, 255, 255, 0.95);
--lockupChinScrim:rgba(0, 0, 0, 0.2);
--lovedBGColor:#fa233b;
--playerDropShadow2:rgba(0, 0, 0, 0.07);
--playerInnerShadow:rgba(255, 255, 255, 0.45);
--powerSwooshAlgoRadioLockupChinScrim:rgba(44, 44, 46, 0.4);
--socialSearchBG:rgba(0, 0, 0, 0.15);
--socialModalFooter:rgba(255, 255, 255, 0.7);
--tracklistAltRowColor:rgba(0, 0, 0, 0.015);
--tracklistAltRowColor-default_IC:rgba(0, 0, 0, 0.05);
--tracklistHoverColor:rgba(0, 0, 0, 0.06);
--tracklistHoverColor-default_IC:rgba(0, 0, 0, 0.1);
--tracklistWorksTrackHoverColor:rgba(0, 0, 0, 0.12);
--tracklistWorksTrackHoverColor-default_IC:rgba(0, 0, 0, 0.18);
--viewLoading:white;
--circularArtistHeaderGradientBottom:rgba(0, 0, 0, 0.05);
--dialogScrimColor:rgba(255, 255, 255, 0.8);
--monogramPlaceholderColor:#9a9aa2;
--listItemAddDownloadBG:rgba(0, 0, 0, 0.5);
--listItemProgressBG:rgba(0, 0, 0, 0.25);
--radiosityShadowColor:rgba(0, 0, 0, 0.1);
--dialogShadowColor:rgba(0, 0, 0, 0.25);
--contextMenuBorderColor:rgba(0, 0, 0, 0.15);
--contextMenuTextColor:rgba(0, 0, 0, 0.85);
--footerBG:#fbfbfb;
--frostedFallbackHover:rgba(142, 142, 147, 0.8);
--iPhoneNowPlayingBackdropBG:#dbccc4;
--searchBorder:rgba(0, 0, 0, 0.15);
--searchIconDropShadow:rgba(0, 0, 0, 0.15);
--searchHintsBG:rgba(232, 232, 232, 0.9);
--searchHintsBGHover:rgba(201, 204, 203, 0.9);
--sidebar:rgba(60, 60, 67, 0.03);
--sidebar-default_IC:#fafafa;
--sidebarBorderRule:rgba(0, 0, 0, 0.1);
--sidebarSelectedState:rgba(60, 60, 67, 0.1);
--sidebarNativeUpsellBackgroundFallback:rgba(255, 255, 255, 0.97);
--webNavigationMobileBg:white;
--playerScrubberPlayhead:gray;
--playerScrubberFill:rgba(0, 0, 0, 0.5);
--playerScrubberTrack:rgba(0, 0, 0, 0.1);
--playerBackgroundFallback:rgba(255, 255, 255, 0.97);
--playerBackgroundFallback-default_IC:#fafafa;
--playerBackground:rgba(255, 255, 255, 0.88);
--playerBackground-default_IC:#fafafa;
--playerGradientTop:rgba(255, 255, 255, 0.25);
--playerGradientBottom:rgba(255, 255, 255, 0);
--playerLCDLogo:rgba(0, 0, 0, 0.5);
--playerLCDBGFill:white;
--playerLCDBGFill-rgb:255,255,255;
--playerLCDBGOuterStroke:rgba(0, 0, 0, 0.2);
--playerArtworkKeyline:rgba(0, 0, 0, 0.1);
--playerVolumePlayhead:white;
--playerVolumePlayheadActive:#e5e5e5;
--playerVolumeFill:rgba(0, 0, 0, 0.5);
--playerVolumeTrack:rgba(0, 0, 0, 0.15);
--playerVolumeIconFill:rgba(0, 0, 0, 0.4);
--trackBackgroundEven:rgba(0, 0, 0, 0.02);
--trackHoverColor:rgba(255, 255, 255, 0.97);
--playerPlatterButtonBGFill:#6c6c6c;
--playerPlatterButtonIconFill:white;
--librarySongsTrackInactiveBG:rgba(0, 0, 0, 0.14);
--searchScopeDeselectedGradientTop:#fefefe;
--searchScopeDeselectedGradientBottom:#fafafa;
--searchScopeSelectedBGFill:#7f7f7f;
--searchScopeSelectedTextColor:white;
--searchBoxIconFill:rgba(0, 0, 0, 0.65);
--segmentedControlBG:rgba(118, 118, 128, 0.12);
--segmentedControlSelectedBG:white;
--segmentedControlSelectedShadow1:rgba(0, 0, 0, 0.12);
--segmentedControlSelectedShadow2:rgba(0, 0, 0, 0.04);
--segmentedControlSelectedBorder:rgba(0, 0, 0, 0.04);
--searchBarBorderColor:rgba(0, 0, 0, 0.15);
--viewport-default:"xsmall";
--viewport-grid-layout:"grid-layout:xs-1";
--viewport-sidebar:"sidebar:hidden";
--viewport-search-landing-grid:"search-landing-grid:1";
--web-navigation-width:164px
}
@media (prefers-color-scheme:dark) {
:root {
--systemRed:#ff453a;
--systemRed-vibrant:#ff4f44;
--systemRed-default_IC:#ff6961;
--systemRed-vibrant_IC:#ff4136;
--systemOrange:#ff9f0a;
--systemOrange-vibrant:#ffa914;
--systemOrange-default_IC:#ffb340;
--systemOrange-vibrant_IC:#ffb340;
--systemYellow:#ffd60a;
--systemYellow-vibrant:#ffe014;
--systemYellow-default_IC:#ffd426;
--systemYellow-vibrant_IC:#ffd426;
--systemGreen:#32d74b;
--systemGreen-vibrant:#3ce155;
--systemGreen-default_IC:#31de4b;
--systemGreen-vibrant_IC:#31de4b;
--systemMint:#63e6e2;
--systemMint-vibrant:#6ce0db;
--systemMint-default_IC:#63e6e2;
--systemMint-vibrant_IC:#63e6e2;
--systemTeal:#6ac4dc;
--systemTeal-vibrant:#44d4ed;
--systemTeal-default_IC:#5de6ff;
--systemTeal-vibrant_IC:#5de6ff;
--systemCyan:#5ac8f5;
--systemCyan-vibrant:#5acdfa;
--systemCyan-default_IC:#70d7ff;
--systemCyan-vibrant_IC:#70d7ff;
--systemBlue:#0a84ff;
--systemBlue-vibrant:#148eff;
--systemBlue-default_IC:#409cff;
--systemBlue-vibrant_IC:#409cff;
--systemBlue-rollover:#47c1ff;
--systemBlue-pressed:#38b2ff;
--systemBlue-deepPressed:#47c1ff;
--systemBlue-disabled:rgba(10, 132, 255, 0.5);
--systemIndigo:#5e5ce6;
--systemIndigo-vibrant:#6361f2;
--systemIndigo-default_IC:#7d7aff;
--systemIndigo-vibrant_IC:#7d7aff;
--systemPurple:#bf5af2;
--systemPurple-vibrant:#cc65ff;
--systemPurple-default_IC:#da8fff;
--systemPurple-vibrant_IC:#da8fff;
--systemPink:#ff375f;
--systemPink-vibrant:#ff4169;
--systemPink-default_IC:#ff6482;
--systemPink-vibrant_IC:#ff3a5f;
--systemBrown:#ac8e68;
--systemBrown-vibrant:#b69872;
--systemBrown-default_IC:#b59469;
--systemBrown-vibrant_IC:#b59469;
--systemGray:#98989d;
--systemGray-vibrant:#a2a2a7;
--systemGray-default_IC:#98989d;
--systemGray-vibrant_IC:#98989d;
--systemPrimary:rgba(255, 255, 255, 0.85);
--systemPrimary-vibrant:#e5e5e5;
--systemPrimary-vibrant-rgb:229,229,229;
--systemPrimary-default_IC:white;
--systemPrimary-default_IC-rgb:255,255,255;
--systemPrimary-vibrant_IC:white;
--systemPrimary-vibrant_IC-rgb:255,255,255;
--systemSecondary:rgba(255, 255, 255, 0.55);
--systemSecondary-vibrant:#7c7c7c;
--systemSecondary-default_IC:rgba(255, 255, 255, 0.7);
--systemSecondary-vibrant_IC:rgba(255, 255, 255, 0.7);
--systemTertiary:rgba(255, 255, 255, 0.25);
--systemTertiary-vibrant:#414141;
--systemTertiary-default_IC:rgba(255, 255, 255, 0.5);
--systemTertiary-vibrant_IC:rgba(255, 255, 255, 0.5);
--systemQuaternary:rgba(255, 255, 255, 0.1);
--systemQuaternary-vibrant:#232323;
--systemQuaternary-default_IC:rgba(255, 255, 255, 0.3);
--systemQuaternary-vibrant_IC:rgba(255, 255, 255, 0.3);
--systemQuinary:rgba(255, 255, 255, 0.05);
--systemQuinary-vibrant:#080808;
--systemQuinary-default_IC:rgba(255, 255, 255, 0.1);
--systemQuinary-vibrant_IC:rgba(255, 255, 255, 0.1);
--keyColor:#fa2d48;
--keyColor-rgb:250,45,72;
--keyColor-rollover:#ff5f7a;
--keyColor-rollover-rgb:255,95,122;
--keyColor-pressed:#ff4661;
--keyColor-pressed-rgb:255,70,97;
--keyColor-deepPressed:#ff5f7a;
--keyColor-deepPressed-rgb:255,95,122;
--keyColor-disabled:rgba(250, 45, 72, 0.35);
--keyColor-default_IC:#fa586a;
--keyColor-default_IC-rgb:250,88,106;
--keyColor-rollover_IC:#ff8a9c;
--keyColor-rollover_IC-rgb:255,138,156;
--keyColor-pressed_IC:#ff7183;
--keyColor-pressed_IC-rgb:255,113,131;
--keyColor-deepPressed_IC:#ff8a9c;
--keyColor-deepPressed_IC-rgb:255,138,156;
--keyColor-disabled_IC:rgba(250, 88, 106, 0.35);
--systemStandardUltrathinMaterialSover:rgba(40, 40, 40, 0.4);
--systemStandardUltrathinMaterialSover-inactive:#282828;
--systemStandardUltrathinMaterialSover-default_IC:black;
--systemStandardUltrathinMaterialSover-inactive_IC:#141414;
--systemStandardThinMaterialSover:rgba(40, 40, 40, 0.5);
--systemStandardThinMaterialSover-inactive:#282828;
--systemStandardThinMaterialSover-default_IC:#0a0a0a;
--systemStandardThinMaterialSover-inactive_IC:#141414;
--systemStandardMediumMaterialSover:rgba(40, 40, 40, 0.6);
--systemStandardMediumMaterialSover-inactive:#282828;
--systemStandardMediumMaterialSover-default_IC:#141414;
--systemStandardMediumMaterialSover-inactive_IC:#141414;
--systemStandardThickMaterialSover:rgba(40, 40, 40, 0.7);
--systemStandardThickMaterialSover-inactive:#282828;
--systemStandardThickMaterialSover-default_IC:#1e1e1e;
--systemStandardThickMaterialSover-inactive_IC:#141414;
--systemStandardUltrathickMaterialSover:rgba(40, 40, 40, 0.8);
--systemStandardUltrathickMaterialSover-inactive:#282828;
--systemStandardUltrathickMaterialSover-default_IC:#282828;
--systemStandardUltrathickMaterialSover-inactive_IC:#141414;
--systemHeaderMaterialSover:rgba(30, 30, 30, 0.8);
--systemHeaderMaterialSover-default_IC:#1e1e1e;
--systemToolbarTitlebarMaterialSover:rgba(60, 60, 60, 0.8);
--systemToolbarTitlebarMaterialSover-inactive:#282828;
--systemToolbarTitlebarMaterialSover-default_IC:#262626;
--systemToolbarTitlebarMaterialSover-inactive_IC:#141414;
--labelDivider:rgba(255, 255, 255, 0.1);
--vibrantDivider:rgba(235, 235, 245, 0.19);
--pageBG:#1f1f1f;
--shelfBG:rgba(255, 255, 255, 0.05);
--genericJoeColor:#323232;
--fallbackMaterialBG:rgba(31, 31, 31, 0.97);
--musicKeyColor:#fa2d48;
--musicKeyColor-rollover:#ff5f7a;
--musicKeyColor-pressed:#ff4661;
--musicKeyColor-deepPressed:#ff5f7a;
--musicKeyColor-disabled:rgba(250, 45, 72, 0.35);
--musicKeyColor-default_IC:#fa586a;
--musicKeyColor-rollover_IC:#ff8a9c;
--musicKeyColor-pressed_IC:#ff7183;
--musicKeyColor-deepPressed_IC:#ff8a9c;
--musicKeyColor-disabled_IC:rgba(250, 88, 106, 0.35);
--systemAccentBG:#fa233b;
--systemAccentBG-rollover:#c60007;
--systemAccentBG-pressed:#e00921;
--systemAccentBG-deepPressed:#c60007;
--systemAccentBG-disabled:rgba(250, 35, 59, 0.35);
--systemAccentBG-default_IC:#d60017;
--systemAccentBG-rollover_IC:#a20000;
--systemAccentBG-pressed_IC:#bb0000;
--systemAccentBG-deepPressed_IC:#a20000;
--systemAccentBG-disabled_IC:rgba(214, 0, 23, 0.25);
--musicBrandBG:#fa233b;
--musicBrandBG-default_IC:#d60017;
--modalBGColor:#1f1f1f;
--modalBGColor-rgb:31,31,31;
--modalBGHeaderColor:rgba(31, 31, 31, 0.97);
--modalScrimColor:rgba(0, 0, 0, 0.55);
--opaqueShelfBG:#2b2b2b;
--profileBadgeJoeColor:#e2e4e7;
--selectionColor:#c11b2e;
--selectionColor-default_IC:#a60012;
--selectionColorRollover:#990006;
--selectionColorRollover-default_IC:#7d0000;
--selectionColorPressed:#ad0719;
--selectionColorPressed-default_IC:#900000;
--selectionColorDeepPressed:#990006;
--selectionColorDeepPressed-default_IC:#7d0000;
--selectionColorDisabled:rgba(250, 45, 72, 0.35);
--selectionColorDisabled-default_IC:rgba(66, 0, 7, 0.421075);
--topResultsBGColor:rgba(255, 255, 255, 0.1);
--lockupHoverBGColor:rgba(51, 51, 51, 0.3);
--opaquePageBGColor:#2d2d2d;
--replayCardBG:#1a1a1a;
--replayComponentBG:#2e2e2e;
--barButtonDeselectedGradientTop:#595a5c;
--barButtonDeselectedGradientBottom:#565759;
--barButtonSelectedBGFill:#aeaeb2;
--barButtonSelectedTextColor:#4c4c4c;
--lockupSuperlabelPrimary:rgba(0, 0, 0, 0.95);
--lockupChinScrim:rgba(0, 0, 0, 0.2);
--lovedBGColor:#fa2d48;
--playerDropShadow2:rgba(0, 0, 0, 0.1);
--playerInnerShadow:rgba(255, 255, 255, 0.1);
--powerSwooshAlgoRadioLockupChinScrim:rgba(44, 44, 46, 0.4);
--socialSearchBG:rgba(255, 255, 255, 0.15);
--socialModalFooter:rgba(0, 0, 0, 0.7);
--tracklistAltRowColor:rgba(255, 255, 255, 0.015);
--tracklistAltRowColor-default_IC:rgba(255, 255, 255, 0.05);
--tracklistHoverColor:rgba(255, 255, 255, 0.06);
--tracklistHoverColor-default_IC:rgba(255, 255, 255, 0.1);
--tracklistWorksTrackHoverColor:rgba(255, 255, 255, 0.12);
--tracklistWorksTrackHoverColor-default_IC:rgba(255, 255, 255, 0.18);
--viewLoading:transparent;
--circularArtistHeaderGradientBottom:rgba(255, 255, 255, 0.03);
--dialogScrimColor:rgba(38, 38, 38, 0.8);
--monogramPlaceholderColor:#5a5a5a;
--listItemAddDownloadBG:rgba(255, 255, 255, 0.55);
--listItemProgressBG:rgba(255, 255, 255, 0.25);
--radiosityShadowColor:rgba(0, 0, 0, 0.3);
--dialogShadowColor:rgba(0, 0, 0, 0.55);
--contextMenuBorderColor:rgba(255, 255, 255, 0.1);
--contextMenuTextColor:rgba(255, 255, 255, 0.85);
--footerBG:#323232;
--frostedFallbackHover:rgba(152, 152, 157, 0.8);
--iPhoneNowPlayingBackdropBG:#dbccc4;
--searchBorder:rgba(255, 255, 255, 0.15);
--searchIconDropShadow:rgba(0, 0, 0, 0.25);
--searchHintsBG:rgba(44, 46, 48, 0.9);
--searchHintsBGHover:rgba(45, 47, 50, 0.9);
--sidebar:rgba(235, 235, 245, 0.03);
--sidebar-default_IC:#282828;
--sidebarBorderRule:rgba(255, 255, 255, 0.1);
--sidebarSelectedState:rgba(235, 235, 245, 0.1);
--sidebarNativeUpsellBackgroundFallback:rgba(60, 60, 67, 0.95);
--webNavigationMobileBg:#2e2e2e;
--playerScrubberPlayhead:#7c7c7c;
--playerScrubberFill:rgba(255, 255, 255, 0.6);
--playerScrubberTrack:rgba(255, 255, 255, 0.1);
--playerBackgroundFallback:rgba(45, 45, 45, 0.97);
--playerBackgroundFallback-default_IC:#282828;
--playerBackground:rgba(45, 45, 45, 0.88);
--playerBackground-default_IC:#282828;
--playerGradientTop:transparent;
--playerGradientBottom:transparent;
--playerLCDLogo:rgba(255, 255, 255, 0.55);
--playerLCDBGFill:#4d4d4d;
--playerLCDBGFill-rgb:77,77,77;
--playerLCDBGOuterStroke:rgba(0, 0, 0, 0.2);
--playerArtworkKeyline:rgba(255, 255, 255, 0.1);
--playerVolumePlayhead:#2c2c2c;
--playerVolumePlayheadActive:#413e40;
--playerVolumeFill:rgba(255, 255, 255, 0.6);
--playerVolumeTrack:rgba(255, 255, 255, 0.15);
--playerVolumeIconFill:rgba(255, 255, 255, 0.4);
--trackBackgroundEven:rgba(255, 255, 255, 0.05);
--trackHoverColor:rgba(0, 0, 0, 0.37);
--playerPlatterButtonBGFill:white;
--playerPlatterButtonIconFill:rgba(0, 0, 0, 0.7);
--librarySongsTrackInactiveBG:rgba(255, 255, 240, 0.12);
--searchScopeDeselectedGradientTop:#595a5c;
--searchScopeDeselectedGradientBottom:#565759;
--searchScopeSelectedBGFill:#aeaeb2;
--searchScopeSelectedTextColor:#4c4c4c;
--searchBoxIconFill:rgba(255, 255, 255, 0.9);
--segmentedControlBG:rgba(118, 118, 128, 0.24);
--segmentedControlSelectedBG:#636366;
--segmentedControlSelectedShadow1:transparent;
--segmentedControlSelectedShadow2:transparent;
--searchBarBorderColor:rgba(0, 0, 0, 0.15)
}

View file

@ -1,23 +0,0 @@
/**
* @name Acrylic
* @author cryptofyre
* @description Transparent theme for use with Acrylic themesets.
*/
@media (prefers-color-scheme: dark) {
:root {
--transparency: #0f0f0f00 !important;
--sidebar: #0f0f0f00 !important;
--pageBG: #0f0f0f00 !important;
--playerBackground: #0f0f0f00 !important;
--systemHeaderMaterialSover-default_IC: #0f0f0f00 !important;
--systemHeaderMaterialSover: #0f0f0f00 !important;
--playerLCDBGFill: transparent!important;
--playerLCDBGOuterStroke: transparent!important;
}
.dt-search-box__input {
background-color: #0f0f0f00 !important;
}
}

View file

@ -1,34 +0,0 @@
/*
* @name Blurple
* @author Core#1034
* @description Cool blurple theme, uses similar colors to discord but a bit darker.
*/
@media (prefers-color-scheme:dark) {
:root {
/* accent colors */
--keyColor: #5865f2 !important;
--keyColor-rgb: 88, 101, 242 !important;
--systemAccentBG: #5865f2 !important;
--systemAccentBG-pressed: #404eed !important;
--selectionColor: #5865f2 !important;
/* main colors */
--transparency: #13151957 !important;
--sidebar: #131519 !important;
--footerBG: #131519 !important;
--pageBG: #171a1f !important;
/* search bar */
--systemHeaderMaterialSover-default_IC: #131519 !important;
--systemHeaderMaterialSover: #131519 !important;
/* web-chrome */
--playerBackground: #131519 !important;
--playerLCDBGFill: #131519 !important;
/* up-next */
--systemToolbarTitlebarMaterialSover-inactive: #131519 !important;
--systemToolbarTitlebarMaterialSover: rgba(19, 21, 25, 0.8) !important;
}
}

View file

@ -1,48 +0,0 @@
/* Dracula theme by zenorocha
* converted by floookay
* fixed up a bit by cryptofyre
*
* Background #282a36
* Current Line #44475a
* Foreground #f8f8f2
* Comment #6272a4
* Cyan #8be9fd
* Green #50fa7b
* Orange #ffb86c
* Pink #ff79c6
* Purple #bd93f9
* Red #ff5555
* Yellow #f1fa8c
*/
@media (prefers-color-scheme:dark) {
:root {
--primaryColor: #bd93f9 !important;
--sidebar: #21222c !important;
--transparency: #21222c18 !important;
--footerBG: #44475a !important;
--pageBG: #282a36 !important;
--playerBackground: #21222c !important;
--playerLCDBGFill: #44475a !important;
--playerVolumeIconFill: #6272a4 !important;
--systemGreen: #50fa7b !important;
--systemRed: #ff5555 !important;
--lovedBGColor: #ff79c6 !important;
--modalBGColor: #282a36 !important;
--systemHeaderMaterialSover: #282a36 !important;
--systemPrimary: #f8f8f2 !important;
--systemSecondary: #6272a4 !important;
--systemQuaternary: #44475a !important;
--selectionColor: #bd93f9 !important;
--systemHeaderMaterialSoverIncreaseContrast: #282a36 !important;
--segmentedControlSelectedBG: #44475a !important;
--modalBGHeaderColor: #21222c !important;
--tracklistHoverColor: #44475a !important;
--sidebarSelectedState: #44475a !important;
--playerPlatterButtonBGFill: #bd93f9 !important;
--playerPlatterButtonIconFill: #f8f8f2 !important;
}
}

View file

@ -1,24 +0,0 @@
/**
* @name Jungle
* @author devilAPI#0361
* @description Jungle Theme
*/
@media (prefers-color-scheme:dark) {
:root {
--primaryColor: #D8E4FF !important;
--primaryColor-rgb: 216, 228, 255 !important;
--sidebar: #00120 !important;
--transparency: #00120b18 !important;
--footerBG: #24423E !important;
--pageBG: #00120B !important;
--pageBG-rgb: rgba(0, 18, 11, 0.1) !important;
--playerBackground: #24423E !important;
--playerLCDBGFill: #24423E !important;
--modalBGColor: var(--pageBG) !important;
--systemHeaderMaterialSover: var(--pageBG) !important;
--systemQuaternary: var(--pageBG-rgb) !important;
--selectionColor: var(--primaryColor) !important;
}
}

View file

@ -1,84 +0,0 @@
/* Nord theme: https://www.nordtheme.com
* Base CSS from: floookay's Dracular theme
*/
@media (prefers-color-scheme:dark) {
:root {
/* accent colors */
--keyColor: #88c0d0 !important;
--keyColor-rgb: 136, 192, 208 !important;
--systemAccentBG: #88c0d0 !important;
--systemAccentBG-pressed: #81a1c1 !important;
--selectionColor: #81a1c1 !important;
/*everything else*/
--primaryColor: #88C0D0 !important;
--sidebar: #3B4252 !important;
--transparency: #3b425202 !important;
--footerBG: #434C5E !important;
--pageBG: #2E3440 !important;
--playerBackground: #3B4252 !important;
--playerLCDBGFill: #434C5E !important;
--playerVolumeIconFill: #88C0D0 !important;
--systemGreen: #A3BE8C !important;
--systemRed: #BF616A !important;
--lovedBGColor: #B48EAD !important;
--systemVibrantTextPrimary: #ECEFF4 !important;
--systemVibrantTextTertiary: #ECEFF4 !important;
--modalBGColor: #2E3440 !important;
--systemHeaderMaterialSover: #2E3440 !important;
--systemPrimary: #ECEFF4 !important;
--systemSecondary: #ECEFF4 !important;
--systemQuaternary: #434C5E !important;
--selectionColor: #88C0D0 !important;
--systemHeaderMaterialSoverIncreaseContrast: #2E3440 !important;
--segmentedControlSelectedBG: #434C5E !important;
--modalBGHeaderColor: #3B4252 !important;
--tracklistHoverColor: #434C5E !important;
--sidebarSelectedState: #434C5E !important;
--playerPlatterButtonBGFill: #88C0D0 !important;
--playerPlatterButtonIconFill: #ECEFF4 !important;
--primaryColor-rgb: transparent !important;
--playerVolumeFill: #88C0D0 !important;
--systemStandardThickMaterialSover: #3B4252 !important;
--systemSecondary-vibrantText: #D8DEE9 !important;
--systemPrimary-vibrantText: #ECEFF4 !important;
--contextMenuBorderColor: #2E3440 !important;
--systemTertiary-vibrant: #2E3440 !important;
}
body > div {
color: #ECEFF4 !important;
}
.dt-search-box__input {
border-color: #88C0D0 !important;
}
.web-navigation__header-button:hover,
.web-navigation__header-text {
color: #ECEFF4 !important;
opacity: 1.0 !important;
}
.songs-list__col--heart-and-star {
background-color: transparent !important;
}
.media-artwork-v2--error,
.media-artwork-v2--error,
.media-artwork-v2__image,
.media-artwork-v2--feature-recommended,
.media-artwork-v2--feature-recommended
.media-artwork-v2__image,
.media-artwork-v2:not(.media-artwork-v2--downloaded),
.media-artwork-v2:not(.media-artwork-v2--downloaded)
.media-artwork-v2__image {
background-color: transparent !important;
}
::placeholder {
color: #ECEFF4 !important;
}
}

View file

@ -1,18 +0,0 @@
/**
* @name Oled Black
* @author cryptofyre
* @description Sexy oled black theme
*/
@media (prefers-color-scheme: dark) {
:root {
--transparency: #0f0f0f10 !important;
--sidebar: #0c0c0c !important;
--pageBG: rgb(0, 0, 0) !important;
--playerBackground: #131313 !important;
}
.dt-search-box__input {
background-color: #00000013 !important;
}
}

View file

@ -1,34 +0,0 @@
/**
* @name Spotify
* @author devilAPI#0361 (Upgraded by Core#1034)
* @description Spotify Theme
*/
@media (prefers-color-scheme:dark) {
:root {
/* accent colors */
--keyColor: #1DB954 !important;
--keyColor-rgb: 30, 215, 96 !important;
--systemAccentBG: #1DB954 !important;
--systemAccentBG-pressed: #15853c !important;
--selectionColor: #1DB954 !important;
/* main colors */
--transparency: #0c0c0c57 !important;
--sidebar: #000000 !important;
--footerBG: #121212 !important;
--pageBG: #121212 !important;
/* search bar */
--systemHeaderMaterialSover-default_IC: #121212 !important;
--systemHeaderMaterialSover: #121212 !important;
/* web-chrome */
--playerBackground: #121212 !important;
--playerLCDBGFill: #121212 !important;
/* up-next */
--systemToolbarTitlebarMaterialSover-inactive: #121212 !important;
--systemToolbarTitlebarMaterialSover: rgba(25, 20, 20, 0.8) !important;
}
}

File diff suppressed because it is too large Load diff

View file

@ -1,22 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="100%" height="100%" viewBox="0 0 28 64" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
<g transform="matrix(1,0,0,1,-11,-10)">
<path d="M39,12.24C39,11.004 37.996,10 36.76,10L13.24,10C12.004,10 11,11.004 11,12.24L11,71.76C11,72.996 12.004,74 13.24,74L36.76,74C37.996,74 39,72.996 39,71.76L39,12.24Z" style="fill:rgb(108,108,108);fill-opacity:0.43;"/>
<g transform="matrix(0.714286,0,0,1,7.14286,0)">
<rect x="18" y="41" width="14" height="2" style="fill:rgb(231,231,231);fill-opacity:0.77;"/>
</g>
<g transform="matrix(0.714286,0,0,1,7.14286,-5)">
<rect x="18" y="41" width="14" height="2" style="fill:rgb(231,231,231);fill-opacity:0.77;"/>
</g>
<g transform="matrix(0.714286,0,0,1,7.14286,5)">
<rect x="18" y="41" width="14" height="2" style="fill:rgb(231,231,231);fill-opacity:0.77;"/>
</g>
<g transform="matrix(0.571429,0,0,0.6,10.7143,10.4)">
<path d="M25,26L32,36L18,36L25,26Z" style="fill:rgb(231,231,231);fill-opacity:0.77;"/>
</g>
<g transform="matrix(0.571429,0,0,-0.6,10.7143,73.6)">
<path d="M25,26L32,36L18,36L25,26Z" style="fill:rgb(231,231,231);fill-opacity:0.77;"/>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.6 KiB

View file

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path fill="white" d="M257.5 445.1l-22.2 22.2c-9.4 9.4-24.6 9.4-33.9 0L7 273c-9.4-9.4-9.4-24.6 0-33.9L201.4 44.7c9.4-9.4 24.6-9.4 33.9 0l22.2 22.2c9.5 9.5 9.3 25-.4 34.3L136.6 216H424c13.3 0 24 10.7 24 24v32c0 13.3-10.7 24-24 24H136.6l120.5 114.8c9.8 9.3 10 24.8.4 34.3z"/></svg>

Before

Width:  |  Height:  |  Size: 521 B

View file

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path fill="white" d="M11.5 280.6l192 160c20.6 17.2 52.5 2.8 52.5-24.6V96c0-27.4-31.9-41.8-52.5-24.6l-192 160c-15.3 12.8-15.3 36.4 0 49.2zm256 0l192 160c20.6 17.2 52.5 2.8 52.5-24.6V96c0-27.4-31.9-41.8-52.5-24.6l-192 160c-15.3 12.8-15.3 36.4 0 49.2z"/></svg>

Before

Width:  |  Height:  |  Size: 500 B

View file

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path fill="white" d="M500.5 231.4l-192-160C287.9 54.3 256 68.6 256 96v320c0 27.4 31.9 41.8 52.5 24.6l192-160c15.3-12.8 15.3-36.4 0-49.2zm-256 0l-192-160C31.9 54.3 0 68.6 0 96v320c0 27.4 31.9 41.8 52.5 24.6l192-160c15.3-12.8 15.3-36.4 0-49.2z"/></svg>

Before

Width:  |  Height:  |  Size: 493 B

View file

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512" fill="white"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M471.1 96C405 96 353.3 137.3 320 174.6 286.7 137.3 235 96 168.9 96 75.8 96 0 167.8 0 256s75.8 160 168.9 160c66.1 0 117.8-41.3 151.1-78.6 33.3 37.3 85 78.6 151.1 78.6 93.1 0 168.9-71.8 168.9-160S564.2 96 471.1 96zM168.9 320c-40.2 0-72.9-28.7-72.9-64s32.7-64 72.9-64c38.2 0 73.4 36.1 94 64-20.4 27.6-55.9 64-94 64zm302.2 0c-38.2 0-73.4-36.1-94-64 20.4-27.6 55.9-64 94-64 40.2 0 72.9 28.7 72.9 64s-32.7 64-72.9 64z"/></svg>

Before

Width:  |  Height:  |  Size: 684 B

View file

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path fill="white" d="M80 368H16a16 16 0 0 0-16 16v64a16 16 0 0 0 16 16h64a16 16 0 0 0 16-16v-64a16 16 0 0 0-16-16zm0-320H16A16 16 0 0 0 0 64v64a16 16 0 0 0 16 16h64a16 16 0 0 0 16-16V64a16 16 0 0 0-16-16zm0 160H16a16 16 0 0 0-16 16v64a16 16 0 0 0 16 16h64a16 16 0 0 0 16-16v-64a16 16 0 0 0-16-16zm416 176H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm0-320H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16V80a16 16 0 0 0-16-16zm0 160H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16z"/></svg>

Before

Width:  |  Height:  |  Size: 831 B

View file

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path fill="white" d="M144 479H48c-26.5 0-48-21.5-48-48V79c0-26.5 21.5-48 48-48h96c26.5 0 48 21.5 48 48v352c0 26.5-21.5 48-48 48zm304-48V79c0-26.5-21.5-48-48-48h-96c-26.5 0-48 21.5-48 48v352c0 26.5 21.5 48 48 48h96c26.5 0 48-21.5 48-48z"/></svg>

Before

Width:  |  Height:  |  Size: 487 B

View file

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path fill="white" d="M424.4 214.7L72.4 6.6C43.8-10.3 0 6.1 0 47.9V464c0 37.5 40.7 60.1 72.4 41.3l352-208c31.4-18.5 31.5-64.1 0-82.6z"/></svg>

Before

Width:  |  Height:  |  Size: 384 B

View file

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path fill="white" d="M464 32H336c-26.5 0-48 21.5-48 48v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48zm-288 0H48C21.5 32 0 53.5 0 80v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48z"/></svg>

Before

Width:  |  Height:  |  Size: 640 B

View file

@ -1,47 +0,0 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Generator: Adobe Illustrator 18.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 60 60" style="enable-background:new 0 0 60 60;" xml:space="preserve">
<g>
<path fill="white" d="M42,12H20.414l7.293-7.293c0.391-0.391,0.391-1.023,0-1.414s-1.023-0.391-1.414,0l-8.999,8.999
c-0.093,0.092-0.166,0.203-0.217,0.326c-0.101,0.244-0.101,0.52,0,0.764c0.051,0.123,0.124,0.234,0.217,0.326l8.999,8.999
C26.488,22.902,26.744,23,27,23s0.512-0.098,0.707-0.293c0.391-0.391,0.391-1.023,0-1.414L20.414,14H42c8.822,0,16,7.178,16,16
c0,4.252-1.668,8.264-4.696,11.295c-0.391,0.391-0.391,1.024,0,1.414c0.195,0.195,0.451,0.293,0.707,0.293s0.512-0.098,0.707-0.293
C58.124,39.3,60,34.786,60,30C60,20.075,51.925,12,42,12z"/>
<path fill="white" d="M35.707,37.293c-0.391-0.391-1.023-0.391-1.414,0s-0.391,1.023,0,1.414L41.586,46H18C9.178,46,2,38.822,2,30
c0-3.783,1.359-7.46,3.828-10.354c0.358-0.421,0.309-1.052-0.111-1.41c-0.419-0.359-1.052-0.31-1.41,0.111
C1.529,21.604,0,25.741,0,30c0,9.925,8.075,18,18,18h23.586l-7.293,7.293c-0.391,0.391-0.391,1.023,0,1.414
C34.488,56.902,34.744,57,35,57s0.512-0.098,0.707-0.293l9-9c0.391-0.391,0.391-1.023,0-1.414L35.707,37.293z"/>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.6 KiB

View file

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path fill="white" d="M505 442.7L405.3 343c-4.5-4.5-10.6-7-17-7H372c27.6-35.3 44-79.7 44-128C416 93.1 322.9 0 208 0S0 93.1 0 208s93.1 208 208 208c48.3 0 92.7-16.4 128-44v16.3c0 6.4 2.5 12.5 7 17l99.7 99.7c9.4 9.4 24.6 9.4 33.9 0l28.3-28.3c9.4-9.4 9.4-24.6.1-34zM208 336c-70.7 0-128-57.2-128-128 0-70.7 57.2-128 128-128 70.7 0 128 57.2 128 128 0 70.7-57.2 128-128 128z"/></svg>

Before

Width:  |  Height:  |  Size: 618 B

View file

@ -1,45 +0,0 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Generator: Adobe Illustrator 18.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 230.055 230.055" style="enable-background:new 0 0 230.055 230.055;" xml:space="preserve">
<path fill="white" d="M199.419,124.497c-3.516-3.515-9.213-3.515-12.729,0c-3.515,3.515-3.515,9.213,0,12.728l12.637,12.636h-8.406
c-8.177,0-16.151-2.871-22.453-8.083l-32.346-26.751l32.345-26.751c6.303-5.212,14.277-8.083,22.454-8.083h8.406L186.69,92.83
c-3.515,3.515-3.515,9.213,0,12.728c1.758,1.757,4.061,2.636,6.364,2.636s4.606-0.879,6.364-2.636l28-28
c3.515-3.515,3.515-9.213,0-12.728l-28-28c-3.516-3.515-9.213-3.515-12.729,0c-3.515,3.515-3.515,9.213,0,12.728l12.637,12.636
h-8.406c-12.354,0-24.403,4.337-33.926,12.211L122,103.348L82.564,70.733c-6.658-5.507-15.084-8.54-23.724-8.54H9
c-4.971,0-9,4.029-9,9s4.029,9,9,9h49.841c4.462,0,8.813,1.566,12.252,4.411l36.786,30.423L71.094,145.45
c-3.439,2.844-7.791,4.411-12.253,4.411H9c-4.971,0-9,4.029-9,9s4.029,9,9,9h49.841c8.64,0,17.065-3.033,23.725-8.54L122,126.707
l34.996,28.943c9.521,7.875,21.57,12.211,33.925,12.211h8.406l-12.637,12.636c-3.515,3.515-3.515,9.213,0,12.728
c1.758,1.757,4.061,2.636,6.364,2.636s4.606-0.879,6.364-2.636l28-28c3.515-3.515,3.515-9.213,0-12.728L199.419,124.497z"/>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.6 KiB

View file

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path fill="white" d="M215.03 72.04L126.06 161H24c-13.26 0-24 10.74-24 24v144c0 13.25 10.74 24 24 24h102.06l88.97 88.95c15.03 15.03 40.97 4.47 40.97-16.97V89.02c0-21.47-25.96-31.98-40.97-16.98zm123.2 108.08c-11.58-6.33-26.19-2.16-32.61 9.45-6.39 11.61-2.16 26.2 9.45 32.61C327.98 229.28 336 242.62 336 257c0 14.38-8.02 27.72-20.92 34.81-11.61 6.41-15.84 21-9.45 32.61 6.43 11.66 21.05 15.8 32.61 9.45 28.23-15.55 45.77-45 45.77-76.88s-17.54-61.32-45.78-76.87z"/></svg>

Before

Width:  |  Height:  |  Size: 710 B

View file

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path fill="white" d="M215.03 71.05L126.06 160H24c-13.26 0-24 10.74-24 24v144c0 13.25 10.74 24 24 24h102.06l88.97 88.95c15.03 15.03 40.97 4.47 40.97-16.97V88.02c0-21.46-25.96-31.98-40.97-16.97zm233.32-51.08c-11.17-7.33-26.18-4.24-33.51 6.95-7.34 11.17-4.22 26.18 6.95 33.51 66.27 43.49 105.82 116.6 105.82 195.58 0 78.98-39.55 152.09-105.82 195.58-11.17 7.32-14.29 22.34-6.95 33.5 7.04 10.71 21.93 14.56 33.51 6.95C528.27 439.58 576 351.33 576 256S528.27 72.43 448.35 19.97zM480 256c0-63.53-32.06-121.94-85.77-156.24-11.19-7.14-26.03-3.82-33.12 7.46s-3.78 26.21 7.41 33.36C408.27 165.97 432 209.11 432 256s-23.73 90.03-63.48 115.42c-11.19 7.14-14.5 22.07-7.41 33.36 6.51 10.36 21.12 15.14 33.12 7.46C447.94 377.94 480 319.54 480 256zm-141.77-76.87c-11.58-6.33-26.19-2.16-32.61 9.45-6.39 11.61-2.16 26.2 9.45 32.61C327.98 228.28 336 241.63 336 256c0 14.38-8.02 27.72-20.92 34.81-11.61 6.41-15.84 21-9.45 32.61 6.43 11.66 21.05 15.8 32.61 9.45 28.23-15.55 45.77-45 45.77-76.88s-17.54-61.32-45.78-76.86z"/></svg>

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

View file

@ -1,862 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no, viewport-fit=cover">
<title>Web Remote</title>
<link rel="stylesheet" href="style.css?v=2">
<script src="vue.js"></script>
<script src="sortable.min.js"></script>
<script src="vuedraggable.umd.min.js"></script>
<link rel="manifest" href="manifest.json?v=2">
</head>
<body oncontextmenu="return false;">
<div id="app" :style="{'--artwork': getAlbumArtUrl()}">
<!-- App view when connected -->
<template v-if="connectedState == 1">
<!-- Streamer Overlay -->
<template></template>
<!-- Mini Player -->
<template v-if="screen == 'miniplayer'">
<div class="miniplayer-main">
<div class="media-artwork--miniplayer" :class="artworkPlaying()"
:style="{'--artwork': getAlbumArtUrl()}">
</div>
<div class="miniplayer-draggable">
</div>
<div class="miniplayer-controls">
<button class="md-btn playback-button--small repeat" @click="repeat()"
v-if="player.currentMediaItem.repeatMode == 0"></button>
<button class="md-btn playback-button--small repeat active" @click="repeat()"
v-else-if="player.currentMediaItem.repeatMode == 2"></button>
<button class="md-btn playback-button--small repeat repeatOne" @click="repeat()"
v-else-if="player.currentMediaItem.repeatMode == 1"></button>
<button class="md-btn playback-button previous" @click="previous()"></button>
<button class="md-btn playback-button pause" @click="pause()"
v-if="player.currentMediaItem.status"></button>
<button class="md-btn playback-button play" @click="play()" v-else></button>
<button class="md-btn playback-button next" @click="next()"></button>
<button class="md-btn playback-button--small shuffle" @click="shuffle()"
v-if="player.currentMediaItem.shuffleMode == 0"></button>
<button class="md-btn playback-button--small shuffle active" @click="shuffle()"
v-else></button>
</div>
</div>
</template>
<!-- Player -->
<transition name="wpfade">
<div class="md-container md-container_panel player-panel" v-if="screen == 'player'">
<div class="player_top">
<div class="md-body player-artwork-container">
<div class="media-artwork" :class="artworkPlaying()"
:style="{'--artwork': getAlbumArtUrl()}">
</div>
</div>
</div>
<div class="player_bottom" v-if="player.lowerPanelState == 'lyrics'">
<div class="md-header" style="width:100%;">
<div class="list-entry" v-if="false">
<div class="row">
<div class="col-auto flex-center">
<div class="list-entry-image" :style="{'--artwork': getAlbumArtUrl()}">
</div>
</div>
<div class="col flex-center">
<div class="list-entry-name">
{{ player.currentMediaItem.name }}
</div>
<div class="list-entry-artist">
{{ player.currentMediaItem.artistName }}
</div>
</div>
</div>
</div>
</div>
<div class="md-body lyric-body" style="width:100%;">
<template v-if="player.lyrics">
<template v-for="lyric in player.lyrics" v-if="lyric.line != 'lrcInstrumental'">
<h3 class="lyric-line" @click="seekTo(lyric.startTime, false)"
:class="getLyricClass(lyric.startTime, lyric.endTime)">
{{ lyric.line }}
</h3>
</template>
<template v-else>
<h3 class="lyric-line" @click="seekTo(lyric.startTime, false)"
:class="getLyricClass(lyric.startTime, lyric.endTime)">
<div class="lyricWaiting">
<div></div>
<div></div>
<div></div>
</div>
</h3>
</template>
</template>
<template v-else>
No Lyrics Available
</template>
</div>
<div class="md-footer">
<button class="md-btn playback-button--small lyrics active"
@click="player.lowerPanelState = 'controls'"></button>
</div>
</div>
<div class="player_bottom" v-if="player.lowerPanelState == 'controls'">
<div class="md-footer">
<div class="row player-track-info">
<div class="col nopadding text-overflow-elipsis">
<div class="player-song-title text-overflow-elipsis">
{{ player.currentMediaItem.name }}
</div>
<div class="player-song-artist text-overflow-elipsis" @click="searchArtist()">
{{ player.currentMediaItem.artistName }}
</div>
</div>
<div class="col-auto nopadding player-more-container" v-if="false" style="">
<button @click="player.songActions = true;" class="player-more-button">...</button>
</div>
</div>
</div>
<div class="md-footer">
<input type="range" min="0"
:value="player.currentMediaItem.durationInMillis - player.currentMediaItem.remainingTime"
:max="player.currentMediaItem.durationInMillis" class="web-slider playback-slider"
@input="seekTo($event.target.value)">
<div class="row nopadding player-duration-container" style="width: 90%;margin: 0 auto;">
<div class="col nopadding player-duration-time" style="text-align:left">
{{ parseTime(player.currentMediaItem.durationInMillis -
player.currentMediaItem.remainingTime) }}
</div>
<div class="col nopadding player-duration-time" style="text-align:right">
-{{ parseTime(player.currentMediaItem.remainingTime) }}
</div>
</div>
</div>
<div class="md-footer playback-buttons">
<button class="md-btn playback-button--small repeat" @click="repeat()"
v-if="player.currentMediaItem.repeatMode == 0"></button>
<button class="md-btn playback-button--small repeat active" @click="repeat()"
v-else-if="player.currentMediaItem.repeatMode == 2"></button>
<button class="md-btn playback-button--small repeat repeatOne" @click="repeat()"
v-else-if="player.currentMediaItem.repeatMode == 1"></button>
<button class="md-btn playback-button previous" @click="previous()"></button>
<button class="md-btn playback-button pause" @click="pause()"
v-if="player.currentMediaItem.status"></button>
<button class="md-btn playback-button play" @click="play()" v-else></button>
<button class="md-btn playback-button next" @click="next()"></button>
<button class="md-btn playback-button--small shuffle" @click="shuffle()"
v-if="player.currentMediaItem.shuffleMode == 0"></button>
<button class="md-btn playback-button--small shuffle active" @click="shuffle()"
v-else></button>
</div>
<div class="md-footer">
<div class="row volume-slider-container">
<div class="col-auto">
<div class="player-volume-glyph decrease"></div>
</div>
<div class="col">
<input type="range" class="web-slider volume-slider" max="1" min="0" step="0.01"
@input="setVolume($event.target.value)" :value="player.currentMediaItem.volume">
</div>
<div class="col-auto">
<div class="player-volume-glyph increase"></div>
</div>
</div>
</div>
<div class="md-footer">
<button class="md-btn playback-button--small lyrics" v-if="checkOrientation() == 'portrait'"
@click="showLyrics()"></button>
<button class="md-btn playback-button--small lyrics"
v-if="checkOrientation() == 'landscape'" @click="showLyricsInline()"></button>
<button class="md-btn playback-button--small queue" @click="showQueue()"></button>
<button class="md-btn playback-button--small search" @click="showSearch()"></button>
</div>
</div>
</div>
</transition>
<!-- Search -->
<transition name="wpfade">
<div class="md-container md-container_panel search-panel" v-if="screen == 'search'">
<div class="search-header">
<div class="md-header">
<div class="row">
<div class="col-auto">
<button class="back-button" @click="screen = 'player'"></button>
</div>
<div class="col" style="display: flex;align-items: center;">
<div class="col">
<input type="text" placeholder="Artists, Songs, Lyrics, and More"
spellcheck="false" v-model="search.query" @change="searchQuery()"
v-on:keyup.enter="searchQuery()" class="search-input">
</div>
</div>
</div>
</div>
<div class="md-header search-type-container">
<button class="search-type-button" @click="search.searchType = 'applemusic';searchQuery()"
:class="searchTypeClass('applemusic')" style="width:100%;">Apple Music
</button>
<button class="search-type-button" @click="search.searchType = 'library';searchQuery()"
:class="searchTypeClass('library')" style="width:100%;">Library
</button>
</div>
<div class="md-header search-tab-container" v-if="search.state == 2">
<button class="search-tab" @click="search.tab = 'all'" :class="searchTabClass('all')">All
Results
</button>
<button class="search-tab" @click="search.tab = 'songs'"
:class="searchTabClass('songs')">Songs
</button>
<button class="search-tab" @click="search.tab = 'albums'"
:class="searchTabClass('albums')">Albums
</button>
<button class="search-tab" @click="search.tab = 'artists'"
:class="searchTabClass('artists')">Artists
</button>
</div>
</div>
<div class="search-body-container">
<transition name="wpfade">
<div class="md-body search-body" v-if="search.state == 0">
<div
style="font-size: 17px;display:flex;flex-direction: column;justify-content: center;align-items: center;">
<img src="assets/search.svg" style="width: 40px;margin: 32px;opacity: 0.85">
Search by song, album, artist, or lyrics.
</div>
</div>
</transition>
<transition name="wpfade">
<div class="md-body search-body" v-if="search.state == 1">
<!-- loading state -->
</div>
</transition>
<transition name="wpfade">
<div class="md-body search-body"
ref="searchBody"
@scroll="searchScroll"
style="overflow-y:auto;" v-if="search.state == 2">
<template v-if="canShowSearchTab('songs')">
<div class="list-entry-header">Songs</div>
<div class="list-entry" v-for="song in search.results.songs"
@click="trackSelect(song)">
<div class="row">
<div class="col-auto flex-center">
<div class="list-entry-image" v-if="song.artwork"
:style="{'--artwork': getAlbumArtUrlList(song.artwork.url)}">
</div>
</div>
<div class="col flex-center">
<div class="list-entry-name">
{{ song.name }}
</div>
<div class="list-entry-artist">
{{ song.artistName }}
<span class="lossless-badge"
v-if="song.audioTraits.includes('lossless')">Lossless</span>
</div>
</div>
</div>
</div>
<div class="list-entry" v-for="song in search.results['library-songs']"
@click="trackSelect(song)">
<div class="row">
<div class="col-auto flex-center">
<div class="list-entry-image" v-if="song.artwork"
:style="{'--artwork': getAlbumArtUrlList(song.artwork.url)}">
</div>
</div>
<div class="col flex-center">
<div class="list-entry-name">
{{ song.name }}
</div>
<div class="list-entry-artist">
{{ song.artistName }}
</div>
</div>
</div>
</div>
</template>
<template v-if="canShowSearchTab('albums')">
<div class="list-entry-header">Albums</div>
<div class="list-entry" v-for="album in search.results.albums"
@click="showAlbum(album.id)">
<div class="row">
<div class="col-auto flex-center">
<div class="list-entry-image" v-if="album.artwork"
:style="{'--artwork': getAlbumArtUrlList(album.artwork.url)}">
</div>
</div>
<div class="col flex-center">
<div class="list-entry-name">
{{ album.name }}
</div>
<div class="list-entry-artist">
{{ album.artistName }}
<span class="lossless-badge"
v-if="album.audioTraits.includes('lossless')">Lossless</span>
</div>
</div>
</div>
</div>
<div class="list-entry" v-for="album in search.results['library-albums']">
<div class="row">
<div class="col-auto flex-center">
<div class="list-entry-image" v-if="album.artwork"
:style="{'--artwork': getAlbumArtUrlList(album.artwork.url)}">
</div>
</div>
<div class="col flex-center">
<div class="list-entry-name">
{{ album.name }}
</div>
<div class="list-entry-artist">
{{ album.artistName }}
</div>
</div>
</div>
</div>
</template>
<template v-if="canShowSearchTab('artists')">
<div class="list-entry-header">Artists</div>
<div class="list-entry"
@click="showArtist(artist.id)"
v-for="artist in search.results.artists"
>
<div class="row">
<div class="col-auto flex-center">
<div class="list-entry-image artist" v-if="artist.artwork"
:style="{'--artwork': getAlbumArtUrlList(artist.artwork.url)}">
</div>
</div>
<div class="col flex-center">
<div class="list-entry-name">
{{ artist.name }}
</div>
<div class="list-entry-artist">
</div>
</div>
</div>
</div>
<div class="list-entry" v-for="artist in search.results['library-artists']">
<div class="row">
<div class="col-auto flex-center">
<div class="list-entry-image artist" v-if="artist.artwork"
:style="{'--artwork': getAlbumArtUrlList(artist.artwork.url)}">
</div>
</div>
<div class="col flex-center">
<div class="list-entry-name">
{{ artist.name }}
</div>
<div class="list-entry-artist">
</div>
</div>
</div>
</div>
</template>
</div>
</transition>
</div>
<footer-player></footer-player>
</div>
</transition>
<!-- Track Select Actions -->
<transition name="wpfade">
<div class="md-container md-container_panel context-menu" style="overflow-y:auto;"
v-if="search.trackSelect">
<div class="md-body context-menu-body">
<button class="context-menu-item context-menu-item--left"
@click="playMediaItemById(search.selected.id);clearSelectedTrack()">
<div class="row">
<div class="col-auto flex-center" v-if="search.selected.artwork"
style="display:flex;align-items: center;">
<div class="list-entry-image"
:style="{'--artwork': getAlbumArtUrlList(search.selected.artwork.url)}">
</div>
</div>
<div class="col flex-center" style="display:flex;align-items: center;">
<div style="width:100%;font-size: 18px;">
{{ search.selected.name }}
</div>
<div style="width:100%;font-size: 16px;">
{{ search.selected.artistName }}
</div>
<div style="width:100%;font-size: 14px;">
{{ parseTime(search.selected.durationInMillis) }}
</div>
</div>
</div>
</button>
</div>
<div class="md-body context-menu-body" style="height: auto;">
<button class="context-menu-item context-menu-item--left"
@click="playMediaItemById(search.selected.id);clearSelectedTrack()">
<div class="row">
<div class="col">
Play
</div>
<div class="col-auto">
▶️
</div>
</div>
</button>
<button class="context-menu-item context-menu-item--left"
@click="playNext('song', search.selected.id);clearSelectedTrack()">
<div class="row">
<div class="col">
Play Next
</div>
<div class="col-auto">
⏭️
</div>
</div>
</button>
<button class="context-menu-item context-menu-item--left"
@click="playLater('song', search.selected.id);clearSelectedTrack()">
<div class="row">
<div class="col">
Play Later
</div>
<div class="col-auto">
</div>
</div>
</button>
<button class="context-menu-item context-menu-item--left" v-if="false">
<div class="row">
<div class="col">
Open in {{ musicAppVariant() }}
</div>
<div class="col-auto">
🎵
</div>
</div>
</button>
</div>
<div class="md-footer">
<button class="context-menu-item" @click="clearSelectedTrack()">Cancel</button>
</div>
</div>
</transition>
<!-- Song Actions -->
<transition name="wpfade">
<div class="md-container md-container_panel context-menu" v-if="player.songActions">
<div class="md-header">
</div>
<div class="md-body context-menu-body">
<button class="context-menu-item context-menu-item--left" v-if="false">
<div class="row">
<div class="col">
Add To Library
</div>
<div class="col-auto">
</div>
</div>
</button>
<button class="context-menu-item context-menu-item--left" v-if="false">
<div class="row">
<div class="col">
Love
</div>
<div class="col-auto">
❤️
</div>
</div>
</button>
<button class="context-menu-item context-menu-item--left">
<div class="row">
<div class="col">
Share
</div>
<div class="col-auto">
🌐
</div>
</div>
</button>
<button class="context-menu-item context-menu-item--left">
<div class="row">
<div class="col">
Open in {{ musicAppVariant() }}
</div>
<div class="col-auto">
🎵
</div>
</div>
</button>
</div>
<div class="md-footer">
<button class="context-menu-item" @click="player.songActions = false">Cancel</button>
</div>
</div>
</transition>
<!-- Artist Page -->
<transition name="wpfade">
<div class="md-container md-container_panel" v-if="screen == 'artist-page'" v-if="artistPage.data['name']">
<div class="md-header">
<div class="row">
<div class="col-auto">
<button class="back-button" @click="showSearch(true)"></button>
</div>
<div class="col flex-center">
{{ artistPage.data["name"] }}
</div>
</div>
</div>
<div class="album-body-container" :style="getMediaPalette(artistPage.data)">
<div class="artist-header" v-if="artistPage.data['artwork']"
:style="getMediaPalette(artistPage.data)">
<div class="artist-header-portrait"
:style="{'--artwork': getAlbumArtUrlList(artistPage.data['artwork']['url'], 600)}"></div>
<h2>{{ artistPage.data["name"] }}</h2>
</div>
<div class="md-body artist-body">
<h2>Songs</h2>
<div class="song-scroller-horizontal">
<button v-for="song in artistPage.data['songs']" class="song-placeholder"
@click="trackSelect(song)">
{{ song.name }}
</button>
</div>
<h2>Albums</h2>
<div class="mediaitem-scroller-horizontal">
<button v-for="album in artistPage.data['albums']" class="album-placeholder"
@click="showAlbum(album.id)">
{{ album.name }}
</button>
</div>
<h2>Playlists</h2>
<div class="mediaitem-scroller-horizontal">
<button v-for="playlist in artistPage.data['playlists']" class="album-placeholder">
{{ playlist.name }}
</button>
</div>
</div>
</div>
<footer-player></footer-player>
</div>
</transition>
<!-- Queue -->
<transition name="wpfade">
<div class="md-container md-container_panel" v-if="screen == 'queue'">
<div class="md-header">
<div class="list-entry" @click="screen = 'player'">
<div class="row">
<div class="col-auto flex-center">
<div class="list-entry-image" :style="{'--artwork': getAlbumArtUrl()}">
</div>
</div>
<div class="col flex-center">
<div class="list-entry-name">
{{ player.currentMediaItem.name }}
</div>
<div class="list-entry-artist">
{{ player.currentMediaItem.artistName }}
</div>
</div>
</div>
</div>
</div>
<div class="md-header" style="text-align: right;padding: 5px 16px;">
<button
class="md-btn playback-button--small autoplay"
v-if="!player.currentMediaItem.autoplayEnabled"
@click="setAutoplay(true)"
></button>
<button
class="md-btn playback-button--small autoplay activeColor"
v-else
@click="setAutoplay(false)"
></button>
</div>
<div class="md-body queue-body" v-if="!player.queue['_queueItems']">
Empty
</div>
<div class="md-body queue-body" style="overflow-y:auto;" id="list-queue" v-else>
<draggable
v-model="queue.temp"
handle=".handle"
filter=".passed"
@change="queueMove">
<template
v-for="(song, position) in queue.temp"
v-if="position > player.queue['_position']"
>
<div class="list-entry" :class="getQueuePositionClass(position)">
<div class="row" style="width:100%;">
<div class="col-auto">
<div class="handle">
</div>
</div>
<div class="col-auto flex-center">
<div class="list-entry-image" v-if="song.item.attributes.artwork"
:style="{'--artwork': getAlbumArtUrlList(song.item.attributes.artwork.url)}">
</div>
</div>
<div class="col flex-center">
<div class="list-entry-name">
{{ song.item.attributes.name }}
</div>
<div class="list-entry-artist">
{{ song.item.attributes.artistName }}
</div>
</div>
<div class="col-auto flex-center" style="text-align:right;">
<div v-if="position == player.queue['_position']">▶️</div>
</div>
</div>
</div>
</template>
</draggable>
</div>
<div class="md-footer">
<button class="md-btn playback-button--small lyrics" v-if="checkOrientation() == 'portrait'"
@click="showLyrics()"></button>
<button class="md-btn playback-button--small lyrics"
v-if="checkOrientation() == 'landscape'"
@click="screen = 'player';showLyricsInline()"></button>
<button class="md-btn playback-button--small queue active" @click="screen = 'player'"></button>
<button class="md-btn playback-button--small search" @click="showSearch()"></button>
</div>
</div>
</transition>
<!-- Lyrics -->
<transition name="wpfade">
<div class="md-container md-container_panel" v-if="screen == 'lyrics'">
<div class="md-header">
<div class="list-entry" @click="screen = 'player'">
<div class="row">
<div class="col-auto flex-center">
<div class="list-entry-image" :style="{'--artwork': getAlbumArtUrl()}">
</div>
</div>
<div class="col flex-center">
<div class="list-entry-name">
{{ player.currentMediaItem.name }}
</div>
<div class="list-entry-artist">
{{ player.currentMediaItem.artistName }}
</div>
</div>
</div>
</div>
</div>
<div class="md-body lyric-body">
<template v-if="player.lyrics">
<template v-for="lyric in player.lyrics" v-if="lyric.line != 'lrcInstrumental'">
<h3 class="lyric-line" @click="seekTo(lyric.startTime, false)"
:class="getLyricClass(lyric.startTime, lyric.endTime)">
{{ lyric.line }}
</h3>
</template>
<template v-else>
<h3 class="lyric-line" @click="seekTo(lyric.startTime, false)"
:class="getLyricClass(lyric.startTime, lyric.endTime)">
<div class="lyricWaiting">
<div></div>
<div></div>
<div></div>
</div>
</h3>
</template>
</template>
<template v-else>
No Lyrics Available
</template>
</div>
<div class="md-footer">
<button class="md-btn playback-button--small lyrics active" @click="screen = 'player'"></button>
<button class="md-btn playback-button--small queue" @click="showQueue()"></button>
<button class="md-btn playback-button--small search" @click="showSearch()"></button>
</div>
</div>
</transition>
<!-- Album Page -->
<transition name="wpfade">
<div class="md-container md-container_panel md-container_album"
v-if="screen == 'album-page' && albumPage.data['name']"
>
<div class="md-header">
<div class="row">
<div class="col-auto">
<button class="back-button" @click="showSearch(true)"></button>
</div>
</div>
</div>
<div class="album-body-container">
<div class="md-header">
<div class="albumpage-artwork"
:style="{'--artwork': getAlbumArtUrlList(albumPage.data['artwork']['url'], 300)}">
</div>
<div class="albumpage-album-name">
{{ albumPage.data["name"] }}
</div>
<div class="albumpage-artist-name" @click="showArtist(albumPage.data['artists'][0]['id'])">
{{ albumPage.data["artistName"] }}
</div>
<div class="albumpage-misc-info">
{{ albumPage.data.genreNames[0] }} ∙ {{ new Date(albumPage.data.releaseDate).getFullYear()
}}
</div>
<div class="row" style="margin-top: 20px;">
<div class="col">
<button class="wr-btn"
@click="playAlbum(albumPage.data.id, false)"
style="width:100%;">Play
</button>
</div>
<div class="col">
<button class="wr-btn" style="width:100%;"
@click="playAlbum(albumPage.data.id, true)"
>Shuffle
</button>
</div>
</div>
<div class="albumpage-album-notes" v-if="albumPage.data['editorialNotes']">
<div class="notes-preview" v-html="albumPage.data['editorialNotes']['standard']">
</div>
<button @click="albumPage.editorsNotes = true" class="notes-more">More</button>
</div>
</div>
<div class="md-body artist-body">
<div class="list-entry-header">Tracks</div>
<div class="list-entry" v-for="song in albumPage.data['tracks']"
@click="trackSelect(song)">
<div class="row">
<div class="col-auto flex-center">
<div class="list-entry-image" v-if="song.artwork"
:style="{'--artwork': getAlbumArtUrlList(song.artwork.url)}">
</div>
</div>
<div class="col flex-center">
<div class="list-entry-name">
{{ song.name }}
</div>
<div class="list-entry-artist">
{{ song.artistName }}
</div>
</div>
</div>
</div>
<div class="md-footer">
<div>{{ albumPage.data['tracks'].length }} Tracks</div>
<div>
{{ albumPage.data['copyright'] }}
</div>
</div>
</div>
</div>
<footer-player></footer-player>
</div>
</transition>
<!-- Album Page - Editorial Notes -->
<transition name="wpfade">
<div class="md-container md-container_panel context-menu" v-if="albumPage.editorsNotes"
style="padding-top: 42px;">
<div class="md-header"
:style="getMediaPalette(albumPage.data)"
style="font-size: 18px;background:var(--bgColor);color:var(--textColor1);text-align: center;border-radius: 10px 10px 0 0;border-top: 1px solid #ffffff1f;"
>
{{ albumPage.data["name"] }}
</div>
<div class="md-body album-page-fullnotes-body"
:style="getMediaPalette(albumPage.data)"
style="background:var(--bgColor);color:var(--textColor1);"
v-html="albumPage.data['editorialNotes']['standard']">
</div>
<div class="md-footer"
:style="getMediaPalette(albumPage.data)"
style="background:var(--bgColor);color:var(--textColor1);"
>
<button class="context-menu-item" @click="albumPage.editorsNotes = false">Close</button>
</div>
</div>
</transition>
</template>
<!-- Loading -->
<transition name="wpfade">
<div class="md-container md-container_panel connection-error-panel" v-if="connectedState != 1">
<div class="md-header">
</div>
<div class="md-body" style="display:flex;justify-content: center;align-items: center;">
<div v-if="connectedState == 0">
Loading...
</div>
<div v-else>
<h3 style="text-align:center;">Connection Interrupted</h3>
<button class="md-btn md-btn-primary"
style="font-weight:500;width: 120px;border-radius: 50px;display:block;margin: 0 auto;"
@click="connect()">Retry
</button>
</div>
</div>
<div class="md-footer">
</div>
</div>
</transition>
<!-- Template -->
<transition name="wpfade">
<div class="md-container md-container_panel" v-if="false">
<div class="md-header">
</div>
<div class="md-body">
</div>
<div class="md-footer">
</div>
</div>
</transition>
</div>
<script type="text/x-template" id="footer-player">
<div class="footer-player" v-show="$parent.player.currentMediaItem['name']">
<div class="row" style="width:100%;margin:0px;">
<div class="col-auto flex-center" style="padding:0 6px;" @click="$parent.screen = 'player'">
<div class="list-entry-image" :style="{'--artwork': $parent.getAlbumArtUrl()}">
</div>
</div>
<div class="col flex-center text-overflow-elipsis" @click="$parent.screen = 'player'">
<div class="list-entry-name text-overflow-elipsis">
{{ $parent.player.currentMediaItem.name }}
</div>
<div class="list-entry-artist text-overflow-elipsis">
{{ $parent.player.currentMediaItem.artistName }}
</div>
</div>
<div class="col-auto">
<button class="md-btn playback-button pause" @click="$parent.pause()"
v-if="$parent.player.currentMediaItem.status"></button>
<button class="md-btn playback-button play" @click="$parent.play()" v-else></button>
</div>
</div>
</div>
</script>
<script src="../../../index.js?v=1"></script>
</body>
</html>

View file

@ -1,619 +0,0 @@
var socket;
Vue.component('footer-player', {
template: '#footer-player'
});
// vue instance
var app = new Vue({
el: '#app',
data: {
screen: "player",
player: {
currentMediaItem: {},
songActions: false,
lyrics: {},
lyricsMediaItem: {},
lyricsDebug: {
current: 0,
start: 0,
end: 0
},
queue: {},
lowerPanelState: "controls",
userInteraction: false
},
queue: {
temp: []
},
artistPage: {
data: {},
editorsNotes: false
},
albumPage: {
data: {},
editorsNotes: false
},
search: {
query: "",
results: [],
state: 0,
tab: "all",
searchType: "applemusic",
trackSelect: false,
selected: {},
queue: {},
lastPage: "search",
lastY: 0
},
lastPage: "player",
connectedState: 0,
url: window.location.hostname,
mode: "default",
// url: "localhost",
},
methods: {
searchScroll(e) {
this.search.lastY = e.target.scrollTop;
},
musicKitAPI(method, id, params) {
socket.send(
JSON.stringify({
action: "musickit-api",
method: method,
id: id,
params: params
})
)
},
resetPlayerUI() {
this.player.lowerPanelState = "controls";
},
musicAppVariant() {
if (navigator.userAgent.match(/Android/i)) {
return "Apple Music";
} else if (navigator.userAgent.match(/iPhone|iPad|iPod/i)) {
return "Music";
} else {
if (navigator.userAgent.indexOf('Mac') > 0) {
return 'Music';
} else if (navigator.userAgent.indexOf('Win') > 0) {
return 'Apple Music Electron';
} else {
return 'Apple Music Electron';
}
}
},
checkOrientation() {
// check orientation of device
if (window.innerHeight > window.innerWidth) {
return 'portrait'
} else {
return 'landscape';
}
},
checkPlatformMD() {
// check if platfom is desktop or mobile
if (navigator.userAgent.match(/Android/i)) {
return "mobile";
} else if (navigator.userAgent.match(/iPhone|iPad|iPod/i)) {
return "mobile";
} else {
if (navigator.userAgent.indexOf('Mac') > 0) {
return 'desktop';
} else if (navigator.userAgent.indexOf('Win') > 0) {
return 'desktop';
} else {
return 'desktop';
}
}
},
checkPlatform() {
if (navigator.userAgent.match(/Android/i)) {
return "android";
} else if (navigator.userAgent.match(/iPhone|iPad|iPod/i)) {
return "ios";
} else {
if (navigator.userAgent.indexOf('Mac') > 0) {
return 'mac';
} else if (navigator.userAgent.indexOf('Win') > 0) {
return 'win';
} else {
return 'linux';
}
}
},
artworkPlaying() {
if (this.player.currentMediaItem.status) {
return
} else {
return ["paused"]
}
},
setAutoplay(value) {
socket.send(JSON.stringify({
"action": "set-autoplay",
"autoplay": value
}));
this.getCurrentMediaItem()
if (value) {
setTimeout(() => {
this.getQueue()
}, 1000)
} else {
this.getQueue()
}
},
seekTo(time, adjust = true) {
if (adjust) {
time = parseInt(time / 1000)
}
socket.send(JSON.stringify({
action: "seek",
time: time
}));
},
setVolume(volume) {
socket.send(JSON.stringify({
action: "volume",
volume: volume
}));
},
getQueue() {
socket.send(JSON.stringify({
action: "get-queue"
}))
},
play() {
socket.send(JSON.stringify({
action: "play"
}))
},
pause() {
socket.send(JSON.stringify({
action: "pause"
}))
},
next() {
socket.send(JSON.stringify({
action: "next"
}))
},
previous() {
socket.send(JSON.stringify({
action: "previous"
}))
},
searchArtist() {
this.search.query = this.player.currentMediaItem.artistName;
this.screen = "search";
this.searchQuery();
},
trackSelect(song) {
this.search.selected = song;
this.search.trackSelect = true
},
clearSelectedTrack() {
this.search.selected = {}
this.search.trackSelect = false
},
getArtworkColor(hex) {
return `#${hex}`
},
playMediaItemById(id, kind = "song") {
socket.send(JSON.stringify({
action: "play-mediaitem",
id: id,
kind: kind
}))
this.screen = "player";
},
playNext(type, id) {
socket.send(JSON.stringify({
action: "play-next",
type: type,
id: id
}))
},
playLater(type, id) {
socket.send(JSON.stringify({
action: "play-later",
type: type,
id: id
}))
},
searchQuery() {
if (this.search.query.length == 0) {
this.search.state = 0;
return;
}
this.search.state = 1;
var actionType = "search"
if (this.search.searchType == "library") {
actionType = "library-search"
}
socket.send(JSON.stringify({
"action": actionType,
"term": this.search.query,
"limit": 20
}))
},
quickSearch() {
var search = prompt("Search for a song", "")
if (search == null || search == "") {
return
}
socket.send(JSON.stringify({
action: "quick-play",
term: search
}))
},
parseTime(value) {
var minutes = Math.floor(value / 60000);
var seconds = ((value % 60000) / 1000).toFixed(0);
return minutes + ":" + (seconds < 10 ? '0' : '') + seconds;
},
parseTimeDecimal(value) {
var minutes = Math.floor(value / 60000);
var seconds = ((value % 60000) / 1000).toFixed(0);
return minutes + "." + (seconds < 10 ? '0' : '') + seconds;
},
hmsToSecondsOnly(str) {
var p = str.split(':'),
s = 0,
m = 1;
while (p.length > 0) {
s += m * parseInt(p.pop(), 10);
m *= 60;
}
return s;
},
getCurrentTime() {
return parseFloat(this.hmsToSecondsOnly(this.parseTime(this.player.currentMediaItem.durationInMillis - this.player.currentMediaItem.remainingTime)));
},
percentage(partial, full) {
return (100 * partial) / full
},
getLyricBGStyle(start, end) {
var currentTime = this.getCurrentTime();
var duration = this.player.currentMediaItem.durationInMillis
var start2 = this.hmsToSecondsOnly(start)
var end2 = this.hmsToSecondsOnly(end)
var currentProgress = ((100 * (currentTime)) / (end2))
// check if currenttime is between start and end
this.player.lyricsDebug.start = start2
this.player.lyricsDebug.end = end2
this.player.lyricsDebug.current = currentTime
if (currentTime >= start2 && currentTime <= end2) {
return {
"--bgSpeed": `${(end2 - start2)}s`
}
} else {
return {}
}
},
getLyricClass(start, end) {
var currentTime = this.getCurrentTime();
// check if currenttime is between start and end
if (currentTime >= start && currentTime <= end) {
setTimeout(() => {
if (document.querySelector(".lyric-line.active")) {
document.querySelector(".lyric-line.active").scrollIntoView({
behavior: "smooth",
block: "center"
})
}
}, 200)
return "active"
} else {
return ""
}
},
getAlbumArtUrl(size = 600) {
if (this.player.currentMediaItem.artwork) {
return `url("${this.player.currentMediaItem.artwork.url.replace('{w}', size).replace('{h}', size)}")`;
} else {
return "";
}
},
getAlbumArtUrlList(url, size = 64) {
return `url("${url.replace('{w}', size).replace('{h}', size)}")`;
},
searchTabClass(tab) {
if (tab == this.search.tab) {
return "active";
}
},
searchTypeClass(type) {
if (type == this.search.searchType) {
return "active";
}
},
getQueuePositionClass(position) {
if (this.player.queue["_position"] == position) {
return ["playing", "passed"]
} else if (this.player.queue["_position"] > position) {
return ["passed"]
}
},
showSearch(reset = false) {
if(reset) {
this.search.lastPage = "search"
}
switch(this.search.lastPage) {
case "search":
this.screen = "search"
break;
case "album":
this.screen = "album-page"
break;
case "artist":
this.screen = "artist-page"
break;
case "playlist":
this.screen = "playlist-page"
break;
}
},
showArtistByName(name) {
this.musicKitAPI("search", name, {types: "artists"})
},
showAlbum(id) {
this.search.lastPage = "album"
this.screen = "album-page"
this.musicKitAPI("album", id, {})
},
showArtist(id) {
this.search.lastPage = "artist"
this.screen = "artist-page"
this.musicKitAPI("artist", id, {include: "songs,playlists,albums"})
},
showQueue() {
this.queue.temp = this.player["queue"]["_queueItems"]
this.screen = "queue"
this.getQueue()
},
queueMove(evt) {
console.log(evt)
console.log(`new: ${evt.moved.newIndex} old: ${evt.moved.oldIndex}`)
this.queue.temp.splice(evt.moved.newIndex, 0, this.queue.temp.splice(evt.moved.oldIndex, 1)[0])
socket.send(JSON.stringify({
action: "queue-move",
from: evt.moved.oldIndex,
to: evt.moved.newIndex
}))
this.getQueue()
return true
},
repeat() {
socket.send(JSON.stringify({
action: "repeat"
}))
this.getCurrentMediaItem()
},
shuffle() {
socket.send(JSON.stringify({
action: "shuffle"
}))
this.getCurrentMediaItem()
},
setShuffle(val) {
socket.send(JSON.stringify({
action: "set-shuffle",
shuffle: val
}))
this.getCurrentMediaItem()
},
getMediaPalette(data) {
var palette = {
'--bgColor': `#${data['artwork']['bgColor']}`,
'--textColor1': `#${data['artwork']['textColor1']}`,
'--textColor2': `#${data['artwork']['textColor2']}`,
'--textColor3': `#${data['artwork']['textColor3']}`,
'--textColor4': `#${data['artwork']['textColor4']}`
}
return palette
},
playAlbum(id, shuffle = false) {
if(shuffle) {
this.setShuffle(true)
}else{
this.setShuffle(false)
}
this.playMediaItemById(id, 'album');
},
getLyrics() {
socket.send(JSON.stringify({
action: "get-lyrics",
}))
},
showLyrics() {
this.getLyrics()
this.screen = "lyrics"
},
showLyricsInline() {
this.getLyrics()
this.player.lowerPanelState = "lyrics"
},
parseLyrics() {
var xml = this.stringToXml(this.player.lyricsMediaItem.ttml)
var json = xmlToJson(xml);
this.player.lyrics = json
},
stringToXml(st) {
// string to xml
var xml = (new DOMParser()).parseFromString(st, "text/xml");
return xml;
},
canShowSearchTab(tab) {
if (tab == this.search.tab || this.search.tab == "all") {
return true;
} else {
return false;
}
},
getCurrentMediaItem() {
socket.send(JSON.stringify({
action: "get-currentmediaitem"
}))
},
setStreamerOverlay() {
document.body.classList.add("streamer-overlay")
},
setMode(mode) {
switch(mode) {
default:
this.screen = "player"
break;
case "miniplayer":
this.screen = "miniplayer"
break;
}
},
connect() {
let self = this;
this.connectedState = 0;
if (this.url === "") {
this.url = prompt("Host IP", "localhost")
}
socket = new WebSocket(`ws://${this.url}:26369`);
socket.onopen = (e) => {
console.log(e);
console.log('connected');
app.connectedState = 1;
if(getParameterByName("mode")) {
self.setMode(getParameterByName("mode"))
}else{
self.setMode("default")
}
self.clearSelectedTrack()
}
socket.onclose = (e) => {
console.log(e);
console.log('disconnected');
app.connectedState = 2;
}
socket.onerror = (e) => {
console.log(e);
console.log('error');
app.connectedState = 2;
}
socket.onmessage = (e) => {
const response = JSON.parse(e.data);
switch (response.type) {
default:
console.log(response);
break;
case "musickitapi.search":
self.showArtist(response.data["artists"][0]["id"]);
break;
case "musickitapi.album":
if(self.screen == "album-page") {
self.albumPage.data = response.data
}
break;
case "musickitapi.artist":
if(self.screen == "artist-page") {
self.artistPage.data = response.data
}
break;
case "queue":
self.player.queue = response.data;
self.queue.temp = response.data["_queueItems"];
self.$forceUpdate()
break;
case "lyrics":
self.player.lyrics = response.data;
self.$forceUpdate()
break;
case "searchResultsLibrary":
self.search.results = response.data;
self.search.state = 2;
break;
case "searchResults":
self.search.results = response.data;
self.search.state = 2;
break;
case "playbackStateUpdate":
if (!self.player.userInteraction) {
self.updatePlaybackState(response.data)
}
break;
}
// console.log(e.data);
}
},
updatePlaybackState(mediaitem) {
var lyricsDisplayed = this.screen == "lyrics" || this.player.lowerPanelState == "lyrics"
if (this.player.currentMediaItem["isrc"] != mediaitem["isrc"]) {
if (lyricsDisplayed) {
this.getLyrics()
}
if (this.screen == "queue") {
this.getQueue()
}
}
this.player.currentMediaItem = mediaitem
}
},
});
function getParameterByName(name, url) {
if (!url) url = window.location.href;
name = name.replace(/[\[\]]/g, '\\$&');
var regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)'),
results = regex.exec(url);
if (!results) return null;
if (!results[2]) return '';
return decodeURIComponent(results[2].replace(/\+/g, ' '));
}
function xmlToJson(xml) {
// Create the return object
var obj = {};
if (xml.nodeType == 1) { // element
// do attributes
if (xml.attributes.length > 0) {
obj["@attributes"] = {};
for (var j = 0; j < xml.attributes.length; j++) {
var attribute = xml.attributes.item(j);
obj["@attributes"][attribute.nodeName] = attribute.nodeValue;
}
}
} else if (xml.nodeType == 3) { // text
obj = xml.nodeValue;
}
// do children
if (xml.hasChildNodes()) {
for (var i = 0; i < xml.childNodes.length; i++) {
var item = xml.childNodes.item(i);
var nodeName = item.nodeName;
if (typeof (obj[nodeName]) == "undefined") {
obj[nodeName] = xmlToJson(item);
} else {
if (typeof (obj[nodeName].push) == "undefined") {
var old = obj[nodeName];
obj[nodeName] = [];
obj[nodeName].push(old);
}
obj[nodeName].push(xmlToJson(item));
}
}
}
return obj;
};
window.onresize = function () {
app.resetPlayerUI()
}
app.connect()

View file

@ -1,32 +0,0 @@
{
"theme_color": "#000000",
"background_color": "#000000",
"display": "standalone",
"scope": "/",
"start_url": "/",
"name": "AME Remote",
"short_name": "AME Remote",
"description": "Apple Music Electron Remote",
"icons": [
{
"src": "/icon-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/icon-256x256.png",
"sizes": "256x256",
"type": "image/png"
},
{
"src": "/icon-384x384.png",
"sizes": "384x384",
"type": "image/png"
},
{
"src": "/icon-512x512.png",
"sizes": "512x512",
"type": "image/png"
}
]
}

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long