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" />
<div
v-if="selectedChannels.length > 0"
v-if="selectedChannels.length + selectedNetworks.length > 0"
class="filter-applied"
>{{ selectedChannels.length }} {{ selectedChannels.length > 1 ? 'channels' : 'channel' }}</div>
>{{ selectedChannels.length + selectedNetworks.length }} {{ selectedChannels.length + selectedNetworks.length > 1 ? 'channels' : 'channel' }}</div>
<div
v-else

View File

@ -2,19 +2,19 @@
<div class="filter-bar noselect">
<div class="sort">
<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="range range-button"
>Latest</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="range-button"
>Upcoming</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="range-button"
>New</router-link>

View File

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