-
+
@@ -30,7 +30,8 @@ export default {
results: [],
page: 1,
totalPages: 0,
- totalResults: 0
+ totalResults: 0,
+ loading: true
}
},
computed: {
@@ -42,18 +43,24 @@ export default {
console.log('routelistname', routeListName)
return routeListName.includes('_') ? routeListName.split('_').join(' ') : routeListName
},
- resultCount() {
+ info() {
if (this.results.length === 0)
- return ''
-
+ return [null, null]
+ return [this.pageCount, this.resultCount]
+ },
+ resultCount() {
const loadedResults = this.results.length
const totalResults = this.totalResults < 10000 ? this.totalResults : '∞'
return `${loadedResults} of ${totalResults} results`
+ },
+ pageCount() {
+ return `Page ${this.page} of ${this.totalPages}`
}
},
methods: {
loadMore() {
console.log(this.$route)
+ this.loading = true;
this.page++
window.history.replaceState({}, 'search', `/#/${this.$route.fullPath}?page=${this.page}`)
@@ -82,6 +89,8 @@ export default {
// TODO handle if list is not found
console.log('404 this is not a tmdb list')
}
+
+ this.loading = false
}
},
created() {
diff --git a/src/components/Movie.vue b/src/components/Movie.vue
index a6df088..f34fb32 100644
--- a/src/components/Movie.vue
+++ b/src/components/Movie.vue
@@ -123,7 +123,7 @@ import SidebarListElement from './ui/sidebarListElem'
import store from '@/store'
import LoadingPlaceholder from './ui/LoadingPlaceholder'
-import { getMovie, getShow, request, getRequestStatus } from '@/api'
+import { getMovie, getPerson, getShow, request, getRequestStatus } from '@/api'
export default {
props: ['id', 'type'],
@@ -140,7 +140,7 @@ export default {
matched: false,
userLoggedIn: storage.sessionId ? true : false,
requested: false,
- admin: localStorage.getItem('admin'),
+ admin: localStorage.getItem('admin') == "true" ? true : false,
showTorrents: false,
compact: false
}
@@ -203,6 +203,12 @@ export default {
.catch(error => {
this.$router.push({ name: '404' });
})
+ } else if (this.type == 'person') {
+ getPerson(this.id, true)
+ .then(this.parseResponse)
+ .catch(error => {
+ this.$router.push({ name: '404' });
+ })
} else {
getShow(this.id)
.then(this.parseResponse)
diff --git a/src/components/MoviesListItem.vue b/src/components/MoviesListItem.vue
index 989617b..5a2ac51 100644
--- a/src/components/MoviesListItem.vue
+++ b/src/components/MoviesListItem.vue
@@ -13,7 +13,7 @@
-
{{ movie.title }}
+
{{ movie.title || movie.name }}
{{ movie.year }}
diff --git a/src/components/Search.vue b/src/components/Search.vue
index b255c00..c131aff 100644
--- a/src/components/Search.vue
+++ b/src/components/Search.vue
@@ -8,10 +8,26 @@
load more
-
+
+
No results for search: {{ query }}
+
+
+
+
+