Skip to content

Commit

Permalink
特定条件で曲名末尾ライセンス情報を無視する (#751)
Browse files Browse the repository at this point in the history
  • Loading branch information
yagamuu authored Aug 9, 2024
1 parent 5407b96 commit 02868bb
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
7 changes: 6 additions & 1 deletion configschema.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,12 @@
"additionalProperties": false,
"properties": {
"textPrefix": {"type": "string", "default": ""},
"textSuffix": {"type": "string", "default": ""}
"textSuffix": {"type": "string", "default": ""},
"removeMusicSuffix": {
"type": "array",
"items": {"type": "string"},
"default": []
}
}
},
"googleApiKey": {"type": "string"},
Expand Down
8 changes: 7 additions & 1 deletion src/browser/graphics/components/music.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,15 @@ import {ThinText} from "./lib/text";

export const Music = () => {
const playingMusic = useReplicant("playing-music");
const isRemoveMusicSuffix =
nodecg.bundleConfig.music?.removeMusicSuffix?.some((music) =>
playingMusic?.includes(music),
);
const text = `${
nodecg.bundleConfig.music?.textPrefix ?? ""
} ${playingMusic} ${nodecg.bundleConfig.music?.textSuffix ?? ""}`;
} ${playingMusic} ${
!isRemoveMusicSuffix ? nodecg.bundleConfig.music?.textSuffix ?? "" : ""
}`;
const ref = useRef<HTMLDivElement>(null);
const [shownText, setShownText] = useState("");

Expand Down

0 comments on commit 02868bb

Please sign in to comment.