Skip to content

Commit

Permalink
Misc. fixes (#940)
Browse files Browse the repository at this point in the history
* Fix import folder flags none.

* Clamp unwatched & add others to count.
  • Loading branch information
revam authored Jun 21, 2024
1 parent e71eaf6 commit ef58ffb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions src/components/Collection/PosterViewItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,11 @@ const PosterViewItem = ({ isSeries = false, item }: Props) => {
const { showEpisodeCount, showGroupIndicator, showUnwatchedCount } = settings.WebUI_Settings.collection.poster;

const mainPoster = useMainPoster(item);
const episodeCount = item.Sizes.Local.Episodes + item.Sizes.Local.Specials;
const unwatchedCount = episodeCount - item.Sizes.Watched.Episodes - item.Sizes.Watched.Specials;
const episodeCount = item.Sizes.Local.Episodes + item.Sizes.Local.Specials + item.Sizes.Local.Others;
const unwatchedCount = Math.max(
episodeCount - item.Sizes.Watched.Episodes - item.Sizes.Watched.Specials - item.Sizes.Watched.Others,
0,
);
let groupCount = 0;

if (!isSeries) {
Expand Down
2 changes: 1 addition & 1 deletion src/pages/dashboard/panels/ImportFolders.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ function ImportFolders() {
</div>
<div className="mb-1 flex">
<div className="grow">Type</div>
<div>{flags !== '' ? flags : 'Not Set - Please Fix'}</div>
<div>{flags !== '' ? flags : 'None'}</div>
</div>
<div className="flex">
<div className="grow">Size</div>
Expand Down

0 comments on commit ef58ffb

Please sign in to comment.