Skip to content

Commit

Permalink
Show the release date when linking movies / Collection view tooltip f…
Browse files Browse the repository at this point in the history
…ix (#1133)

- in the Metadata Linking view don't show "Airdate Unknown" for unlinked episodes
- in the Metadata Linking view show the release date for linked movies
- in the Collection view show "Edit Group" instead of "Edit Series" in the tooltip if it is a group
  • Loading branch information
natyusha authored Nov 4, 2024
1 parent 624cd28 commit 0fc2cbc
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/components/Collection/ListViewItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ const ListViewItem = ({ groupExtras, isSeries = false, isSidebarOpen, item }: Pr
<Button
className="pointer-events-auto h-fit"
onClick={(isSeries || item.Size === 1) ? editSeriesModalCallback : editGroupModalCallback}
tooltip="Edit Series"
tooltip={(isSeries || item.Size === 1) ? 'Edit Series' : 'Edit Group'}
>
<Icon path={mdiPencilCircleOutline} size="2rem" />
</Button>
Expand Down
2 changes: 1 addition & 1 deletion src/components/Collection/PosterViewItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ const PosterViewItem = ({ isSeries = false, item }: Props) => {
<Button
className="pointer-events-auto h-fit"
onClick={(isSeries || item.Size === 1) ? editSeriesModalCallback : editGroupModalCallback}
tooltip="Edit Series"
tooltip={(isSeries || item.Size === 1) ? 'Edit Series' : 'Edit Group'}
>
<Icon path={mdiPencilCircleOutline} size="2rem" />
</Button>
Expand Down
2 changes: 1 addition & 1 deletion src/components/Collection/Tmdb/EpisodeSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ const EpisodeSelect = React.memo((props: Props) => {
data-tooltip-content={tmdbEpisode?.Title ?? ''}
>
<div className="line-clamp-1 text-xs font-semibold opacity-65">
{tmdbEpisode?.AiredAt ?? 'Airdate Unknown'}
{tmdbEpisode?.Title ? tmdbEpisode?.AiredAt ?? 'Airdate Unknown' : ''}
</div>
<div className="line-clamp-1">
{tmdbEpisode?.Title ?? 'Entry Not Linked'}
Expand Down
15 changes: 12 additions & 3 deletions src/components/Collection/Tmdb/MovieRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,19 @@ const MovieRow = React.memo((props: Props) => {
data-tooltip-id="tooltip"
data-tooltip-content={lockMovie ? 'This episode is already linked to a different movie!' : ''}
>
<div className={cx('flex gap-x-6', lockMovie && 'opacity-65 pointer-events-none')}>
<div className={cx('flex gap-x-6 items-center', lockMovie && 'opacity-65 pointer-events-none')}>
Movie
<div className="line-clamp-1">
{tmdbMovie?.Title ?? 'Entry Not Linked'}
<div
className="flex grow flex-col text-left"
data-tooltip-id="tooltip"
data-tooltip-content={tmdbMovie?.Title ?? ''}
>
<div className="line-clamp-1 text-xs font-semibold opacity-65">
{tmdbMovie?.Title ? tmdbMovie?.ReleasedAt ?? 'Airdate Unknown' : ''}
</div>
<div className="line-clamp-1">
{tmdbMovie?.Title ?? 'Entry Not Linked'}
</div>
</div>
</div>
{!lockMovie
Expand Down
1 change: 1 addition & 0 deletions src/core/types/api/tmdb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export type TmdbBaseItemType = {
ID: number;
Title: string;
Overview: string;
ReleasedAt: string;
};

export type TmdbMovieType = TmdbBaseItemType;
Expand Down

0 comments on commit 0fc2cbc

Please sign in to comment.