mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-11 10:31:47 +00:00
fix: add workaround for podcast type video (#1362)
This commit is contained in:
@ -137,6 +137,12 @@ export default () => {
|
|||||||
data.videoDetails.album = videoData?.Hd?.playerOverlays?.playerOverlayRenderer?.browserMediaSession?.browserMediaSessionRenderer?.album.runs?.at(0)?.text;
|
data.videoDetails.album = videoData?.Hd?.playerOverlays?.playerOverlayRenderer?.browserMediaSession?.browserMediaSessionRenderer?.album.runs?.at(0)?.text;
|
||||||
data.videoDetails.elapsedSeconds = 0;
|
data.videoDetails.elapsedSeconds = 0;
|
||||||
data.videoDetails.isPaused = false;
|
data.videoDetails.isPaused = false;
|
||||||
|
|
||||||
|
// HACK: This is a workaround for "podcast" type video. GREAT JOB GOOGLE.
|
||||||
|
if (data.playabilityStatus.transportControlsConfig) {
|
||||||
|
data.videoDetails.author = data.microformat.microformatDataRenderer.pageOwnerDetails.name;
|
||||||
|
}
|
||||||
|
|
||||||
ipcRenderer.send('video-src-changed', data);
|
ipcRenderer.send('video-src-changed', data);
|
||||||
}
|
}
|
||||||
}, { once: true, passive: true });
|
}, { once: true, passive: true });
|
||||||
|
|||||||
@ -217,6 +217,17 @@ export interface PlayabilityStatus {
|
|||||||
audioOnlyPlayability: AudioOnlyPlayability;
|
audioOnlyPlayability: AudioOnlyPlayability;
|
||||||
miniplayer: Miniplayer;
|
miniplayer: Miniplayer;
|
||||||
contextParams: string;
|
contextParams: string;
|
||||||
|
transportControlsConfig?: TransportControlsConfig;
|
||||||
|
}
|
||||||
|
|
||||||
|
type ReplaceDefaultType = {
|
||||||
|
replaceDefault: boolean,
|
||||||
|
};
|
||||||
|
|
||||||
|
export interface TransportControlsConfig {
|
||||||
|
seekForwardStatus: ReplaceDefaultType;
|
||||||
|
seekBackwardStatus: ReplaceDefaultType;
|
||||||
|
playbackRateStatus: ReplaceDefaultType;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface AudioOnlyPlayability {
|
export interface AudioOnlyPlayability {
|
||||||
|
|||||||
Reference in New Issue
Block a user