Skip to content

Commit

Permalink
fix: make checking for rental video language agnostic
Browse files Browse the repository at this point in the history
  • Loading branch information
fent committed Dec 3, 2020
1 parent 5073154 commit 32d2300
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/info.js
Expand Up @@ -95,7 +95,8 @@ const privateVideoError = player_response => {

const isRental = player_response => {
let playability = player_response.playabilityStatus;
return playability && playability.status === 'UNPLAYABLE' && /requires payment/.test(playability.reason);
return playability && playability.status === 'UNPLAYABLE' &&
playability.errorScreen && playability.errorScreen.playerLegacyDesktopYpcOfferRenderer;
};


Expand Down

0 comments on commit 32d2300

Please sign in to comment.