generalize bottom left to be backgroundNotification
This commit is contained in:
parent
b663df272b
commit
55244b3092
2 changed files with 30 additions and 30 deletions
|
@ -171,7 +171,7 @@ const app = new Vue({
|
||||||
data: {},
|
data: {},
|
||||||
},
|
},
|
||||||
library: {
|
library: {
|
||||||
downloadNotification: {
|
backgroundNotification: {
|
||||||
show: false,
|
show: false,
|
||||||
message: "",
|
message: "",
|
||||||
total: 0,
|
total: 0,
|
||||||
|
@ -605,9 +605,9 @@ const app = new Vue({
|
||||||
|
|
||||||
// Load saved quality
|
// Load saved quality
|
||||||
switch (app.cfg.audio.quality) {
|
switch (app.cfg.audio.quality) {
|
||||||
case "extreme":
|
/** case "extreme":
|
||||||
app.mk.bitrate = app.cfg.audio.quality = 990
|
app.mk.bitrate = app.cfg.audio.quality = 990
|
||||||
break;
|
break; **/
|
||||||
case "high":
|
case "high":
|
||||||
app.mk.bitrate = app.cfg.audio.quality = 256
|
app.mk.bitrate = app.cfg.audio.quality = 256
|
||||||
break;
|
break;
|
||||||
|
@ -1736,8 +1736,8 @@ const app = new Vue({
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.library.songs.downloadState = 1
|
this.library.songs.downloadState = 1
|
||||||
this.library.downloadNotification.show = true
|
this.library.backgroundNotification.show = true
|
||||||
this.library.downloadNotification.message = app.getLz('notification.updatingLibrarySongs')
|
this.library.backgroundNotification.message = app.getLz('notification.updatingLibrarySongs')
|
||||||
|
|
||||||
function downloadChunk() {
|
function downloadChunk() {
|
||||||
const params = {
|
const params = {
|
||||||
|
@ -1769,10 +1769,10 @@ const app = new Vue({
|
||||||
function processChunk(response) {
|
function processChunk(response) {
|
||||||
downloaded = response
|
downloaded = response
|
||||||
library = library.concat(downloaded.data)
|
library = library.concat(downloaded.data)
|
||||||
self.library.downloadNotification.show = true
|
self.library.backgroundNotification.show = true
|
||||||
self.library.downloadNotification.message = app.getLz('notification.updatingLibrarySongs')
|
self.library.backgroundNotification.message = app.getLz('notification.updatingLibrarySongs')
|
||||||
self.library.downloadNotification.total = downloaded.meta.total
|
self.library.backgroundNotification.total = downloaded.meta.total
|
||||||
self.library.downloadNotification.progress = library.length
|
self.library.backgroundNotification.progress = library.length
|
||||||
|
|
||||||
if (downloaded.meta.total == 0) {
|
if (downloaded.meta.total == 0) {
|
||||||
self.library.songs.downloadState = 3
|
self.library.songs.downloadState = 3
|
||||||
|
@ -1782,7 +1782,7 @@ const app = new Vue({
|
||||||
console.log("downloaded.next is undefined")
|
console.log("downloaded.next is undefined")
|
||||||
self.library.songs.listing = library
|
self.library.songs.listing = library
|
||||||
self.library.songs.downloadState = 2
|
self.library.songs.downloadState = 2
|
||||||
self.library.downloadNotification.show = false
|
self.library.backgroundNotification.show = false
|
||||||
self.searchLibrarySongs()
|
self.searchLibrarySongs()
|
||||||
localStorage.setItem("librarySongs", JSON.stringify(library))
|
localStorage.setItem("librarySongs", JSON.stringify(library))
|
||||||
}
|
}
|
||||||
|
@ -1792,7 +1792,7 @@ const app = new Vue({
|
||||||
} else {
|
} else {
|
||||||
self.library.songs.listing = library
|
self.library.songs.listing = library
|
||||||
self.library.songs.downloadState = 2
|
self.library.songs.downloadState = 2
|
||||||
self.library.downloadNotification.show = false
|
self.library.backgroundNotification.show = false
|
||||||
self.searchLibrarySongs()
|
self.searchLibrarySongs()
|
||||||
localStorage.setItem("librarySongs", JSON.stringify(library))
|
localStorage.setItem("librarySongs", JSON.stringify(library))
|
||||||
console.log(library)
|
console.log(library)
|
||||||
|
@ -1817,8 +1817,8 @@ const app = new Vue({
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.library.albums.downloadState = 1
|
this.library.albums.downloadState = 1
|
||||||
this.library.downloadNotification.show = true
|
this.library.backgroundNotification.show = true
|
||||||
this.library.downloadNotification.message = app.getLz('notification.updatingLibraryAlbums')
|
this.library.backgroundNotification.message = app.getLz('notification.updatingLibraryAlbums')
|
||||||
|
|
||||||
function downloadChunk() {
|
function downloadChunk() {
|
||||||
self.library.albums.downloadState = 1
|
self.library.albums.downloadState = 1
|
||||||
|
@ -1849,10 +1849,10 @@ const app = new Vue({
|
||||||
function processChunk(response) {
|
function processChunk(response) {
|
||||||
downloaded = response
|
downloaded = response
|
||||||
library = library.concat(downloaded.data)
|
library = library.concat(downloaded.data)
|
||||||
self.library.downloadNotification.show = true
|
self.library.backgroundNotification.show = true
|
||||||
self.library.downloadNotification.message = app.getLz('notification.updatingLibraryAlbums')
|
self.library.backgroundNotification.message = app.getLz('notification.updatingLibraryAlbums')
|
||||||
self.library.downloadNotification.total = downloaded.meta.total
|
self.library.backgroundNotification.total = downloaded.meta.total
|
||||||
self.library.downloadNotification.progress = library.length
|
self.library.backgroundNotification.progress = library.length
|
||||||
if (downloaded.meta.total == 0) {
|
if (downloaded.meta.total == 0) {
|
||||||
self.library.albums.downloadState = 3
|
self.library.albums.downloadState = 3
|
||||||
return
|
return
|
||||||
|
@ -1861,7 +1861,7 @@ const app = new Vue({
|
||||||
console.log("downloaded.next is undefined")
|
console.log("downloaded.next is undefined")
|
||||||
self.library.albums.listing = library
|
self.library.albums.listing = library
|
||||||
self.library.albums.downloadState = 2
|
self.library.albums.downloadState = 2
|
||||||
self.library.downloadNotification.show = false
|
self.library.backgroundNotification.show = false
|
||||||
localStorage.setItem("libraryAlbums", JSON.stringify(library))
|
localStorage.setItem("libraryAlbums", JSON.stringify(library))
|
||||||
self.searchLibraryAlbums(index)
|
self.searchLibraryAlbums(index)
|
||||||
}
|
}
|
||||||
|
@ -1872,7 +1872,7 @@ const app = new Vue({
|
||||||
} else {
|
} else {
|
||||||
self.library.albums.listing = library
|
self.library.albums.listing = library
|
||||||
self.library.albums.downloadState = 2
|
self.library.albums.downloadState = 2
|
||||||
self.library.downloadNotification.show = false
|
self.library.backgroundNotification.show = false
|
||||||
localStorage.setItem("libraryAlbums", JSON.stringify(library))
|
localStorage.setItem("libraryAlbums", JSON.stringify(library))
|
||||||
self.searchLibraryAlbums(index)
|
self.searchLibraryAlbums(index)
|
||||||
console.log(library)
|
console.log(library)
|
||||||
|
@ -1897,8 +1897,8 @@ const app = new Vue({
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.library.artists.downloadState = 1
|
this.library.artists.downloadState = 1
|
||||||
this.library.downloadNotification.show = true
|
this.library.backgroundNotification.show = true
|
||||||
this.library.downloadNotification.message = app.getLz('notification.updatingLibraryArtists')
|
this.library.backgroundNotification.message = app.getLz('notification.updatingLibraryArtists')
|
||||||
|
|
||||||
function downloadChunk() {
|
function downloadChunk() {
|
||||||
self.library.artists.downloadState = 1
|
self.library.artists.downloadState = 1
|
||||||
|
@ -1932,10 +1932,10 @@ const app = new Vue({
|
||||||
function processChunk(response) {
|
function processChunk(response) {
|
||||||
downloaded = response
|
downloaded = response
|
||||||
library = library.concat(downloaded.data)
|
library = library.concat(downloaded.data)
|
||||||
self.library.downloadNotification.show = true
|
self.library.backgroundNotification.show = true
|
||||||
self.library.downloadNotification.message = app.getLz('notification.updatingLibraryArtists')
|
self.library.backgroundNotification.message = app.getLz('notification.updatingLibraryArtists')
|
||||||
self.library.downloadNotification.total = downloaded.meta.total
|
self.library.backgroundNotification.total = downloaded.meta.total
|
||||||
self.library.downloadNotification.progress = library.length
|
self.library.backgroundNotification.progress = library.length
|
||||||
if (downloaded.meta.total == 0) {
|
if (downloaded.meta.total == 0) {
|
||||||
self.library.albums.downloadState = 3
|
self.library.albums.downloadState = 3
|
||||||
return
|
return
|
||||||
|
@ -1955,7 +1955,7 @@ const app = new Vue({
|
||||||
} else {
|
} else {
|
||||||
self.library.artists.listing = library
|
self.library.artists.listing = library
|
||||||
self.library.artists.downloadState = 2
|
self.library.artists.downloadState = 2
|
||||||
self.library.downloadNotification.show = false
|
self.library.backgroundNotification.show = false
|
||||||
localStorage.setItem("libraryArtists", JSON.stringify(library))
|
localStorage.setItem("libraryArtists", JSON.stringify(library))
|
||||||
self.searchLibraryArtists(index)
|
self.searchLibraryArtists(index)
|
||||||
console.log(library)
|
console.log(library)
|
||||||
|
|
|
@ -359,10 +359,10 @@
|
||||||
</div>
|
</div>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="app-sidebar-notification libraryNotification"
|
<div class="app-sidebar-notification backgroundNotification"
|
||||||
v-if="library.downloadNotification.show">
|
v-if="library.backgroundNotification.show">
|
||||||
<div class="message">{{ library.downloadNotification.message }} ({{
|
<div class="message">{{ library.backgroundNotification.message }} ({{
|
||||||
library.downloadNotification.progress }} / {{ library.downloadNotification.total }})
|
library.backgroundNotification.progress }} / {{ library.backgroundNotification.total }})
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue