Skip to content
This repository has been archived by the owner on Sep 20, 2023. It is now read-only.

Commit

Permalink
Fix Premiere Logic
Browse files Browse the repository at this point in the history
  • Loading branch information
PrestonN committed Oct 9, 2020
1 parent eb921ac commit bd29d31
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion app/helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ class YoutubeGrabberHelper {
}

let title = video.title.simpleText
const statusRenderer = video.thumbnailOverlays[0].thumbnailOverlayTimeStatusRenderer

if (typeof (title) === 'undefined') {
title = video.title.runs[0].text
Expand All @@ -87,7 +88,7 @@ class YoutubeGrabberHelper {
publishedText = 'Live'
viewCount = parseInt(video.shortViewCountText.runs[0].text)
viewCountText = video.shortViewCountText.runs[0].text + video.shortViewCountText.runs[1].text
} else if (typeof (video.thumbnailOverlays[0].thumbnailOverlayTimeStatusRenderer) !== 'undefined' && video.thumbnailOverlays[0].thumbnailOverlayTimeStatusRenderer.text.simpleText === 'PREMIERE') {
} else if (typeof (statusRenderer) !== 'undefined' && typeof (statusRenderer.text) !== 'undefined' && typeof (statusRenderer.text.runs) !== 'undefined') {
premiere = true
durationText = 'PREMIERE'
viewCount = 0
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "yt-channel-info",
"version": "1.1.3",
"version": "1.1.4",
"description": "Grab YouTube channel information without any official API",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit bd29d31

Please sign in to comment.