Including networks in filter count. Preserving query between date ranges. Allowing --latest to be used without --last.

This commit is contained in:
DebaucheryLibrarian 2020-09-09 03:45:00 +02:00
parent d1cdd60ee8
commit ac66606135
3 changed files with 6 additions and 6 deletions

View File

@ -4,9 +4,9 @@
<Icon icon="antenna" /> <Icon icon="antenna" />
<div <div
v-if="selectedChannels.length > 0" v-if="selectedChannels.length + selectedNetworks.length > 0"
class="filter-applied" class="filter-applied"
>{{ selectedChannels.length }} {{ selectedChannels.length > 1 ? 'channels' : 'channel' }}</div> >{{ selectedChannels.length + selectedNetworks.length }} {{ selectedChannels.length + selectedNetworks.length > 1 ? 'channels' : 'channel' }}</div>
<div <div
v-else v-else

View File

@ -2,19 +2,19 @@
<div class="filter-bar noselect"> <div class="filter-bar noselect">
<div class="sort"> <div class="sort">
<router-link <router-link
:to="{ params: { range: 'latest', pageNumber: 1 } }" :to="{ params: { range: 'latest', pageNumber: 1 }, query: $route.query }"
:class="{ active: $route.name === 'latest' || range === 'latest' }" :class="{ active: $route.name === 'latest' || range === 'latest' }"
class="range range-button" class="range range-button"
>Latest</router-link> >Latest</router-link>
<router-link <router-link
:to="{ params: { range: 'upcoming', pageNumber: 1 } }" :to="{ params: { range: 'upcoming', pageNumber: 1 }, query: $route.query }"
:class="{ active: $route.name === 'upcoming' || range === 'upcoming' }" :class="{ active: $route.name === 'upcoming' || range === 'upcoming' }"
class="range-button" class="range-button"
>Upcoming</router-link> >Upcoming</router-link>
<router-link <router-link
:to="{ params: { range: 'new', pageNumber: 1 } }" :to="{ params: { range: 'new', pageNumber: 1 }, query: $route.query }"
:class="{ active: $route.name === 'new' || range === 'new' }" :class="{ active: $route.name === 'new' || range === 'new' }"
class="range-button" class="range-button"
>New</router-link> >New</router-link>

View File

@ -111,7 +111,7 @@ async function scrapeReleases(scraper, entity, preData, upcoming = false, page =
} }
async function scrapeLatestReleases(scraper, entity, preData) { async function scrapeLatestReleases(scraper, entity, preData) {
if (!argv.latest || !scraper.fetchLatest) { if ((!argv.latest && !argv.last) || !scraper.fetchLatest) {
return emptyReleases; return emptyReleases;
} }