diff --git a/public/installerBanner.bmp b/public/installerBanner.bmp deleted file mode 100644 index 9c1df7c..0000000 Binary files a/public/installerBanner.bmp and /dev/null differ diff --git a/public/installerBanner.png b/public/installerBanner.png deleted file mode 100644 index 8e66d32..0000000 Binary files a/public/installerBanner.png and /dev/null differ diff --git a/public/installerDialog.bmp b/public/installerDialog.bmp deleted file mode 100644 index 2077442..0000000 Binary files a/public/installerDialog.bmp and /dev/null differ diff --git a/public/installerDialog.png b/public/installerDialog.png deleted file mode 100644 index c7af1d1..0000000 Binary files a/public/installerDialog.png and /dev/null differ diff --git a/public/installerHeaderImage.bmp b/public/installerHeaderImage.bmp index 722e680..2ed4b44 100644 Binary files a/public/installerHeaderImage.bmp and b/public/installerHeaderImage.bmp differ diff --git a/public/installerHeaderImage.png b/public/installerHeaderImage.png index ce067d4..f3ed813 100644 Binary files a/public/installerHeaderImage.png and b/public/installerHeaderImage.png differ diff --git a/public/installerSideBarImage.bmp b/public/installerSideBarImage.bmp index 4afd66a..651a207 100644 Binary files a/public/installerSideBarImage.bmp and b/public/installerSideBarImage.bmp differ diff --git a/public/installerSideBarImage.png b/public/installerSideBarImage.png index 868fa99..d387bcf 100644 Binary files a/public/installerSideBarImage.png and b/public/installerSideBarImage.png differ diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 1b0d21f..439040e 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -65,7 +65,9 @@ "nsis": { "sidebarImage": "../public/installerSideBarImage.bmp", "headerImage": "../public/installerHeaderImage.bmp", - "installerIcon": "icons/icon.ico" + "installerIcon": "icons/icon.ico", + "displayLanguageSelector": true, + "license": "../LICENSE" }, "webviewInstallMode": { "silent": true, diff --git a/src/components/buttons/playButton.tsx b/src/components/buttons/playButton.tsx index 915be8c..c22bc00 100644 --- a/src/components/buttons/playButton.tsx +++ b/src/components/buttons/playButton.tsx @@ -36,6 +36,7 @@ import { } from "../../utils/store/playback"; import type { SxProps } from "@mui/material"; +import { getRuntimeCompact } from "../../utils/date/time"; const PlayButton = ({ item, @@ -294,56 +295,85 @@ const PlayButton = ({ ); } return ( - + size={size} + > + {itemUserData.PlaybackPositionTicks > 0 + ? "Continue Watching" + : item?.Type === "MusicAlbum" || + item?.Type === "Audio" || + item?.Type === "AudioBook" || + item?.Type === "Playlist" || + audio + ? "Play Now" + : "Watch Now"} + itemUserData.PlayedPercentage > 0 + ? itemUserData.PlayedPercentage + : 0 + } + sx={{ + position: "absolute", + top: 0, + left: 0, + right: 0, + bottom: 0, + height: "100%", + background: "transparent", + opacity: 0.2, + zIndex: 0, + mixBlendMode: "difference", + }} + color="white" + /> + + {itemUserData.PlaybackPositionTicks > 0 && ( + + {getRuntimeCompact( + item.RunTimeTicks - itemUserData.PlaybackPositionTicks, + )}{" "} + left + + )} + ); }; diff --git a/src/components/layouts/tracksList/tracksList.module.scss b/src/components/layouts/tracksList/tracksList.module.scss index 5fda427..41f8cc5 100644 --- a/src/components/layouts/tracksList/tracksList.module.scss +++ b/src/components/layouts/tracksList/tracksList.module.scss @@ -24,6 +24,7 @@ border-radius: 20px; overflow: hidden; border: 1px solid rgb(255 255 255 / 0.2); + margin-bottom: 2em; } &-header{ background: rgb(0 0 0 / 0.4) !important; diff --git a/src/components/playback/audioPlayer/index.jsx b/src/components/playback/audioPlayer/index.jsx index da19b82..4d6e67c 100644 --- a/src/components/playback/audioPlayer/index.jsx +++ b/src/components/playback/audioPlayer/index.jsx @@ -205,6 +205,8 @@ const AudioPlayer = () => { setShowWaveform(false); }; + console.log(tracks); + const info = useMemo( () => (
{ >
{tracks[currentTrack].Name} { width: "100vw", }} > -
+
{
-
{ }} /> ) : ( - <> + { + e.currentTarget.style.opacity = 1; + }} + style={{ + y: parallax, + }} + /> )}
{ /> ) : ( - <> +
+ {getTypeIcon(item.data.Type)} +
)}
- {item.data.Name} + + {item.data.Name} + - - artist - - } - size="large" - sx={{ - "& .MuiChip-label": { - marginLeft: 0.5, - }, - }} - /> - - {item.data.ProductionYear ?? ""} - - + + artist + + } + sx={{ + "& .MuiChip-label": { + marginLeft: 0.5, + }, + }} + /> + {item.data.PremiereDate && ( + + {item.data.ProductionYear ?? ""} + + )} + {item.data.ChildCount > 1 ? `${item.data.ChildCount} Tracks` - : `${item.data.ChildCount}`} + : `${item.data.ChildCount} Track`} {item.data.RunTimeTicks && ( - + {getRuntime(item.data.RunTimeTicks)} )} + + {item.data.Genres?.slice(0, 4).join(" / ")} + - - {item.data.Genres.join(", ")} - +
-
-
- -
-
- -
+
+
+ +
+
+
@@ -364,7 +385,6 @@ const MusicAlbumTitlePage = () => { ))}
-
{ {similarItems.data.TotalRecordCount > 0 && ( {similarItems.data.Items.map((similar, index) => { @@ -455,14 +475,14 @@ const MusicAlbumTitlePage = () => { similar.Type === BaseItemKind.Episode ? `S${similar.ParentIndexNumber}:E${similar.IndexNumber} - ${similar.Name}` : similar.Type === BaseItemKind.Series - ? `${similar.ProductionYear} - ${ + ? `${similar.ProductionYear} - ${ similar.EndDate ? new Date(similar.EndDate).toLocaleString([], { year: "numeric", - }) + }) : "Present" - }` - : similar.ProductionYear + }` + : similar.ProductionYear } cardType={ similar.Type === BaseItemKind.MusicAlbum || diff --git a/src/routes/artist/artist.module.scss b/src/routes/artist/artist.module.scss index 00982fe..c10d2f1 100644 --- a/src/routes/artist/artist.module.scss +++ b/src/routes/artist/artist.module.scss @@ -1,10 +1,17 @@ +$cardWidth: 22%; + .item-artist.item { gap: 1em; .item-hero { - height: 50vh; + height: 60vh; gap: 2em; + row-gap: 1.2em; position: relative; - align-items: center; + align-items: flex-end; + margin-bottom: 1em; + display: grid; + grid-template-columns: $cardWidth 1fr; + grid-template-rows: 1fr auto; &-image { opacity: 0; width: 100%; @@ -19,7 +26,7 @@ flex-grow: 1; flex-shrink: 0; position: relative; - width: 18% !important; + width: 100%; } &-blurhash { position: absolute !important; @@ -27,18 +34,29 @@ height: 100% !important; z-index: -1; } + &-icon { + background: linear-gradient(45deg, rgb(255 255 255 / 0.05), rgb(255 255 255 / 0.15)); + height: 100%; + display: flex; + align-items: center; + justify-content: center; + .material-symbols-rounded{ + font-size: 4em; + } + } } &-logo { - max-width: 42rem; + max-width: 34rem; max-height: 10rem; opacity: 0; transition: opacity $transition-time-default; object-position: bottom; + margin-bottom: 2em; } &-detail { width: 100%; align-items: flex-start; - gap: 1em; + gap: 0.2em; justify-content: end; } &-buttons { @@ -46,6 +64,10 @@ align-items: center; justify-content: space-between; width: 100%; + grid-column: 1/3; + display: grid; + grid-template-columns: inherit; + gap: 2em; } } &-backdrop { @@ -61,24 +83,27 @@ top: -4.4em; left: -$page-margin; width: 100vw; - height: calc(50vh + 4.4em); + height: calc(54vh + 4.4em); z-index: -1; mask-image: linear-gradient(to top, transparent, black); -webkit-mask-image: linear-gradient( - to top, - transparent, - black + to top, + transparent, + black ); } } + & .play-button { + width: 100% !important; + } } .item-detail { display: grid; - grid-template-columns: 1fr 5px 35%; + grid-template-columns: 1fr 35%; justify-items: center; align-items: start; - gap: 1em; + gap: 3em; &-cast { &-container { @@ -151,7 +176,7 @@ .grid { display: grid; - grid-template-columns: repeat(8, minmax(0, 1fr)); + grid-template-columns: repeat(7, minmax(0, 1fr)); align-items: start; } diff --git a/src/routes/artist/index.jsx b/src/routes/artist/index.jsx index caa4570..9ccae3e 100644 --- a/src/routes/artist/index.jsx +++ b/src/routes/artist/index.jsx @@ -38,6 +38,7 @@ import { setBackdrop, useBackdropStore } from "../../utils/store/backdrop"; import "./artist.module.scss"; import IconLink from "../../components/iconLink"; +import { getTypeIcon } from "../../components/utils/iconsCollection"; function TabPanel(props) { const { children, value, index, ...other } = props; @@ -263,7 +264,9 @@ const ArtistTitlePage = () => { /> ) : ( - <> +
+ {getTypeIcon(item.data.Type)} +
)}
@@ -281,7 +284,9 @@ const ArtistTitlePage = () => { className="item-hero-logo" /> ) : ( - {item.data.Name} + + {item.data.Name} + )} { ))}
-
{ /> ) : ( - <> +
+ {getTypeIcon(item.data.Type)} +
)}
-
+
{Object.keys(item.data.ImageTags).includes("Logo") ? ( {item.data.Name} { className="item-hero-logo" /> ) : ( - {item.data.Name} + + {item.data.Name} + )} { justifyItems="flex-start" alignItems="center" > - - {item.data.ProductionYear ?? ""} - + {item.data.PremiereDate && ( + + {item.data.ProductionYear ?? ""} + + )} {item.data.OfficialRating && ( - + )} {item.data.CommunityRating && ( @@ -262,12 +272,10 @@ const BoxSetTitlePage = () => { className="hero-carousel-info-rating" >
star @@ -276,7 +284,7 @@ const BoxSetTitlePage = () => { style={{ opacity: "0.8", }} - variant="subtitle1" + variant="subtitle2" > {Math.round(item.data.CommunityRating * 10) / 10} @@ -292,12 +300,10 @@ const BoxSetTitlePage = () => { className="hero-carousel-info-rating" >
50 ? green[400] : red[400], - fontVariationSettings: - '"FILL" 1, "wght" 300, "GRAD" 25, "opsz" 40', }} > {item.data.CriticRating > 50 ? "thumb_up" : "thumb_down"} @@ -306,7 +312,7 @@ const BoxSetTitlePage = () => { style={{ opacity: "0.8", }} - variant="subtitle1" + variant="subtitle2" > {item.data.CriticRating} @@ -314,92 +320,59 @@ const BoxSetTitlePage = () => { )} {item.data.RunTimeTicks && ( - + {getRuntime(item.data.RunTimeTicks)} )} {item.data.RunTimeTicks && ( - + {endsAt( item.data.RunTimeTicks - item.data.UserData.PlaybackPositionTicks, )} )} + + {item.data.Genres?.slice(0, 4).join(" / ")} + - - {item.data.Genres.join(", ")} - - -
-
- -
-
- - -
+
+
+
+ +
+
+ +
-
- {item.data.UserData.PlaybackPositionTicks > 0 && ( -
- - {getRuntime( - item.data.RunTimeTicks - - item.data.UserData.PlaybackPositionTicks, - )}{" "} - left - - -
- )} - - {item.data.Taglines[0] ?? ""} - - -
- +
{
{collectionItems.data.TotalRecordCount > 0 && ( - + {collectionItems.data.Items.map((similar, index) => { return ( { {similarItems.data.TotalRecordCount > 0 && ( {similarItems.data.Items.map((similar, index) => { @@ -470,14 +443,14 @@ const BoxSetTitlePage = () => { similar.Type === BaseItemKind.Episode ? `S${similar.ParentIndexNumber}:E${similar.IndexNumber} - ${similar.Name}` : similar.Type === BaseItemKind.Series - ? `${similar.ProductionYear} - ${ + ? `${similar.ProductionYear} - ${ similar.EndDate ? new Date(similar.EndDate).toLocaleString([], { year: "numeric", - }) + }) : "Present" - }` - : similar.ProductionYear + }` + : similar.ProductionYear } cardType={ similar.Type === BaseItemKind.MusicAlbum || diff --git a/src/routes/episode/episode.module.scss b/src/routes/episode/episode.module.scss index 67bd987..c846919 100644 --- a/src/routes/episode/episode.module.scss +++ b/src/routes/episode/episode.module.scss @@ -1,11 +1,16 @@ - +$cardWidth: 30%; .item-episode.item { gap: 1em; .item-hero { height: 50vh; gap: 2em; + row-gap: 1.2em; position: relative; - align-items: center; + align-items: flex-end; + margin-bottom: 1em; + display: grid; + grid-template-columns: $cardWidth 1fr; + grid-template-rows: 1fr auto; &-image { opacity: 0; width: 100%; @@ -16,13 +21,11 @@ max-height: 100%; overflow: hidden; border-radius: $border-radius-default; - width: fit-content; box-shadow: $shadow-card; flex-grow: 1; flex-shrink: 0; position: relative; - width: 26% !important; - max-width: 26% !important; + width: 100%; } &-blurhash { position: absolute !important; @@ -30,9 +33,19 @@ height: 100% !important; z-index: -1; } + &-icon { + background: linear-gradient(45deg, rgb(255 255 255 / 0.05), rgb(255 255 255 / 0.15)); + height: 100%; + display: flex; + align-items: center; + justify-content: center; + .material-symbols-rounded{ + font-size: 4em; + } + } } &-logo { - max-width: 42rem; + max-width: 34rem; max-height: 10rem; opacity: 0; transition: opacity $transition-time-default; @@ -41,14 +54,18 @@ &-detail { width: 100%; align-items: flex-start; + gap: 0.2em; justify-content: end; - gap: 0.5em; } &-buttons { &-container { align-items: center; justify-content: space-between; width: 100%; + grid-column: 1/3; + display: grid; + grid-template-columns: inherit; + gap: 2em; } } &-backdrop { @@ -64,7 +81,7 @@ top: -4.4em; left: -$page-margin; width: 100vw; - height: calc(50vh + 4.4em); + height: calc(44vh + 4.4em); z-index: -1; mask-image: linear-gradient(to top, transparent, black); -webkit-mask-image: linear-gradient( @@ -74,14 +91,17 @@ ); } } + & .play-button { + width: 100% !important; + } } .item-detail { display: grid; - grid-template-columns: 1fr 5px 35%; + grid-template-columns: 1fr 35%; justify-items: center; align-items: start; - gap: 1em; + gap: 3em; &-cast { &-container { diff --git a/src/routes/episode/index.jsx b/src/routes/episode/index.jsx index c5298a8..d1b1090 100644 --- a/src/routes/episode/index.jsx +++ b/src/routes/episode/index.jsx @@ -280,7 +280,7 @@ const EpisodeTitlePage = () => { className="scrollY padded-top flex flex-column item item-episode" ref={pageRef} > -
+
{item.data.BackdropImageTags ? ( { /> ) : ( - <> +
+ {getTypeIcon(item.data.Type)} +
)}
-
- +
+ {item.data.ParentLogoItemId.length > 0 ? ( {item.data.SeriesName} { item.data.SeriesName )} - + S{item.data.ParentIndexNumber ?? 0}:E - {item.data.IndexNumber} {item.data.Name} + {item.data.IndexNumberEnd + ? `${item.data.IndexNumber ?? 0} / ${ + item.data.IndexNumberEnd ?? 0 + }` + : `${item.data.IndexNumber ?? 0}`}{" "} + {item.data.Name} - - {!!qualityLabel() && ( - - )} - {!!surroundSoundLabel() && ( - - {surroundSoundLabel()} - - } - sx={{ - borderRadius: "8px !important", - "& .MuiChip-label": { - fontSize: "2.2em", - }, - }} - /> - )} - {!!videoTracks[0]?.VideoRangeType && ( - - {videoTracks[0].VideoRangeType} - - } - sx={{ - borderRadius: "8px !important", - "& .MuiChip-label": { - fontSize: "2.2em", - }, - }} - /> - )} - {!!atmosLabel() && ( - - Dolby - {atmosLabel()} - - } - sx={{ - borderRadius: "8px !important", - "& .MuiChip-label": { - fontSize: "2.2em", - }, - }} - /> - )} - {!!subtitleTracks.length > 0 && ( - - // CC - // - - closed_caption - - } - sx={{ - borderRadius: "8px !important", - "& .MuiChip-label": { - fontSize: "2.2em", - }, - }} - /> - )} - - - {item.data.ProductionYear ?? ""} - + {item.data.PremiereDate && ( + + {item.data.ProductionYear ?? ""} + + )} {item.data.OfficialRating && ( - + )} {item.data.CommunityRating && ( @@ -484,12 +403,10 @@ const EpisodeTitlePage = () => { className="hero-carousel-info-rating" >
star @@ -498,7 +415,7 @@ const EpisodeTitlePage = () => { style={{ opacity: "0.8", }} - variant="subtitle1" + variant="subtitle2" > {Math.round(item.data.CommunityRating * 10) / 10} @@ -514,12 +431,10 @@ const EpisodeTitlePage = () => { className="hero-carousel-info-rating" >
50 ? green[400] : red[400], - fontVariationSettings: - '"FILL" 1, "wght" 300, "GRAD" 25, "opsz" 40', }} > {item.data.CriticRating > 50 ? "thumb_up" : "thumb_down"} @@ -528,7 +443,7 @@ const EpisodeTitlePage = () => { style={{ opacity: "0.8", }} - variant="subtitle1" + variant="subtitle2" > {item.data.CriticRating} @@ -536,163 +451,60 @@ const EpisodeTitlePage = () => { )} {item.data.RunTimeTicks && ( - + {getRuntime(item.data.RunTimeTicks)} )} {item.data.RunTimeTicks && ( - + {endsAt( item.data.RunTimeTicks - item.data.UserData.PlaybackPositionTicks, )} )} + + {item.data.Genres?.slice(0, 4).join(" / ")} + - - {item.data.Genres.join(", ")} - - -
-
- -
-
- - - -
+
+
+
+ +
+
+ + +
-
- {item.data.UserData.PlaybackPositionTicks > 0 && ( -
- - {getRuntime( - item.data.RunTimeTicks - - item.data.UserData.PlaybackPositionTicks, - )}{" "} - left - - -
- )} - - {item.data.Taglines[0] ?? ""} - - - {writers.length > 0 && ( -
- - Written by - -
- {writers.map((writer, index) => ( - <> - - {writer.Name} - - {index !== writers.length - 1 && ( - - ,{" "} - - )} - - ))} -
-
- )} - {directors.length > 0 && ( -
- - Directed by - -
- {directors.map((director, index) => ( - <> - - {director.Name} - - {index !== directors.length - 1 && ( - - ,{" "} - - )} - - ))} -
-
- )} -
- +
{ className="scrollY padded-top flex flex-column item item-default" ref={pageRef} > -
+
- {item.data.BackdropImageTags ? ( + {item.data.BackdropImageTags?.length ? ( { }} /> ) : ( - <> + { + e.currentTarget.style.opacity = 1; + }} + style={{ + y: parallax, + }} + /> )}
{ /> ) : ( - <> +
+ {getTypeIcon(item.data.Type)} +
)}
@@ -380,120 +392,27 @@ const ItemDetail = () => { className="item-hero-logo" /> ) : ( - {item.data.Name} + + {item.data.Name} + )} - - {!!qualityLabel() && ( - - )} - {!!surroundSoundLabel() && ( - - {surroundSoundLabel()} - - } - sx={{ - borderRadius: "8px !important", - "& .MuiChip-label": { - fontSize: "2.2em", - }, - }} - /> - )} - {!!videoTracks[0]?.VideoRangeType && ( - - {videoTracks[0].VideoRangeType} - - } - sx={{ - borderRadius: "8px !important", - "& .MuiChip-label": { - fontSize: "2.2em", - }, - }} - /> - )} - {!!atmosLabel() && ( - - Dolby - {atmosLabel()} - - } - sx={{ - borderRadius: "8px !important", - "& .MuiChip-label": { - fontSize: "2.2em", - }, - }} - /> - )} - {!!subtitleTracks.length > 0 && ( - - // CC - // - - subtitles - - } - sx={{ - borderRadius: "8px !important", - "& .MuiChip-label": { - fontSize: "2.2em", - }, - }} - /> - )} - - - {item.data.ProductionYear ?? ""} - + {item.data.PremiereDate && ( + + {item.data.ProductionYear ?? ""} + + )} {item.data.OfficialRating && ( - + )} {item.data.CommunityRating && ( @@ -518,7 +437,7 @@ const ItemDetail = () => { style={{ opacity: "0.8", }} - variant="subtitle1" + variant="subtitle2" > {Math.round(item.data.CommunityRating * 10) / 10} @@ -546,7 +465,7 @@ const ItemDetail = () => { style={{ opacity: "0.8", }} - variant="subtitle1" + variant="subtitle2" > {item.data.CriticRating} @@ -554,26 +473,32 @@ const ItemDetail = () => { )} {item.data.RunTimeTicks && ( - + {getRuntime(item.data.RunTimeTicks)} )} {item.data.RunTimeTicks && ( - + {endsAt( item.data.RunTimeTicks - item.data.UserData.PlaybackPositionTicks, )} )} + + {item.data.Genres?.slice(0, 4).join(" / ")} + - - {item.data.Genres.join(", ")} -
-
-
+
+
{ currentAudioTrack={selectedAudioTrack} currentSubTrack={selectedSubtitleTrack} userId={user.data.Id} - sx={{ - background: "hsl(195.56deg 29.03% 18.24%) !important", + buttonProps={{ + fullWidth: true, }} />
@@ -610,36 +535,11 @@ const ItemDetail = () => {
- {item.data.UserData.PlaybackPositionTicks > 0 && ( -
- - {getRuntime( - item.data.RunTimeTicks - - item.data.UserData.PlaybackPositionTicks, - )}{" "} - left - - -
- )}
-
{ className="scrollY padded-top item item-person flex flex-column" ref={pageRef} > -
+
{ )}
- {item.data.Name} + + {item.data.Name} + { ))}
-
{ > {item.data.PremiereDate && ( <> - Born - + Birth + {new Date(item.data.PremiereDate).toDateString()} )} {item.data.EndDate && ( <> - + Death - + {new Date(item.data.EndDate).toDateString()} @@ -424,7 +425,7 @@ const PersonTitlePage = () => { tab.title === "Movies" || tab.title === "TV Shows" || tab.title === "Books" - ? "col-8" + ? "col-7" : "col-4" }`} key={tab.queryKey} @@ -460,16 +461,16 @@ const PersonTitlePage = () => { tabitem.Type === BaseItemKind.Episode ? `S${tabitem.ParentIndexNumber}:E${tabitem.IndexNumber} - ${tabitem.Name}` : tabitem.Type === BaseItemKind.Series - ? `${tabitem.ProductionYear} - ${ + ? `${tabitem.ProductionYear} - ${ tabitem.EndDate ? new Date( tabitem.EndDate, - ).toLocaleString([], { + ).toLocaleString([], { year: "numeric", - }) + }) : "Present" - }` - : tabitem.ProductionYear + }` + : tabitem.ProductionYear } cardType={ tabitem.Type === BaseItemKind.Episode diff --git a/src/routes/person/person.module.scss b/src/routes/person/person.module.scss index fc7e5e9..735cc43 100644 --- a/src/routes/person/person.module.scss +++ b/src/routes/person/person.module.scss @@ -1,4 +1,4 @@ - +$cardWidth: 18%; .item-detail-person { &-container { position: relative; @@ -13,8 +13,8 @@ } } -.col-8 { - grid-template-columns: repeat(8, minmax(0, 1fr)); +.col-7 { + grid-template-columns: repeat(7, minmax(0, 1fr)); } .col-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); @@ -25,8 +25,13 @@ .item-hero { height: 50vh; gap: 2em; + row-gap: 1.2em; position: relative; - align-items: center; + align-items: flex-end; + margin-bottom: 1em; + display: grid; + grid-template-columns: $cardWidth 1fr; + grid-template-rows: 1fr auto; &-image { opacity: 0; width: 100%; @@ -41,7 +46,7 @@ flex-grow: 1; flex-shrink: 0; position: relative; - width: 18% !important; + width: 100%; } &-blurhash { position: absolute !important; @@ -49,18 +54,29 @@ height: 100% !important; z-index: -1; } + &-icon { + background: linear-gradient(45deg, rgb(255 255 255 / 0.05), rgb(255 255 255 / 0.15)); + height: 100%; + display: flex; + align-items: center; + justify-content: center; + .material-symbols-rounded{ + font-size: 4em; + } + } } &-logo { - max-width: 42rem; + max-width: 34rem; max-height: 10rem; opacity: 0; transition: opacity $transition-time-default; object-position: bottom; + margin-bottom: 2em; } &-detail { width: 100%; align-items: flex-start; - gap: 1em; + gap: 0.2em; justify-content: end; } &-buttons { @@ -68,6 +84,10 @@ align-items: center; justify-content: space-between; width: 100%; + grid-column: 1/3; + display: grid; + grid-template-columns: inherit; + gap: 2em; } } &-backdrop { @@ -83,25 +103,29 @@ top: -4.4em; left: -$page-margin; width: 100vw; - height: calc(50vh + 4.4em); + height: calc(44vh + 4.4em); z-index: -1; mask-image: linear-gradient(to top, transparent, black); -webkit-mask-image: linear-gradient( - to top, - transparent, - black + to top, + transparent, + black ); } } + & .play-button { + width: 100% !important; + } } - + + .item-detail { display: grid; - grid-template-columns: 1fr 5px 35%; + grid-template-columns: 1fr 35%; justify-items: center; align-items: start; - gap: 1em; - + gap: 3em; + &-cast { &-container { display: flex; diff --git a/src/routes/player/videoPlayer.module.scss b/src/routes/player/videoPlayer.module.scss index be9b116..eef5152 100644 --- a/src/routes/player/videoPlayer.module.scss +++ b/src/routes/player/videoPlayer.module.scss @@ -60,12 +60,16 @@ video { height: 100vh; top: 0; left: 0; + cursor: none; display: flex; flex-direction: column; align-self: stretch; justify-content: space-between; padding: 1em 2em; background: linear-gradient(to top, rgb(0 0 0 / 0.7) 5vh, transparent 26vh 90vh, rgb(0 0 0 / 0.7)); + &.hovering{ + cursor: default; + } &-controls{ &-progress{ display: flex; diff --git a/src/routes/player/videoPlayer.tsx b/src/routes/player/videoPlayer.tsx index 30ec279..7110c7d 100644 --- a/src/routes/player/videoPlayer.tsx +++ b/src/routes/player/videoPlayer.tsx @@ -1156,7 +1156,11 @@ const VideoPlayer = () => { )} {
- setShowVolumeControl(false)} + onMouseLeave={() => setShowVolumeControl(false)} > - {muted ? 0 : Math.round(volume*100)} - { - setVolume(newVal); - if (newVal === 0) setMuted(true) - else setMuted(false) - }} /> + + {muted ? 0 : Math.round(volume * 100)} + + { + setVolume(newVal); + if (newVal === 0) setMuted(true); + else setMuted(false); + }} + /> - setMuted((state) => !state)} onMouseMoveCapture={() => { - setShowVolumeControl(true) - }}> - {muted ? "volume_off" : - volume < 0.4 ? "volume_down" : - "volume_up"} + setMuted((state) => !state)} + onMouseMoveCapture={() => { + setShowVolumeControl(true); + }} + > + + {muted + ? "volume_off" + : volume < 0.4 + ? "volume_down" + : "volume_up"} + setShowSubtitles((state) => !state)}> diff --git a/src/routes/series/index.tsx b/src/routes/series/index.tsx index 5dcb919..2dbc88e 100644 --- a/src/routes/series/index.tsx +++ b/src/routes/series/index.tsx @@ -359,10 +359,9 @@ const SeriesTitlePage = () => { className="scrollY padded-top flex flex-column item item-series" ref={pageRef} > -
+
- {item.data.BackdropImageTags ? ( { src={backdropImage} className="item-hero-backdrop" initial={{ - opacity: 0 + opacity: 0, }} onLoad={() => { - setBackdropImageLoaded(true) + setBackdropImageLoaded(true); }} animate={{ - opacity: backdropImageLoaded ? 1 : 0 + opacity: backdropImageLoaded ? 1 : 0, }} exit={{ - opacity: 0 + opacity: 0, }} transition={{ - duration: 0.2 + duration: 0.2, }} style={{ y: parallax, @@ -404,7 +403,7 @@ const SeriesTitlePage = () => { { <> )}
-
+
{Object.keys(item.data.ImageTags).includes("Logo") ? ( {item.data.Name} { className="item-hero-logo" /> ) : ( - {item.data.Name} + + {item.data.Name} + )} { justifyItems="flex-start" alignItems="center" > - + {item.data.ProductionYear ?? ""} {item.data.Status === "Continuing" ? " - Present" : item.data.EndDate && - ` - ${new Date(item.data.EndDate).getFullYear()}`} + ` - ${new Date(item.data.EndDate).getFullYear()}`} + + {seasons.data?.TotalRecordCount && ( + + {seasons.data.TotalRecordCount > 1 + ? `${seasons.data.TotalRecordCount} Seasons` + : `${seasons.data.TotalRecordCount} Season`} + + )} + {item.data.OfficialRating && ( - + )} {item.data.CommunityRating && ( @@ -469,12 +483,10 @@ const SeriesTitlePage = () => { className="hero-carousel-info-rating" >
star @@ -483,7 +495,7 @@ const SeriesTitlePage = () => { style={{ opacity: "0.8", }} - variant="subtitle1" + variant="subtitle2" > {Math.round(item.data.CommunityRating * 10) / 10} @@ -499,12 +511,10 @@ const SeriesTitlePage = () => { className="hero-carousel-info-rating" >
50 ? green[400] : red[400], - fontVariationSettings: - '"FILL" 1, "wght" 300, "GRAD" 25, "opsz" 40', }} > {item.data.CriticRating > 50 ? "thumb_up" : "thumb_down"} @@ -513,72 +523,72 @@ const SeriesTitlePage = () => { style={{ opacity: "0.8", }} - variant="subtitle1" + variant="subtitle2" > {item.data.CriticRating}
)} - {seasons.data?.TotalRecordCount && ( - - {seasons.data.TotalRecordCount > 1 - ? `${seasons.data.TotalRecordCount} Seasons` - : `${seasons.data.TotalRecordCount} Season`} - - )} - {item.data.RunTimeTicks && ( - + {getRuntime(item.data.RunTimeTicks)} )} {item.data.RunTimeTicks && ( - + {endsAt( item.data.RunTimeTicks - - item.data.UserData.PlaybackPositionTicks, + item.data.UserData.PlaybackPositionTicks, )} )} + + {item.data.Genres?.slice(0, 5).join(" / ")} + - - {item.data.Genres.join(", ")} - +
-
-
- -
-
- - - -
+
+
+ +
+
+ + +
@@ -594,7 +604,7 @@ const SeriesTitlePage = () => { {getRuntime( item.data.RunTimeTicks - - item.data.UserData.PlaybackPositionTicks, + item.data.UserData.PlaybackPositionTicks, )}{" "} left @@ -698,7 +708,6 @@ const SeriesTitlePage = () => { ))}
-
{ cardCaption={episode.Overview} imageBlurhash={ episode.ImageBlurHashes?.Primary[ - Object.keys(episode.ImageBlurHashes.Primary)[0] + Object.keys(episode.ImageBlurHashes.Primary)[0] ] } queryKey={[ @@ -1010,9 +1019,10 @@ const SeriesTitlePage = () => {
- {episodes.isPending - ? - : episodes.data.Items.map((episode, index) => { + {episodes.isPending ? ( + + ) : ( + episodes.data.Items.map((episode, index) => { return ( <> { ); - })} + }) + )}
)} {specialFeatures.isSuccess && specialFeatures.data.length > 0 && ( {specialFeatures.data.map((special) => { @@ -1188,11 +1199,11 @@ const SeriesTitlePage = () => { imageBlurhash={ !!special.ImageBlurHashes?.Primary && special.ImageBlurHashes.Primary[ - Object.keys(special.ImageBlurHashes.Primary)[0] + Object.keys(special.ImageBlurHashes.Primary)[0] ] } userId={user.data.Id} - onClick={() => { }} + onClick={() => {}} /> ); })} @@ -1201,7 +1212,7 @@ const SeriesTitlePage = () => { {similarItems.data.TotalRecordCount > 0 && ( {similarItems.data.Items.map((similar) => { @@ -1220,17 +1231,18 @@ const SeriesTitlePage = () => { similar.Type === BaseItemKind.Episode ? `S${similar.ParentIndexNumber}:E${similar.IndexNumber} - ${similar.Name}` : similar.Type === BaseItemKind.Series - ? `${similar.ProductionYear} - ${similar.EndDate - ? new Date(similar.EndDate).toLocaleString([], { - year: "numeric", - }) - : "Present" - }` + ? `${similar.ProductionYear} - ${ + similar.EndDate + ? new Date(similar.EndDate).toLocaleString([], { + year: "numeric", + }) + : "Present" + }` : similar.ProductionYear } cardType={ similar.Type === BaseItemKind.MusicAlbum || - similar.Type === BaseItemKind.Audio + similar.Type === BaseItemKind.Audio ? "square" : "portrait" } @@ -1239,7 +1251,7 @@ const SeriesTitlePage = () => { imageBlurhash={ !!similar.ImageBlurHashes?.Primary && similar.ImageBlurHashes?.Primary[ - Object.keys(similar.ImageBlurHashes.Primary)[0] + Object.keys(similar.ImageBlurHashes.Primary)[0] ] } /> diff --git a/src/routes/series/series.module.scss b/src/routes/series/series.module.scss index 10d5a09..f746d7c 100644 --- a/src/routes/series/series.module.scss +++ b/src/routes/series/series.module.scss @@ -1,10 +1,17 @@ +$cardWidth: 18%; + .item-series.item { gap: 1em; - .item-hero { - height: 50vh; + .item-hero { + height: 60vh; gap: 2em; + row-gap: 1.2em; position: relative; - align-items: center; + align-items: flex-end; + margin-bottom: 1em; + display: grid; + grid-template-columns: $cardWidth 1fr; + grid-template-rows: 1fr auto; &-image { opacity: 0; width: 100%; @@ -15,12 +22,11 @@ max-height: 100%; overflow: hidden; border-radius: $border-radius-default; - width: fit-content; box-shadow: $shadow-card; flex-grow: 1; flex-shrink: 0; position: relative; - width: 18% !important; + width: 100%; } &-blurhash { position: absolute !important; @@ -30,16 +36,17 @@ } } &-logo { - max-width: 42rem; + max-width: 34rem; max-height: 10rem; opacity: 0; transition: opacity $transition-time-default; object-position: bottom; + margin-bottom: 2em; } &-detail { width: 100%; align-items: flex-start; - gap: 1em; + gap: 0.2em; justify-content: end; } &-buttons { @@ -47,6 +54,10 @@ align-items: center; justify-content: space-between; width: 100%; + grid-column: 1/3; + display: grid; + grid-template-columns: inherit; + gap: 2em; } } &-backdrop { @@ -62,7 +73,7 @@ top: -4.4em; left: -$page-margin; width: 100vw; - height: calc(50vh + 4.4em); + height: calc(54vh + 4.4em); z-index: -1; mask-image: linear-gradient(to top, transparent, black); -webkit-mask-image: linear-gradient( @@ -72,14 +83,17 @@ ); } } + & .play-button { + width: 100% !important; + } } .item-detail { display: grid; - grid-template-columns: 1fr 5px 35%; + grid-template-columns: 1fr 35%; justify-items: center; align-items: start; - gap: 1em; + gap: 3em; &-nextUp { max-width: 23em; @@ -194,7 +208,7 @@ position: absolute; top: 0; right: 0; - border: 0.85em solid #00c853; + border: 0.65em solid #00c853; border-bottom-color: transparent; border-left-color: transparent; opacity: 0; diff --git a/src/styles/global.scss b/src/styles/global.scss index 7053d93..72f4b72 100644 --- a/src/styles/global.scss +++ b/src/styles/global.scss @@ -284,4 +284,8 @@ h1 { @function neg($var) { @return $var * -1; +} + +.fullWidth { + width: 100%; } \ No newline at end of file diff --git a/src/styles/variables.scss b/src/styles/variables.scss index 3742974..c866832 100644 --- a/src/styles/variables.scss +++ b/src/styles/variables.scss @@ -21,7 +21,7 @@ $clr-gradient-dark: linear-gradient( $clr-secondary-dark ); -$border-radius-default: 6px; +$border-radius-default: 8px; $border-radius_04: 4px; $transition-time-default: 250ms; diff --git a/src/theme.js b/src/theme.js index 8488b3a..d0495d2 100644 --- a/src/theme.js +++ b/src/theme.js @@ -6,7 +6,8 @@ import { clrBackgroundLight, clrSecondaryDefault, } from "./palette.module.scss"; - +const { palette } = createTheme({}); +const { augmentColor } = palette; export const theme = createTheme({ palette: { primary: { @@ -24,9 +25,8 @@ export const theme = createTheme({ default: clrBackgroundDefault, paper: clrBackgroundDark, }, - white: { - main: "#ffffff", - }, + white: augmentColor({ color: { main: "#ffffff" } }), + black: augmentColor({ color: { main: "#000" } }), mode: "dark", }, typography: { diff --git a/src/utils/store/playback.ts b/src/utils/store/playback.ts index 1d69938..d24eb4b 100644 --- a/src/utils/store/playback.ts +++ b/src/utils/store/playback.ts @@ -159,6 +159,24 @@ export const playItem = ( availableSubtitleTracks, mediaSourceId ) => { + console.log({ + itemName, + episodeTitle, + mediaSource: { + videoTrack, + audioTrack, + subtitleTrack, + container, + availableSubtitleTracks, + id: mediaSourceId, + }, + enableSubtitle, + hlsStream, + userId, + startPosition, + itemDuration, + item, + }); usePlaybackStore.setState({ itemName, episodeTitle,