rename to humanizedEpisodeId

This commit is contained in:
destruc7i0n 2023-01-24 08:38:37 -05:00
parent 3604a2f0d7
commit c3985873d4
3 changed files with 6 additions and 6 deletions

View File

@ -7,12 +7,12 @@ interface PageTitleControlProps {
} }
export function PageTitleControl(props: PageTitleControlProps) { export function PageTitleControl(props: PageTitleControlProps) {
const { isSeries, episodeIdentifier } = useCurrentSeriesEpisodeInfo(); const { isSeries, humanizedEpisodeId } = useCurrentSeriesEpisodeInfo();
if (!props.media) return null; if (!props.media) return null;
const title = isSeries const title = isSeries
? `${props.media.title} - ${episodeIdentifier}` ? `${props.media.title} - ${humanizedEpisodeId}`
: props.media.title; : props.media.title;
return ( return (

View File

@ -1,14 +1,14 @@
import { useCurrentSeriesEpisodeInfo } from "../hooks/useCurrentSeriesEpisodeInfo"; import { useCurrentSeriesEpisodeInfo } from "../hooks/useCurrentSeriesEpisodeInfo";
export function ShowTitleControl() { export function ShowTitleControl() {
const { isSeries, currentEpisodeInfo, episodeIdentifier } = const { isSeries, currentEpisodeInfo, humanizedEpisodeId } =
useCurrentSeriesEpisodeInfo(); useCurrentSeriesEpisodeInfo();
if (!isSeries) return null; if (!isSeries) return null;
return ( return (
<p className="ml-8 select-none space-x-2 text-white"> <p className="ml-8 select-none space-x-2 text-white">
<span>{episodeIdentifier}</span> <span>{humanizedEpisodeId}</span>
<span className="opacity-50">{currentEpisodeInfo?.title}</span> <span className="opacity-50">{currentEpisodeInfo?.title}</span>
</p> </p>
); );

View File

@ -22,11 +22,11 @@ export function useCurrentSeriesEpisodeInfo() {
if (!isSeries) return { isSeries: false }; if (!isSeries) return { isSeries: false };
const episodeIdentifier = `S${currentSeasonInfo?.number} E${currentEpisodeInfo?.number}`; const humanizedEpisodeId = `S${currentSeasonInfo?.number} E${currentEpisodeInfo?.number}`;
return { return {
isSeries: true, isSeries: true,
episodeIdentifier, humanizedEpisodeId,
currentSeasonInfo, currentSeasonInfo,
currentEpisodeInfo, currentEpisodeInfo,
}; };