Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrews54757 committed Dec 5, 2023
1 parent 3b795d0 commit 151e3a3
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions chrome/player/players/yt/YTPlayer.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,13 @@ export default class YTPlayer extends DashPlayer {
}

try {
let videoInfo = await this.getVideoInfo(identifier);
this.videoInfo = videoInfo;
this.videoInfo = await this.getVideoInfo(identifier);

if (videoInfo.playability_status?.status === 'LOGIN_REQUIRED') {
videoInfo = await this.getVideoInfo(identifier, true);
if (this.videoInfo.playability_status?.status === 'LOGIN_REQUIRED') {
this.videoInfo = await this.getVideoInfo(identifier, true);
}

const manifest = await videoInfo.toDash((url) => {
const manifest = await this.videoInfo.toDash((url) => {
return url;
});
this.oldSource = source;
Expand Down Expand Up @@ -133,7 +132,7 @@ export default class YTPlayer extends DashPlayer {
clientType: tvMode ? ClientType.TV_EMBEDDED : ClientType.WEB,
});

return tvMode ? youtube.getBasicInfo(identifier, 'TV_EMBEDDED') : youtube.getInfo(identifier);
return youtube.getInfo(identifier, tvMode ? 'TV_EMBEDDED' : 'WEB');
}

fetchSponsorBlock(identifier) {
Expand Down

0 comments on commit 151e3a3

Please sign in to comment.