diff --git a/assets/components/actors/actor.vue b/assets/components/actors/actor.vue index adcc697d..df57f91b 100644 --- a/assets/components/actors/actor.vue +++ b/assets/components/actors/actor.vue @@ -307,6 +307,8 @@ class="pagination-top" /> + + diff --git a/assets/components/actors/actors.vue b/assets/components/actors/actors.vue index d09e671f..89db7e14 100644 --- a/assets/components/actors/actors.vue +++ b/assets/components/actors/actors.vue @@ -80,6 +80,8 @@ :items-per-page="limit" class="pagination-top" /> + + diff --git a/assets/components/entities/entity.vue b/assets/components/entities/entity.vue index d052c605..17a4fe20 100644 --- a/assets/components/entities/entity.vue +++ b/assets/components/entities/entity.vue @@ -106,6 +106,8 @@ class="pagination-top" /> + + diff --git a/assets/components/footer/footer.vue b/assets/components/footer/footer.vue new file mode 100644 index 00000000..2a5d78c6 --- /dev/null +++ b/assets/components/footer/footer.vue @@ -0,0 +1,34 @@ + + + + + diff --git a/assets/components/home/home.vue b/assets/components/home/home.vue index 4089673a..6eb16349 100644 --- a/assets/components/home/home.vue +++ b/assets/components/home/home.vue @@ -20,6 +20,8 @@ :items-per-page="limit" class="pagination-bottom" /> + + diff --git a/assets/components/networks/networks.vue b/assets/components/networks/networks.vue index 3c2f8fab..a87ee7a3 100644 --- a/assets/components/networks/networks.vue +++ b/assets/components/networks/networks.vue @@ -40,6 +40,8 @@ :entity="entity" /> + + diff --git a/assets/components/releases/movies.vue b/assets/components/releases/movies.vue index 6beb611c..ca33247b 100644 --- a/assets/components/releases/movies.vue +++ b/assets/components/releases/movies.vue @@ -1,12 +1,16 @@ - - + + + + + + @@ -40,7 +44,9 @@ export default { @import 'breakpoints'; .movies { - padding: 1rem; + display: flex; + flex-direction: column; + flex-grow: 1; } .tiles { diff --git a/assets/components/stats/stats.vue b/assets/components/stats/stats.vue new file mode 100644 index 00000000..e6e2794b --- /dev/null +++ b/assets/components/stats/stats.vue @@ -0,0 +1,95 @@ + + + + Stats + + + + Networks + {{ totalNetworks }} + + + + Channels + {{ totalChannels }} + + + + Scenes + {{ totalScenes }} + + + + Movies + {{ totalMovies }} + + + + Actors + {{ totalActors }} + + + + + + + + + + + diff --git a/assets/components/tags/tag.vue b/assets/components/tags/tag.vue index 4f4434ad..9f1e9c29 100644 --- a/assets/components/tags/tag.vue +++ b/assets/components/tags/tag.vue @@ -31,6 +31,8 @@ + + diff --git a/assets/components/tags/tags.vue b/assets/components/tags/tags.vue index 9182328d..6422ac89 100644 --- a/assets/components/tags/tags.vue +++ b/assets/components/tags/tags.vue @@ -20,6 +20,8 @@ /> + + @@ -146,7 +148,7 @@ export default { @import 'theme'; .tags { - padding: 1rem; + padding: 1rem 1rem 0 1rem; } .tiles { diff --git a/assets/js/main.js b/assets/js/main.js index 555987a7..faeae36c 100644 --- a/assets/js/main.js +++ b/assets/js/main.js @@ -12,6 +12,7 @@ import '../css/style.scss'; import Container from '../components/container/container.vue'; import Icon from '../components/icon/icon.vue'; +import Footer from '../components/footer/footer.vue'; function formatDate(date, format = 'MMMM D, YYYY', precision = 'day') { if (precision === 'year') { @@ -39,6 +40,7 @@ function init() { Vue.mixin({ components: { Icon, + Footer, }, watch: { pageTitle(title) { diff --git a/assets/js/router.js b/assets/js/router.js index 6bbbb6c0..afb353a8 100644 --- a/assets/js/router.js +++ b/assets/js/router.js @@ -12,6 +12,7 @@ import Movies from '../components/releases/movies.vue'; import Tag from '../components/tags/tag.vue'; import Tags from '../components/tags/tags.vue'; import Search from '../components/search/search.vue'; +import Stats from '../components/stats/stats.vue'; import NotFound from '../components/errors/404.vue'; Vue.use(VueRouter); @@ -172,6 +173,11 @@ const routes = [ component: Search, name: 'search', }, + { + path: '/stats', + component: Stats, + name: 'stats', + }, { path: '*', component: NotFound, diff --git a/assets/js/ui/actions.js b/assets/js/ui/actions.js index 47f41797..5fee466a 100644 --- a/assets/js/ui/actions.js +++ b/assets/js/ui/actions.js @@ -154,6 +154,32 @@ function initUiActions(_store, _router) { }; } + async function fetchStats() { + const { + scenes, + movies, + actors, + networks, + channels, + } = await graphql(` + query Stats { + scenes: releasesConnection { totalCount } + movies: moviesConnection { totalCount } + actors: actorsConnection { totalCount } + networks: entitiesConnection(filter: { type: { equalTo: "network" } }) { totalCount } + channels: entitiesConnection(filter: { type: { equalTo: "channel" } }) { totalCount } + } + `); + + return { + totalScenes: scenes.totalCount, + totalMovies: movies.totalCount, + totalActors: actors.totalCount, + totalNetworks: networks.totalCount, + totalChannels: channels.totalCount, + }; + } + return { search, setFilter, @@ -161,6 +187,7 @@ function initUiActions(_store, _router) { setBatch, setSfw, setTheme, + fetchStats, }; } diff --git a/src/updates.js b/src/updates.js index cc48fae9..ed50bf7e 100644 --- a/src/updates.js +++ b/src/updates.js @@ -174,6 +174,8 @@ async function scrapeChannelReleases(scraper, channelEntity, preData) { : [], ]); + console.log(movies); + logger.info(`Fetching ${latestReleases.length} latest and ${upcomingReleases.length} upcoming updates for '${channelEntity.name}' (${channelEntity.parent?.name})`); return [...latestReleases, ...upcomingReleases];