mirror of
https://github.com/owntone/owntone-server.git
synced 2025-03-31 17:53:49 -04:00
[web-src] Update to Vue CLI 4 and fix linter issues
This commit is contained in:
parent
72f93eb97f
commit
52d37b883c
@ -3,7 +3,7 @@ module.exports = {
|
|||||||
env: {
|
env: {
|
||||||
node: true
|
node: true
|
||||||
},
|
},
|
||||||
'extends': [
|
extends: [
|
||||||
'plugin:vue/essential',
|
'plugin:vue/essential',
|
||||||
'@vue/standard'
|
'@vue/standard'
|
||||||
],
|
],
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
presets: [
|
presets: [
|
||||||
'@vue/app'
|
'@vue/cli-plugin-babel/preset'
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
6324
web-src/package-lock.json
generated
6324
web-src/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -1,19 +1,19 @@
|
|||||||
{
|
{
|
||||||
"name": "forked-daapd-web",
|
"name": "forked-daapd-web",
|
||||||
"version": "0.7.0",
|
"version": "0.7.0",
|
||||||
|
"private": true,
|
||||||
"description": "forked-daapd web interface",
|
"description": "forked-daapd web interface",
|
||||||
"author": "chme <christian.meffert@googlemail.com>",
|
"author": "chme <christian.meffert@googlemail.com>",
|
||||||
"license": "GPL-2.0",
|
|
||||||
"private": true,
|
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"serve": "vue-cli-service serve",
|
"serve": "vue-cli-service serve",
|
||||||
"dev": "vue-cli-service serve",
|
|
||||||
"build": "vue-cli-service build --no-clean",
|
"build": "vue-cli-service build --no-clean",
|
||||||
"lint": "vue-cli-service lint"
|
"lint": "vue-cli-service lint",
|
||||||
|
"dev": "vue-cli-service serve"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"axios": "^0.19.2",
|
"axios": "^0.19.2",
|
||||||
"bulma": "^0.8.2",
|
"bulma": "^0.8.2",
|
||||||
|
"core-js": "^3.6.4",
|
||||||
"mdi": "^2.2.43",
|
"mdi": "^2.2.43",
|
||||||
"moment": "^2.24.0",
|
"moment": "^2.24.0",
|
||||||
"moment-duration-format": "^2.3.2",
|
"moment-duration-format": "^2.3.2",
|
||||||
@ -30,10 +30,18 @@
|
|||||||
"vuex": "^3.1.3"
|
"vuex": "^3.1.3"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@vue/cli-plugin-babel": "^3.12.1",
|
"@vue/cli-plugin-babel": "^4.3.1",
|
||||||
"@vue/cli-plugin-eslint": "^3.12.1",
|
"@vue/cli-plugin-eslint": "^4.3.1",
|
||||||
"@vue/cli-service": "^3.12.1",
|
"@vue/cli-service": "^4.3.1",
|
||||||
"@vue/eslint-config-standard": "^4.0.0",
|
"@vue/eslint-config-standard": "^5.1.2",
|
||||||
|
"babel-eslint": "^10.1.0",
|
||||||
|
"eslint": "^6.7.2",
|
||||||
|
"eslint-plugin-import": "^2.20.2",
|
||||||
|
"eslint-plugin-node": "^11.1.0",
|
||||||
|
"eslint-plugin-promise": "^4.2.1",
|
||||||
|
"eslint-plugin-standard": "^4.0.1",
|
||||||
|
"eslint-plugin-vue": "^6.2.2",
|
||||||
"vue-template-compiler": "^2.6.11"
|
"vue-template-compiler": "^2.6.11"
|
||||||
}
|
},
|
||||||
|
"license": "GPL-2.0"
|
||||||
}
|
}
|
||||||
|
@ -50,7 +50,7 @@ export default {
|
|||||||
this.$router.beforeEach((to, from, next) => {
|
this.$router.beforeEach((to, from, next) => {
|
||||||
if (to.meta.show_progress) {
|
if (to.meta.show_progress) {
|
||||||
if (to.meta.progress !== undefined) {
|
if (to.meta.progress !== undefined) {
|
||||||
let meta = to.meta.progress
|
const meta = to.meta.progress
|
||||||
this.$Progress.parseMeta(meta)
|
this.$Progress.parseMeta(meta)
|
||||||
}
|
}
|
||||||
this.$Progress.start()
|
this.$Progress.start()
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: 'ListItemDirectory',
|
name: 'ListItemDirectory',
|
||||||
props: [ 'directory' ]
|
props: ['directory']
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: 'ListItemGenre',
|
name: 'ListItemGenre',
|
||||||
props: [ 'genre' ]
|
props: ['genre']
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ export default {
|
|||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
play: function () {
|
play: function () {
|
||||||
webapi.player_play({ 'item_id': this.item.id })
|
webapi.player_play({ item_id: this.item.id })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: 'ModalDialog',
|
name: 'ModalDialog',
|
||||||
props: [ 'show' ]
|
props: ['show']
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@ import webapi from '@/webapi'
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ModalDialogAddRss',
|
name: 'ModalDialogAddRss',
|
||||||
props: [ 'show' ],
|
props: ['show'],
|
||||||
|
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
|
@ -49,7 +49,7 @@ import webapi from '@/webapi'
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ModalDialogAddUrlStream',
|
name: 'ModalDialogAddUrlStream',
|
||||||
props: [ 'show' ],
|
props: ['show'],
|
||||||
|
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
|
@ -51,7 +51,7 @@ import webapi from '@/webapi'
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ModalDialogAlbum',
|
name: 'ModalDialogAlbum',
|
||||||
props: [ 'show', 'album', 'media_kind' ],
|
props: ['show', 'album', 'media_kind'],
|
||||||
|
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
|
@ -44,7 +44,7 @@ import webapi from '@/webapi'
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ModalDialogArtist',
|
name: 'ModalDialogArtist',
|
||||||
props: [ 'show', 'artist' ],
|
props: ['show', 'artist'],
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
play: function () {
|
play: function () {
|
||||||
|
@ -34,7 +34,7 @@ import webapi from '@/webapi'
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ModalDialogDirectory',
|
name: 'ModalDialogDirectory',
|
||||||
props: [ 'show', 'directory' ],
|
props: ['show', 'directory'],
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
play: function () {
|
play: function () {
|
||||||
|
@ -34,7 +34,7 @@ import webapi from '@/webapi'
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ModalDialogGenre',
|
name: 'ModalDialogGenre',
|
||||||
props: [ 'show', 'genre' ],
|
props: ['show', 'genre'],
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
play: function () {
|
play: function () {
|
||||||
|
@ -44,7 +44,7 @@ import webapi from '@/webapi'
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ModalDialogPlaylist',
|
name: 'ModalDialogPlaylist',
|
||||||
props: [ 'show', 'playlist' ],
|
props: ['show', 'playlist'],
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
play: function () {
|
play: function () {
|
||||||
|
@ -46,7 +46,7 @@ import webapi from '@/webapi'
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ModalDialogPlaylistSave',
|
name: 'ModalDialogPlaylistSave',
|
||||||
props: [ 'show' ],
|
props: ['show'],
|
||||||
|
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
|
@ -79,7 +79,7 @@ import SpotifyWebApi from 'spotify-web-api-js'
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ModalDialogQueueItem',
|
name: 'ModalDialogQueueItem',
|
||||||
props: [ 'show', 'item' ],
|
props: ['show', 'item'],
|
||||||
|
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
@ -95,7 +95,7 @@ export default {
|
|||||||
|
|
||||||
play: function () {
|
play: function () {
|
||||||
this.$emit('close')
|
this.$emit('close')
|
||||||
webapi.player_play({ 'item_id': this.item.id })
|
webapi.player_play({ item_id: this.item.id })
|
||||||
},
|
},
|
||||||
|
|
||||||
open_album: function () {
|
open_album: function () {
|
||||||
|
@ -41,7 +41,7 @@ import webapi from '@/webapi'
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ModalDialogRemotePairing',
|
name: 'ModalDialogRemotePairing',
|
||||||
props: [ 'show' ],
|
props: ['show'],
|
||||||
|
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
|
@ -152,14 +152,14 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
mark_new: function () {
|
mark_new: function () {
|
||||||
webapi.library_track_update(this.track.id, { 'play_count': 'reset' }).then(() => {
|
webapi.library_track_update(this.track.id, { play_count: 'reset' }).then(() => {
|
||||||
this.$emit('play_count_changed')
|
this.$emit('play_count_changed')
|
||||||
this.$emit('close')
|
this.$emit('close')
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
mark_played: function () {
|
mark_played: function () {
|
||||||
webapi.library_track_update(this.track.id, { 'play_count': 'increment' }).then(() => {
|
webapi.library_track_update(this.track.id, { play_count: 'increment' }).then(() => {
|
||||||
this.$emit('play_count_changed')
|
this.$emit('play_count_changed')
|
||||||
this.$emit('close')
|
this.$emit('close')
|
||||||
})
|
})
|
||||||
|
@ -9,7 +9,7 @@ import * as types from '@/store/mutation_types'
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'NavbarItemLink',
|
name: 'NavbarItemLink',
|
||||||
props: [ 'to' ],
|
props: ['to'],
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
is_active () {
|
is_active () {
|
||||||
|
@ -32,7 +32,7 @@ export default {
|
|||||||
name: 'NavbarItemOutput',
|
name: 'NavbarItemOutput',
|
||||||
components: { RangeSlider },
|
components: { RangeSlider },
|
||||||
|
|
||||||
props: [ 'output' ],
|
props: ['output'],
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
type_class () {
|
type_class () {
|
||||||
@ -61,7 +61,7 @@ export default {
|
|||||||
|
|
||||||
set_enabled: function () {
|
set_enabled: function () {
|
||||||
const values = {
|
const values = {
|
||||||
'selected': !this.output.selected
|
selected: !this.output.selected
|
||||||
}
|
}
|
||||||
webapi.output_update(this.output.id, values)
|
webapi.output_update(this.output.id, values)
|
||||||
}
|
}
|
||||||
|
@ -11,8 +11,8 @@ export default {
|
|||||||
name: 'PlayerButtonPlayPause',
|
name: 'PlayerButtonPlayPause',
|
||||||
|
|
||||||
props: {
|
props: {
|
||||||
'icon_style': String,
|
icon_style: String,
|
||||||
'show_disabled_message': Boolean
|
show_disabled_message: Boolean
|
||||||
},
|
},
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
|
@ -51,7 +51,7 @@ import webapi from '@/webapi'
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'SpotifyModalDialogAlbum',
|
name: 'SpotifyModalDialogAlbum',
|
||||||
props: [ 'show', 'album' ],
|
props: ['show', 'album'],
|
||||||
|
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
|
@ -44,7 +44,7 @@ import webapi from '@/webapi'
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'SpotifyModalDialogArtist',
|
name: 'SpotifyModalDialogArtist',
|
||||||
props: [ 'show', 'artist' ],
|
props: ['show', 'artist'],
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
play: function () {
|
play: function () {
|
||||||
|
@ -48,7 +48,7 @@ import webapi from '@/webapi'
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'SpotifyModalDialogPlaylist',
|
name: 'SpotifyModalDialogPlaylist',
|
||||||
props: [ 'show', 'playlist' ],
|
props: ['show', 'playlist'],
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
play: function () {
|
play: function () {
|
||||||
|
@ -63,7 +63,7 @@ import webapi from '@/webapi'
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'SpotifyModalDialogTrack',
|
name: 'SpotifyModalDialogTrack',
|
||||||
props: [ 'show', 'track', 'album' ],
|
props: ['show', 'track', 'album'],
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
play: function () {
|
play: function () {
|
||||||
|
@ -53,7 +53,7 @@ const albumData = {
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'PageAlbum',
|
name: 'PageAlbum',
|
||||||
mixins: [ LoadDataBeforeEnterMixin(albumData) ],
|
mixins: [LoadDataBeforeEnterMixin(albumData)],
|
||||||
components: { ContentWithHeading, ListItemTrack, ModalDialogTrack, ModalDialogAlbum },
|
components: { ContentWithHeading, ListItemTrack, ModalDialogTrack, ModalDialogAlbum },
|
||||||
|
|
||||||
data () {
|
data () {
|
||||||
|
@ -19,11 +19,10 @@
|
|||||||
</a>
|
</a>
|
||||||
</template>
|
</template>
|
||||||
<template slot="content">
|
<template slot="content">
|
||||||
<list-item-album v-for="album in albums.items"
|
<list-item-album v-for="album in albums_filtered"
|
||||||
:key="album.id"
|
:key="album.id"
|
||||||
:album="album"
|
:album="album"
|
||||||
@click="open_album(album)"
|
@click="open_album(album)">
|
||||||
v-if="!hide_singles || album.track_count > 2">
|
|
||||||
<template slot="actions">
|
<template slot="actions">
|
||||||
<a @click="open_dialog(album)">
|
<a @click="open_dialog(album)">
|
||||||
<span class="icon has-text-dark"><i class="mdi mdi-dots-vertical mdi-18px"></i></span>
|
<span class="icon has-text-dark"><i class="mdi mdi-dots-vertical mdi-18px"></i></span>
|
||||||
@ -61,7 +60,7 @@ const albumsData = {
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'PageAlbums',
|
name: 'PageAlbums',
|
||||||
mixins: [ LoadDataBeforeEnterMixin(albumsData) ],
|
mixins: [LoadDataBeforeEnterMixin(albumsData)],
|
||||||
components: { ContentWithHeading, TabsMusic, IndexButtonList, ListItemAlbum, ModalDialogAlbum },
|
components: { ContentWithHeading, TabsMusic, IndexButtonList, ListItemAlbum, ModalDialogAlbum },
|
||||||
|
|
||||||
data () {
|
data () {
|
||||||
@ -77,6 +76,10 @@ export default {
|
|||||||
computed: {
|
computed: {
|
||||||
hide_singles () {
|
hide_singles () {
|
||||||
return this.$store.state.hide_singles
|
return this.$store.state.hide_singles
|
||||||
|
},
|
||||||
|
|
||||||
|
albums_filtered () {
|
||||||
|
return this.albums.items.filter(album => !this.hide_singles || album.track_count > 2)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -52,7 +52,7 @@ const artistData = {
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'PageArtist',
|
name: 'PageArtist',
|
||||||
mixins: [ LoadDataBeforeEnterMixin(artistData) ],
|
mixins: [LoadDataBeforeEnterMixin(artistData)],
|
||||||
components: { ContentWithHeading, ListItemAlbum, ModalDialogAlbum, ModalDialogArtist },
|
components: { ContentWithHeading, ListItemAlbum, ModalDialogAlbum, ModalDialogArtist },
|
||||||
|
|
||||||
data () {
|
data () {
|
||||||
|
@ -58,7 +58,7 @@ const tracksData = {
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'PageArtistTracks',
|
name: 'PageArtistTracks',
|
||||||
mixins: [ LoadDataBeforeEnterMixin(tracksData) ],
|
mixins: [LoadDataBeforeEnterMixin(tracksData)],
|
||||||
components: { ContentWithHeading, ListItemTrack, IndexButtonList, ModalDialogTrack, ModalDialogArtist },
|
components: { ContentWithHeading, ListItemTrack, IndexButtonList, ModalDialogTrack, ModalDialogArtist },
|
||||||
|
|
||||||
data () {
|
data () {
|
||||||
|
@ -19,11 +19,10 @@
|
|||||||
</a>
|
</a>
|
||||||
</template>
|
</template>
|
||||||
<template slot="content">
|
<template slot="content">
|
||||||
<list-item-artist v-for="artist in artists.items"
|
<list-item-artist v-for="artist in artists_filtered"
|
||||||
:key="artist.id"
|
:key="artist.id"
|
||||||
:artist="artist"
|
:artist="artist"
|
||||||
@click="open_artist(artist)"
|
@click="open_artist(artist)">
|
||||||
v-if="!hide_singles || artist.track_count > (artist.album_count * 2)">
|
|
||||||
<template slot="actions">
|
<template slot="actions">
|
||||||
<a @click="open_dialog(artist)">
|
<a @click="open_dialog(artist)">
|
||||||
<span class="icon has-text-dark"><i class="mdi mdi-dots-vertical mdi-18px"></i></span>
|
<span class="icon has-text-dark"><i class="mdi mdi-dots-vertical mdi-18px"></i></span>
|
||||||
@ -58,7 +57,7 @@ const artistsData = {
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'PageArtists',
|
name: 'PageArtists',
|
||||||
mixins: [ LoadDataBeforeEnterMixin(artistsData) ],
|
mixins: [LoadDataBeforeEnterMixin(artistsData)],
|
||||||
components: { ContentWithHeading, TabsMusic, IndexButtonList, ListItemArtist, ModalDialogArtist },
|
components: { ContentWithHeading, TabsMusic, IndexButtonList, ListItemArtist, ModalDialogArtist },
|
||||||
|
|
||||||
data () {
|
data () {
|
||||||
@ -79,6 +78,10 @@ export default {
|
|||||||
return [...new Set(this.artists.items
|
return [...new Set(this.artists.items
|
||||||
.filter(artist => !this.$store.state.hide_singles || artist.track_count > (artist.album_count * 2))
|
.filter(artist => !this.$store.state.hide_singles || artist.track_count > (artist.album_count * 2))
|
||||||
.map(artist => artist.name_sort.charAt(0).toUpperCase()))]
|
.map(artist => artist.name_sort.charAt(0).toUpperCase()))]
|
||||||
|
},
|
||||||
|
|
||||||
|
artists_filtered () {
|
||||||
|
return this.artists.items.filter(artist => !this.hide_singles || artist.track_count > (artist.album_count * 2))
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -56,7 +56,7 @@ const albumData = {
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'PageAudiobook',
|
name: 'PageAudiobook',
|
||||||
mixins: [ LoadDataBeforeEnterMixin(albumData) ],
|
mixins: [LoadDataBeforeEnterMixin(albumData)],
|
||||||
components: { ContentWithHeading, ListItemTrack, ModalDialogTrack, ModalDialogAlbum },
|
components: { ContentWithHeading, ListItemTrack, ModalDialogTrack, ModalDialogAlbum },
|
||||||
|
|
||||||
data () {
|
data () {
|
||||||
|
@ -38,7 +38,7 @@ const albumsData = {
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'PageAudiobooks',
|
name: 'PageAudiobooks',
|
||||||
mixins: [ LoadDataBeforeEnterMixin(albumsData) ],
|
mixins: [LoadDataBeforeEnterMixin(albumsData)],
|
||||||
components: { ContentWithHeading, ListItemAlbum, ModalDialogAlbum },
|
components: { ContentWithHeading, ListItemAlbum, ModalDialogAlbum },
|
||||||
|
|
||||||
data () {
|
data () {
|
||||||
|
@ -80,7 +80,7 @@ const browseData = {
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'PageBrowse',
|
name: 'PageBrowse',
|
||||||
mixins: [ LoadDataBeforeEnterMixin(browseData) ],
|
mixins: [LoadDataBeforeEnterMixin(browseData)],
|
||||||
components: { ContentWithHeading, TabsMusic, ListItemAlbum, ListItemTrack, ModalDialogTrack, ModalDialogAlbum },
|
components: { ContentWithHeading, TabsMusic, ListItemAlbum, ListItemTrack, ModalDialogTrack, ModalDialogAlbum },
|
||||||
|
|
||||||
data () {
|
data () {
|
||||||
|
@ -45,7 +45,7 @@ const browseData = {
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'PageBrowseType',
|
name: 'PageBrowseType',
|
||||||
mixins: [ LoadDataBeforeEnterMixin(browseData) ],
|
mixins: [LoadDataBeforeEnterMixin(browseData)],
|
||||||
components: { ContentWithHeading, TabsMusic, ListItemAlbum, ModalDialogAlbum },
|
components: { ContentWithHeading, TabsMusic, ListItemAlbum, ModalDialogAlbum },
|
||||||
|
|
||||||
data () {
|
data () {
|
||||||
|
@ -45,7 +45,7 @@ const browseData = {
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'PageBrowseType',
|
name: 'PageBrowseType',
|
||||||
mixins: [ LoadDataBeforeEnterMixin(browseData) ],
|
mixins: [LoadDataBeforeEnterMixin(browseData)],
|
||||||
components: { ContentWithHeading, TabsMusic, ListItemTrack, ModalDialogTrack },
|
components: { ContentWithHeading, TabsMusic, ListItemTrack, ModalDialogTrack },
|
||||||
|
|
||||||
data () {
|
data () {
|
||||||
|
@ -106,7 +106,7 @@ const filesData = {
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'PageFiles',
|
name: 'PageFiles',
|
||||||
mixins: [ LoadDataBeforeEnterMixin(filesData) ],
|
mixins: [LoadDataBeforeEnterMixin(filesData)],
|
||||||
components: { ContentWithHeading, ListItemDirectory, ListItemPlaylist, ListItemTrack, ModalDialogDirectory, ModalDialogPlaylist, ModalDialogTrack },
|
components: { ContentWithHeading, ListItemDirectory, ListItemPlaylist, ListItemTrack, ModalDialogDirectory, ModalDialogPlaylist, ModalDialogTrack },
|
||||||
|
|
||||||
data () {
|
data () {
|
||||||
|
@ -36,7 +36,6 @@
|
|||||||
<script>
|
<script>
|
||||||
import { LoadDataBeforeEnterMixin } from './mixin'
|
import { LoadDataBeforeEnterMixin } from './mixin'
|
||||||
import ContentWithHeading from '@/templates/ContentWithHeading'
|
import ContentWithHeading from '@/templates/ContentWithHeading'
|
||||||
import TabsMusic from '@/components/TabsMusic'
|
|
||||||
import IndexButtonList from '@/components/IndexButtonList'
|
import IndexButtonList from '@/components/IndexButtonList'
|
||||||
import ListItemAlbums from '@/components/ListItemAlbum'
|
import ListItemAlbums from '@/components/ListItemAlbum'
|
||||||
import ModalDialogAlbum from '@/components/ModalDialogAlbum'
|
import ModalDialogAlbum from '@/components/ModalDialogAlbum'
|
||||||
@ -56,8 +55,8 @@ const genreData = {
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'PageGenre',
|
name: 'PageGenre',
|
||||||
mixins: [ LoadDataBeforeEnterMixin(genreData) ],
|
mixins: [LoadDataBeforeEnterMixin(genreData)],
|
||||||
components: { ContentWithHeading, TabsMusic, IndexButtonList, ListItemAlbums, ModalDialogAlbum, ModalDialogGenre },
|
components: { ContentWithHeading, IndexButtonList, ListItemAlbums, ModalDialogAlbum, ModalDialogGenre },
|
||||||
|
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
|
@ -55,7 +55,7 @@ const tracksData = {
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'PageGenreTracks',
|
name: 'PageGenreTracks',
|
||||||
mixins: [ LoadDataBeforeEnterMixin(tracksData) ],
|
mixins: [LoadDataBeforeEnterMixin(tracksData)],
|
||||||
components: { ContentWithHeading, ListItemTrack, IndexButtonList, ModalDialogTrack, ModalDialogGenre },
|
components: { ContentWithHeading, ListItemTrack, IndexButtonList, ModalDialogTrack, ModalDialogGenre },
|
||||||
|
|
||||||
data () {
|
data () {
|
||||||
|
@ -45,7 +45,7 @@ const genresData = {
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'PageGenres',
|
name: 'PageGenres',
|
||||||
mixins: [ LoadDataBeforeEnterMixin(genresData) ],
|
mixins: [LoadDataBeforeEnterMixin(genresData)],
|
||||||
components: { ContentWithHeading, TabsMusic, IndexButtonList, ListItemGenre, ModalDialogGenre },
|
components: { ContentWithHeading, TabsMusic, IndexButtonList, ListItemGenre, ModalDialogGenre },
|
||||||
|
|
||||||
data () {
|
data () {
|
||||||
|
@ -52,7 +52,7 @@ const playlistData = {
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'PagePlaylist',
|
name: 'PagePlaylist',
|
||||||
mixins: [ LoadDataBeforeEnterMixin(playlistData) ],
|
mixins: [LoadDataBeforeEnterMixin(playlistData)],
|
||||||
components: { ContentWithHeading, ListItemTrack, ModalDialogTrack, ModalDialogPlaylist },
|
components: { ContentWithHeading, ListItemTrack, ModalDialogTrack, ModalDialogPlaylist },
|
||||||
|
|
||||||
data () {
|
data () {
|
||||||
|
@ -25,7 +25,6 @@
|
|||||||
<script>
|
<script>
|
||||||
import { LoadDataBeforeEnterMixin } from './mixin'
|
import { LoadDataBeforeEnterMixin } from './mixin'
|
||||||
import ContentWithHeading from '@/templates/ContentWithHeading'
|
import ContentWithHeading from '@/templates/ContentWithHeading'
|
||||||
import TabsMusic from '@/components/TabsMusic'
|
|
||||||
import ListItemPlaylist from '@/components/ListItemPlaylist'
|
import ListItemPlaylist from '@/components/ListItemPlaylist'
|
||||||
import ModalDialogPlaylist from '@/components/ModalDialogPlaylist'
|
import ModalDialogPlaylist from '@/components/ModalDialogPlaylist'
|
||||||
import webapi from '@/webapi'
|
import webapi from '@/webapi'
|
||||||
@ -46,8 +45,8 @@ const playlistsData = {
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'PagePlaylists',
|
name: 'PagePlaylists',
|
||||||
mixins: [ LoadDataBeforeEnterMixin(playlistsData) ],
|
mixins: [LoadDataBeforeEnterMixin(playlistsData)],
|
||||||
components: { ContentWithHeading, TabsMusic, ListItemPlaylist, ModalDialogPlaylist },
|
components: { ContentWithHeading, ListItemPlaylist, ModalDialogPlaylist },
|
||||||
|
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
|
@ -80,7 +80,7 @@ const albumData = {
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'PagePodcast',
|
name: 'PagePodcast',
|
||||||
mixins: [ LoadDataBeforeEnterMixin(albumData) ],
|
mixins: [LoadDataBeforeEnterMixin(albumData)],
|
||||||
components: { ContentWithHeading, ListItemTrack, ModalDialogTrack, RangeSlider, ModalDialogAlbum },
|
components: { ContentWithHeading, ListItemTrack, ModalDialogTrack, RangeSlider, ModalDialogAlbum },
|
||||||
|
|
||||||
data () {
|
data () {
|
||||||
@ -106,7 +106,7 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
mark_all_played: function () {
|
mark_all_played: function () {
|
||||||
webapi.library_album_track_update(this.album.id, { 'play_count': 'played' }).then(({ data }) => (
|
webapi.library_album_track_update(this.album.id, { play_count: 'played' }).then(({ data }) => (
|
||||||
this.tracks.forEach(track => {
|
this.tracks.forEach(track => {
|
||||||
if (track.play_count === 0) {
|
if (track.play_count === 0) {
|
||||||
track.play_count = 1
|
track.play_count = 1
|
||||||
|
@ -93,7 +93,7 @@ const albumsData = {
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'PagePodcasts',
|
name: 'PagePodcasts',
|
||||||
mixins: [ LoadDataBeforeEnterMixin(albumsData) ],
|
mixins: [LoadDataBeforeEnterMixin(albumsData)],
|
||||||
components: { ContentWithHeading, ListItemTrack, ListItemAlbum, ModalDialogTrack, ModalDialogAlbum, ModalDialogAddRss, RangeSlider },
|
components: { ContentWithHeading, ListItemTrack, ListItemAlbum, ModalDialogTrack, ModalDialogAlbum, ModalDialogAddRss, RangeSlider },
|
||||||
|
|
||||||
data () {
|
data () {
|
||||||
@ -132,7 +132,7 @@ export default {
|
|||||||
|
|
||||||
mark_all_played: function () {
|
mark_all_played: function () {
|
||||||
this.new_episodes.items.forEach(ep => {
|
this.new_episodes.items.forEach(ep => {
|
||||||
webapi.library_track_update(ep.id, { 'play_count': 'increment' })
|
webapi.library_track_update(ep.id, { play_count: 'increment' })
|
||||||
})
|
})
|
||||||
this.new_episodes.items = { }
|
this.new_episodes.items = { }
|
||||||
},
|
},
|
||||||
|
@ -217,10 +217,10 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var searchParams = {
|
var searchParams = {
|
||||||
'type': route.query.type,
|
type: route.query.type,
|
||||||
'query': this.smart_query ? undefined : route.query.query,
|
query: this.smart_query ? undefined : route.query.query,
|
||||||
'expression': this.smart_query ? route.query.query : undefined,
|
expression: this.smart_query ? route.query.query : undefined,
|
||||||
'media_kind': 'music'
|
media_kind: 'music'
|
||||||
}
|
}
|
||||||
|
|
||||||
if (route.query.limit) {
|
if (route.query.limit) {
|
||||||
@ -243,7 +243,8 @@ export default {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
this.$router.push({ path: '/search/library',
|
this.$router.push({
|
||||||
|
path: '/search/library',
|
||||||
query: {
|
query: {
|
||||||
type: 'track,artist,album,playlist',
|
type: 'track,artist,album,playlist',
|
||||||
query: this.search_query,
|
query: this.search_query,
|
||||||
@ -255,7 +256,8 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
open_search_tracks: function () {
|
open_search_tracks: function () {
|
||||||
this.$router.push({ path: '/search/library',
|
this.$router.push({
|
||||||
|
path: '/search/library',
|
||||||
query: {
|
query: {
|
||||||
type: 'track',
|
type: 'track',
|
||||||
query: this.$route.query.query
|
query: this.$route.query.query
|
||||||
@ -264,7 +266,8 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
open_search_artists: function () {
|
open_search_artists: function () {
|
||||||
this.$router.push({ path: '/search/library',
|
this.$router.push({
|
||||||
|
path: '/search/library',
|
||||||
query: {
|
query: {
|
||||||
type: 'artist',
|
type: 'artist',
|
||||||
query: this.$route.query.query
|
query: this.$route.query.query
|
||||||
@ -273,7 +276,8 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
open_search_albums: function () {
|
open_search_albums: function () {
|
||||||
this.$router.push({ path: '/search/library',
|
this.$router.push({
|
||||||
|
path: '/search/library',
|
||||||
query: {
|
query: {
|
||||||
type: 'album',
|
type: 'album',
|
||||||
query: this.$route.query.query
|
query: this.$route.query.query
|
||||||
@ -282,7 +286,8 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
open_search_playlists: function () {
|
open_search_playlists: function () {
|
||||||
this.$router.push({ path: '/search/library',
|
this.$router.push({
|
||||||
|
path: '/search/library',
|
||||||
query: {
|
query: {
|
||||||
type: 'playlist',
|
type: 'playlist',
|
||||||
query: this.$route.query.query
|
query: this.$route.query.query
|
||||||
|
@ -53,7 +53,7 @@ const albumData = {
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'PageAlbum',
|
name: 'PageAlbum',
|
||||||
mixins: [ LoadDataBeforeEnterMixin(albumData) ],
|
mixins: [LoadDataBeforeEnterMixin(albumData)],
|
||||||
components: { ContentWithHeading, SpotifyListItemTrack, SpotifyModalDialogTrack, SpotifyModalDialogAlbum },
|
components: { ContentWithHeading, SpotifyListItemTrack, SpotifyModalDialogTrack, SpotifyModalDialogAlbum },
|
||||||
|
|
||||||
data () {
|
data () {
|
||||||
|
@ -62,7 +62,7 @@ const artistData = {
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'SpotifyPageArtist',
|
name: 'SpotifyPageArtist',
|
||||||
mixins: [ LoadDataBeforeEnterMixin(artistData) ],
|
mixins: [LoadDataBeforeEnterMixin(artistData)],
|
||||||
components: { ContentWithHeading, SpotifyListItemAlbum, SpotifyModalDialogAlbum, SpotifyModalDialogArtist, InfiniteLoading },
|
components: { ContentWithHeading, SpotifyListItemAlbum, SpotifyModalDialogAlbum, SpotifyModalDialogArtist, InfiniteLoading },
|
||||||
|
|
||||||
data () {
|
data () {
|
||||||
|
@ -92,7 +92,7 @@ const browseData = {
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'SpotifyPageBrowse',
|
name: 'SpotifyPageBrowse',
|
||||||
mixins: [ LoadDataBeforeEnterMixin(browseData) ],
|
mixins: [LoadDataBeforeEnterMixin(browseData)],
|
||||||
components: { ContentWithHeading, TabsMusic, SpotifyListItemAlbum, SpotifyListItemPlaylist, SpotifyModalDialogAlbum, SpotifyModalDialogPlaylist },
|
components: { ContentWithHeading, TabsMusic, SpotifyListItemAlbum, SpotifyListItemPlaylist, SpotifyModalDialogAlbum, SpotifyModalDialogPlaylist },
|
||||||
|
|
||||||
data () {
|
data () {
|
||||||
|
@ -50,7 +50,7 @@ const browseData = {
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'SpotifyPageBrowseFeaturedPlaylists',
|
name: 'SpotifyPageBrowseFeaturedPlaylists',
|
||||||
mixins: [ LoadDataBeforeEnterMixin(browseData) ],
|
mixins: [LoadDataBeforeEnterMixin(browseData)],
|
||||||
components: { ContentWithHeading, TabsMusic, SpotifyListItemPlaylist, SpotifyModalDialogPlaylist },
|
components: { ContentWithHeading, TabsMusic, SpotifyListItemPlaylist, SpotifyModalDialogPlaylist },
|
||||||
|
|
||||||
data () {
|
data () {
|
||||||
|
@ -50,7 +50,7 @@ const browseData = {
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'SpotifyPageBrowseNewReleases',
|
name: 'SpotifyPageBrowseNewReleases',
|
||||||
mixins: [ LoadDataBeforeEnterMixin(browseData) ],
|
mixins: [LoadDataBeforeEnterMixin(browseData)],
|
||||||
components: { ContentWithHeading, TabsMusic, SpotifyListItemAlbum, SpotifyModalDialogAlbum },
|
components: { ContentWithHeading, TabsMusic, SpotifyListItemAlbum, SpotifyModalDialogAlbum },
|
||||||
|
|
||||||
data () {
|
data () {
|
||||||
|
@ -61,7 +61,7 @@ const playlistData = {
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'SpotifyPagePlaylist',
|
name: 'SpotifyPagePlaylist',
|
||||||
mixins: [ LoadDataBeforeEnterMixin(playlistData) ],
|
mixins: [LoadDataBeforeEnterMixin(playlistData)],
|
||||||
components: { ContentWithHeading, SpotifyListItemTrack, SpotifyModalDialogTrack, SpotifyModalDialogPlaylist, InfiniteLoading },
|
components: { ContentWithHeading, SpotifyListItemTrack, SpotifyModalDialogTrack, SpotifyModalDialogPlaylist, InfiniteLoading },
|
||||||
|
|
||||||
data () {
|
data () {
|
||||||
|
@ -315,7 +315,8 @@ export default {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
this.$router.push({ path: '/search/spotify',
|
this.$router.push({
|
||||||
|
path: '/search/spotify',
|
||||||
query: {
|
query: {
|
||||||
type: 'track,artist,album,playlist',
|
type: 'track,artist,album,playlist',
|
||||||
query: this.search_query,
|
query: this.search_query,
|
||||||
@ -327,7 +328,8 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
open_search_tracks: function () {
|
open_search_tracks: function () {
|
||||||
this.$router.push({ path: '/search/spotify',
|
this.$router.push({
|
||||||
|
path: '/search/spotify',
|
||||||
query: {
|
query: {
|
||||||
type: 'track',
|
type: 'track',
|
||||||
query: this.$route.query.query
|
query: this.$route.query.query
|
||||||
@ -336,7 +338,8 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
open_search_artists: function () {
|
open_search_artists: function () {
|
||||||
this.$router.push({ path: '/search/spotify',
|
this.$router.push({
|
||||||
|
path: '/search/spotify',
|
||||||
query: {
|
query: {
|
||||||
type: 'artist',
|
type: 'artist',
|
||||||
query: this.$route.query.query
|
query: this.$route.query.query
|
||||||
@ -345,7 +348,8 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
open_search_albums: function () {
|
open_search_albums: function () {
|
||||||
this.$router.push({ path: '/search/spotify',
|
this.$router.push({
|
||||||
|
path: '/search/spotify',
|
||||||
query: {
|
query: {
|
||||||
type: 'album',
|
type: 'album',
|
||||||
query: this.$route.query.query
|
query: this.$route.query.query
|
||||||
@ -354,7 +358,8 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
open_search_playlists: function () {
|
open_search_playlists: function () {
|
||||||
this.$router.push({ path: '/search/spotify',
|
this.$router.push({
|
||||||
|
path: '/search/spotify',
|
||||||
query: {
|
query: {
|
||||||
type: 'playlist',
|
type: 'playlist',
|
||||||
query: this.$route.query.query
|
query: this.$route.query.query
|
||||||
|
@ -7,37 +7,37 @@ Vue.use(Vuex)
|
|||||||
export default new Vuex.Store({
|
export default new Vuex.Store({
|
||||||
state: {
|
state: {
|
||||||
config: {
|
config: {
|
||||||
'websocket_port': 0,
|
websocket_port: 0,
|
||||||
'version': '',
|
version: '',
|
||||||
'buildoptions': [ ]
|
buildoptions: []
|
||||||
},
|
},
|
||||||
settings: {
|
settings: {
|
||||||
'categories': []
|
categories: []
|
||||||
},
|
},
|
||||||
library: {
|
library: {
|
||||||
'artists': 0,
|
artists: 0,
|
||||||
'albums': 0,
|
albums: 0,
|
||||||
'songs': 0,
|
songs: 0,
|
||||||
'db_playtime': 0,
|
db_playtime: 0,
|
||||||
'updating': false
|
updating: false
|
||||||
},
|
},
|
||||||
audiobooks_count: { },
|
audiobooks_count: { },
|
||||||
podcasts_count: { },
|
podcasts_count: { },
|
||||||
outputs: [ ],
|
outputs: [],
|
||||||
player: {
|
player: {
|
||||||
'state': 'stop',
|
state: 'stop',
|
||||||
'repeat': 'off',
|
repeat: 'off',
|
||||||
'consume': false,
|
consume: false,
|
||||||
'shuffle': false,
|
shuffle: false,
|
||||||
'volume': 0,
|
volume: 0,
|
||||||
'item_id': 0,
|
item_id: 0,
|
||||||
'item_length_ms': 0,
|
item_length_ms: 0,
|
||||||
'item_progress_ms': 0
|
item_progress_ms: 0
|
||||||
},
|
},
|
||||||
queue: {
|
queue: {
|
||||||
'version': 0,
|
version: 0,
|
||||||
'count': 0,
|
count: 0,
|
||||||
'items': [ ]
|
items: []
|
||||||
},
|
},
|
||||||
lastfm: {},
|
lastfm: {},
|
||||||
spotify: {},
|
spotify: {},
|
||||||
@ -47,8 +47,8 @@ export default new Vuex.Store({
|
|||||||
spotify_featured_playlists: [],
|
spotify_featured_playlists: [],
|
||||||
|
|
||||||
notifications: {
|
notifications: {
|
||||||
'next_id': 1,
|
next_id: 1,
|
||||||
'list': []
|
list: []
|
||||||
},
|
},
|
||||||
recent_searches: [],
|
recent_searches: [],
|
||||||
|
|
||||||
@ -181,11 +181,11 @@ export default new Vuex.Store({
|
|||||||
actions: {
|
actions: {
|
||||||
add_notification ({ commit, state }, notification) {
|
add_notification ({ commit, state }, notification) {
|
||||||
const newNotification = {
|
const newNotification = {
|
||||||
'id': state.notifications.next_id++,
|
id: state.notifications.next_id++,
|
||||||
'type': notification.type,
|
type: notification.type,
|
||||||
'text': notification.text,
|
text: notification.text,
|
||||||
'topic': notification.topic,
|
topic: notification.topic,
|
||||||
'timeout': notification.timeout
|
timeout: notification.timeout
|
||||||
}
|
}
|
||||||
|
|
||||||
commit(types.ADD_NOTIFICATION, newNotification)
|
commit(types.ADD_NOTIFICATION, newNotification)
|
||||||
|
@ -96,7 +96,7 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
queue_save_playlist (name) {
|
queue_save_playlist (name) {
|
||||||
return axios.post('/api/queue/save', undefined, { params: { 'name': name } }).then((response) => {
|
return axios.post('/api/queue/save', undefined, { params: { name: name } }).then((response) => {
|
||||||
store.dispatch('add_notification', { text: 'Queue saved to playlist "' + name + '"', type: 'info', timeout: 2000 })
|
store.dispatch('add_notification', { text: 'Queue saved to playlist "' + name + '"', type: 'info', timeout: 2000 })
|
||||||
return Promise.resolve(response)
|
return Promise.resolve(response)
|
||||||
})
|
})
|
||||||
@ -227,9 +227,9 @@ export default {
|
|||||||
|
|
||||||
library_genre (genre) {
|
library_genre (genre) {
|
||||||
var genreParams = {
|
var genreParams = {
|
||||||
'type': 'albums',
|
type: 'albums',
|
||||||
'media_kind': 'music',
|
media_kind: 'music',
|
||||||
'expression': 'genre is "' + genre + '"'
|
expression: 'genre is "' + genre + '"'
|
||||||
}
|
}
|
||||||
return axios.get('/api/search', {
|
return axios.get('/api/search', {
|
||||||
params: genreParams
|
params: genreParams
|
||||||
@ -238,9 +238,9 @@ export default {
|
|||||||
|
|
||||||
library_genre_tracks (genre) {
|
library_genre_tracks (genre) {
|
||||||
var genreParams = {
|
var genreParams = {
|
||||||
'type': 'tracks',
|
type: 'tracks',
|
||||||
'media_kind': 'music',
|
media_kind: 'music',
|
||||||
'expression': 'genre is "' + genre + '"'
|
expression: 'genre is "' + genre + '"'
|
||||||
}
|
}
|
||||||
return axios.get('/api/search', {
|
return axios.get('/api/search', {
|
||||||
params: genreParams
|
params: genreParams
|
||||||
@ -250,8 +250,8 @@ export default {
|
|||||||
library_artist_tracks (artist) {
|
library_artist_tracks (artist) {
|
||||||
if (artist) {
|
if (artist) {
|
||||||
var artistParams = {
|
var artistParams = {
|
||||||
'type': 'tracks',
|
type: 'tracks',
|
||||||
'expression': 'songartistid is "' + artist + '"'
|
expression: 'songartistid is "' + artist + '"'
|
||||||
}
|
}
|
||||||
return axios.get('/api/search', {
|
return axios.get('/api/search', {
|
||||||
params: artistParams
|
params: artistParams
|
||||||
@ -265,8 +265,8 @@ export default {
|
|||||||
|
|
||||||
library_podcasts_new_episodes () {
|
library_podcasts_new_episodes () {
|
||||||
var episodesParams = {
|
var episodesParams = {
|
||||||
'type': 'tracks',
|
type: 'tracks',
|
||||||
'expression': 'media_kind is podcast and play_count = 0 ORDER BY time_added DESC'
|
expression: 'media_kind is podcast and play_count = 0 ORDER BY time_added DESC'
|
||||||
}
|
}
|
||||||
return axios.get('/api/search', {
|
return axios.get('/api/search', {
|
||||||
params: episodesParams
|
params: episodesParams
|
||||||
@ -275,8 +275,8 @@ export default {
|
|||||||
|
|
||||||
library_podcast_episodes (albumId) {
|
library_podcast_episodes (albumId) {
|
||||||
var episodesParams = {
|
var episodesParams = {
|
||||||
'type': 'tracks',
|
type: 'tracks',
|
||||||
'expression': 'media_kind is podcast and songalbumid is "' + albumId + '" ORDER BY time_added DESC'
|
expression: 'media_kind is podcast and songalbumid is "' + albumId + '" ORDER BY time_added DESC'
|
||||||
}
|
}
|
||||||
return axios.get('/api/search', {
|
return axios.get('/api/search', {
|
||||||
params: episodesParams
|
params: episodesParams
|
||||||
@ -284,7 +284,7 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
library_add (url) {
|
library_add (url) {
|
||||||
return axios.post('/api/library/add', undefined, { params: { 'url': url } })
|
return axios.post('/api/library/add', undefined, { params: { url: url } })
|
||||||
},
|
},
|
||||||
|
|
||||||
library_playlist_delete (playlistId) {
|
library_playlist_delete (playlistId) {
|
||||||
@ -320,7 +320,7 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
library_files (directory = undefined) {
|
library_files (directory = undefined) {
|
||||||
var filesParams = { 'directory': directory }
|
var filesParams = { directory: directory }
|
||||||
return axios.get('/api/library/files', {
|
return axios.get('/api/library/files', {
|
||||||
params: filesParams
|
params: filesParams
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user