mirror of
https://github.com/streamyfin/streamyfin.git
synced 2026-06-01 03:28:27 +01:00
Compare commits
1 Commits
fix/dedupe
...
cleanup/i1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9eb87d5dab |
@@ -37,20 +37,7 @@ export const ItemPeopleSections: React.FC<Props> = ({ item, ...props }) => {
|
||||
return { ...item, People: people } as BaseItemDto;
|
||||
}, [item, people]);
|
||||
|
||||
// Jellyfin can list the same person several times (e.g. an actor also
|
||||
// credited as writer). Dedupe by Id so the same actor section isn't rendered
|
||||
// twice and we still surface 3 distinct people.
|
||||
const topPeople = useMemo(() => {
|
||||
const seen = new Set<string>();
|
||||
const unique: BaseItemPerson[] = [];
|
||||
for (const person of people) {
|
||||
if (!person.Id || seen.has(person.Id)) continue;
|
||||
seen.add(person.Id);
|
||||
unique.push(person);
|
||||
if (unique.length >= 3) break;
|
||||
}
|
||||
return unique;
|
||||
}, [people]);
|
||||
const topPeople = useMemo(() => people.slice(0, 3), [people]);
|
||||
|
||||
const renderActorSection = useCallback(
|
||||
(person: BaseItemPerson, idx: number, total: number) => {
|
||||
|
||||
@@ -229,7 +229,7 @@ export const LibraryOptionsSheet: React.FC<Props> = ({
|
||||
/>
|
||||
</OptionGroup>
|
||||
|
||||
<OptionGroup title='Options'>
|
||||
<OptionGroup title={t("library.options.options_title")}>
|
||||
<ToggleItem
|
||||
label={t("library.options.show_titles")}
|
||||
value={settings.showTitles}
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { MpvPlayerViewProps } from "./MpvPlayer.types";
|
||||
|
||||
export default function MpvPlayerView(props: MpvPlayerViewProps) {
|
||||
const url = props.source?.url ?? "";
|
||||
const { t } = useTranslation();
|
||||
return (
|
||||
<div>
|
||||
<iframe
|
||||
title='MPV Player'
|
||||
title={t("player.mpv_player_title")}
|
||||
style={{ flex: 1 }}
|
||||
src={url}
|
||||
onLoad={() => props.onLoad?.({ nativeEvent: { url } })}
|
||||
|
||||
@@ -652,7 +652,8 @@
|
||||
"poster": "Poster",
|
||||
"cover": "Cover",
|
||||
"show_titles": "Show Titles",
|
||||
"show_stats": "Show Stats"
|
||||
"show_stats": "Show Stats",
|
||||
"options_title": "Options"
|
||||
},
|
||||
"filters": {
|
||||
"genres": "Genres",
|
||||
@@ -682,6 +683,7 @@
|
||||
},
|
||||
"player": {
|
||||
"live": "LIVE",
|
||||
"mpv_player_title": "MPV Player",
|
||||
"error": "Error",
|
||||
"failed_to_get_stream_url": "Failed to get the stream URL",
|
||||
"an_error_occured_while_playing_the_video": "An error occurred while playing the video. Check logs in settings.",
|
||||
|
||||
Reference in New Issue
Block a user