-
-
@@ -275,10 +286,17 @@ var app = new Vue({
computed:{
page(){
return this.filter.page;
+ },
+ count(){
+ return this.filter.count;
}
},
watch:{
+
page(newPage,oldPage){
+ if(newPage==oldPage){
+ return;
+ }
if(newPage==1){
this.filter.previousPage=0;
}else{
@@ -292,6 +310,17 @@ var app = new Vue({
this.getData()
},
+ count(current,old){
+ this.getData()
+ },
+ showFilters(current,old){
+
+ if(localStorage){
+ localStorage.showFilters=current
+ }
+
+ },
+
selectedPodcasts(current,old){
var arr=[];
for (let index = 0; index < current.length; index++) {
@@ -299,7 +328,7 @@ var app = new Vue({
arr.push(element.ID);
}
this.filter['podcastIds']=arr;
- this.getData()
+ this.submitFilters()
},
selectedTags(current,old){
var arr=[];
@@ -308,25 +337,28 @@ var app = new Vue({
arr.push(element.ID);
}
this.filter['tagIds']=arr;
- this.getData()
+ this.submitFilters()
},
selectedSorting(current,old){
this.filter.sorting=current.Value;
- this.getData()
+ this.submitFilters()
},
selectedDownloadStatus(current,old){
this.filter.isDownloaded=current.Value;
- this.getData()
+ this.submitFilters()
},
selectedPlayedStatus(current,old){
this.filter.isPlayed=current.Value;
- this.getData()
+ this.submitFilters()
},
},
mounted(){
if(localStorage && localStorage.episodesFilter){
this.filter=JSON.parse(localStorage.episodesFilter);
}
+ if(localStorage && localStorage.showFilters){
+ this.showFilters=JSON.parse(localStorage.showFilters);
+ }
if(this.filter.podcastIds!=null){
var selectedPodcasts=[];
@@ -425,15 +457,17 @@ var app = new Vue({
downloadToDisk(item.ID)
},
openPlayer(item){
- openPlayer(item.ID)
+ openPlayer([item.ID])
},
- enqueuePlayer(item){
- enqueuePlayer(item.ID)
+ enqueueEpisode(item){
+ enqueueEpisode([item.ID])
},
searchQueryUpated(){
var self=this;
+
clearTimeout(this.debounce)
this.debounce = setTimeout(() => {
+ self.filter.page=1
self.getData()
}, 600)
},
@@ -447,6 +481,23 @@ var app = new Vue({
this.getData();
},
+ toggleFilters(){
+ this.showFilters=!this.showFilters
+ },
+ playPage(){
+ var itemIds=[];
+ for(var i=0;i