2018-08-11 01:47:10 -04:00
|
|
|
<template>
|
|
|
|
<div>
|
|
|
|
<tabs-music></tabs-music>
|
|
|
|
|
|
|
|
<content-with-heading>
|
|
|
|
<template slot="heading-left">
|
|
|
|
<p class="title is-4">Recently played</p>
|
|
|
|
<p class="heading">tracks</p>
|
|
|
|
</template>
|
|
|
|
<template slot="content">
|
2020-10-04 11:31:47 -04:00
|
|
|
<list-tracks :tracks="recently_played.items"></list-tracks>
|
2018-08-11 01:47:10 -04:00
|
|
|
</template>
|
|
|
|
</content-with-heading>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import { LoadDataBeforeEnterMixin } from './mixin'
|
|
|
|
import ContentWithHeading from '@/templates/ContentWithHeading'
|
|
|
|
import TabsMusic from '@/components/TabsMusic'
|
2020-10-04 11:31:47 -04:00
|
|
|
import ListTracks from '@/components/ListTracks'
|
2018-08-11 01:47:10 -04:00
|
|
|
import webapi from '@/webapi'
|
|
|
|
|
|
|
|
const browseData = {
|
|
|
|
load: function (to) {
|
|
|
|
return webapi.search({
|
|
|
|
type: 'track',
|
2019-02-09 02:48:42 -05:00
|
|
|
expression: 'time_played after 8 weeks ago and media_kind is music order by time_played desc',
|
2018-08-11 01:47:10 -04:00
|
|
|
limit: 50
|
|
|
|
})
|
|
|
|
},
|
|
|
|
|
|
|
|
set: function (vm, response) {
|
|
|
|
vm.recently_played = response.data.tracks
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export default {
|
|
|
|
name: 'PageBrowseType',
|
2020-04-11 13:43:53 -04:00
|
|
|
mixins: [LoadDataBeforeEnterMixin(browseData)],
|
2020-10-04 11:31:47 -04:00
|
|
|
components: { ContentWithHeading, TabsMusic, ListTracks },
|
2018-08-11 01:47:10 -04:00
|
|
|
|
|
|
|
data () {
|
|
|
|
return {
|
2020-10-04 11:31:47 -04:00
|
|
|
recently_played: {}
|
2018-08-11 01:47:10 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style>
|
|
|
|
</style>
|