From d7261dbc86448f7cca66d000e7ebc047492062d5 Mon Sep 17 00:00:00 2001 From: vapormusic Date: Mon, 7 Mar 2022 00:09:43 +0700 Subject: [PATCH] fixes --- src/main/plugins/chromecast.ts | 2 +- src/renderer/style.less | 24 +++++++++++++++---- src/renderer/views/app/app-navigation.ejs | 5 ++-- .../views/components/animatedartwork-view.ejs | 24 ++++++++++++++++++- src/renderer/views/pages/cider-playlist.ejs | 2 +- 5 files changed, 48 insertions(+), 9 deletions(-) diff --git a/src/main/plugins/chromecast.ts b/src/main/plugins/chromecast.ts index 34e48c48..4bdb6113 100644 --- a/src/main/plugins/chromecast.ts +++ b/src/main/plugins/chromecast.ts @@ -41,7 +41,7 @@ export default class ChromecastPlugin { browser.on('ready', browser.discover); browser.on('update', (service :any) => { - if (service.addresses && service.fullname) { + if (service.addresses && service.fullname && service.fullname.includes('_googlecast._tcp')) { this.ondeviceup(service.addresses[0], service.fullname.substring(0, service.fullname.indexOf("._googlecast")) + " " + (service.type[0].description ?? ""), '', 'googlecast'); } }); diff --git a/src/renderer/style.less b/src/renderer/style.less index 75f5279e..ba1f00f6 100644 --- a/src/renderer/style.less +++ b/src/renderer/style.less @@ -1838,6 +1838,9 @@ input[type="range"].web-slider.display--small::-webkit-slider-thumb { -webkit-box-orient: vertical; } +.no-animation { + animation: unset !important; +} .fullscreen-view-container { position: absolute; @@ -1877,6 +1880,10 @@ input[type="range"].web-slider.display--small::-webkit-slider-thumb { height: 50vh; } + .bg-artwork-container { + display: block !important; + } + @media only screen and (max-width: 1121px) { .display--large { display: flex !important; @@ -1979,13 +1986,10 @@ input[type="range"].web-slider.display--small::-webkit-slider-thumb { filter: brightness(85%) saturate(95%) blur(180px) contrast(0.9) opacity(0.9); } - .no-animation { - animation: unset; - } + } } - .lyrics-col { height: 62vh; @@ -2662,6 +2666,10 @@ input[type="range"].web-slider.display--small::-webkit-slider-thumb { width: 200VH; height: 200VH; } + + .bg-artwork-container{ + display: block !important; + } } .lyric-body { @@ -2964,6 +2972,10 @@ body.no-gpu { .bg-artwork-container { display: none; + animation: none !important; + .bg-artwork{ + animation: none !important; + } } #navigation-bar { @@ -3004,6 +3016,10 @@ body.no-gpu { .drawertransition-leave-to { right: -300px; } + + .lyric-line:hover::after { + display: none; + } } .qrimg { diff --git a/src/renderer/views/app/app-navigation.ejs b/src/renderer/views/app/app-navigation.ejs index b7d7f654..58833a1c 100644 --- a/src/renderer/views/app/app-navigation.ejs +++ b/src/renderer/views/app/app-navigation.ejs @@ -6,8 +6,9 @@ v-if="drawer.open && drawer.panel == 'lyrics' && lyrics && lyrics != [] && lyrics.length > 0">
- - + + +
{ + let levelsnum = u.levels.map((level)=>{return level.width}) + if (levelsnum.length > 0) { + let qualities = [] + let qualities2 = [] + for (let i = 0; i < levelsnum.length; i++) { + if (qualities2.indexOf(levelsnum[i]) == -1) { + qualities.push({level: i, quality: levelsnum[i]}) + qualities2.push(levelsnum[i]) + } + } + let actualnum = Math.floor(qualities[qualities.length -1 ].level * (quality / 4)) + if (quality != 0 ){ + quality = qualities[Math.min(actualnum,qualities.length -1 )].level + } + if (quality == 4 ){ + quality = qualities[qualities.length - 1].level + } + } + + this.hls.loadLevel = parseInt( quality || 1);},200) } }) } diff --git a/src/renderer/views/pages/cider-playlist.ejs b/src/renderer/views/pages/cider-playlist.ejs index 32a919d8..c49d03f4 100644 --- a/src/renderer/views/pages/cider-playlist.ejs +++ b/src/renderer/views/pages/cider-playlist.ejs @@ -21,7 +21,7 @@ :video-priority="true" :url="(data.attributes != null && data.attributes.artwork != null) ? data.attributes.artwork.url : ((data.relationships != null && data.relationships.tracks.data.length > 0 && data.relationships.tracks.data[0].attributes != null) ? ((data.relationships.tracks.data[0].attributes.artwork != null)? data.relationships.tracks.data[0].attributes.artwork.url : ''):'')" :video="(data.attributes != null && data.attributes.editorialVideo != null) ? (data.attributes.editorialVideo.motionDetailSquare ? data.attributes.editorialVideo.motionDetailSquare.video : (data.attributes.editorialVideo.motionSquareVideo1x1 ? data.attributes.editorialVideo.motionSquareVideo1x1.video : '')) : '' " - size="260" + size="500" >