Use WIP branch for Search and playlists

This commit is contained in:
Preston 2020-11-28 19:08:39 -05:00
parent 4dbf131669
commit fdb258b4e3
3 changed files with 41 additions and 26 deletions

47
package-lock.json generated
View File

@ -18478,9 +18478,9 @@
"integrity": "sha512-MH9xq4gxR54oktdPnkMXftKJ7aqp3iCDURKjEg/5NBoCPsOZUGFMtyAaVUBVNQsoAg1Dd0vxEPinbC/aJa/InQ==" "integrity": "sha512-MH9xq4gxR54oktdPnkMXftKJ7aqp3iCDURKjEg/5NBoCPsOZUGFMtyAaVUBVNQsoAg1Dd0vxEPinbC/aJa/InQ=="
}, },
"ytdl-core": { "ytdl-core": {
"version": "4.0.6", "version": "4.1.0",
"resolved": "https://registry.npmjs.org/ytdl-core/-/ytdl-core-4.0.6.tgz", "resolved": "https://registry.npmjs.org/ytdl-core/-/ytdl-core-4.1.0.tgz",
"integrity": "sha512-QFFtwaY3D8FErr3kM71zpQlUzONabyzZrhNpO3b/Ies9Z+4hKI4zuM8AGPG5nOW0PKkyCXscKPW9K4CzPuhUkA==", "integrity": "sha512-W/iiX3Wtd+qEnIfm9BRe66hvzuTX5kOss1jgTuuVGUjOBqtSJOvzkffCaDkSW0xwXCB+iGs2k7zsgisbYkpVNw==",
"requires": { "requires": {
"html-entities": "^1.3.1", "html-entities": "^1.3.1",
"m3u8stream": "^0.8.2", "m3u8stream": "^0.8.2",
@ -18489,18 +18489,18 @@
}, },
"dependencies": { "dependencies": {
"m3u8stream": { "m3u8stream": {
"version": "0.8.2", "version": "0.8.3",
"resolved": "https://registry.npmjs.org/m3u8stream/-/m3u8stream-0.8.2.tgz", "resolved": "https://registry.npmjs.org/m3u8stream/-/m3u8stream-0.8.3.tgz",
"integrity": "sha512-UxOH/35QF12fnqdP8pQ3CJ2SLpjSl32DSSnC0kLdqUBkVgwvWfMIY1X816KC4Ulyzf/tZy8OYijqvdTQMiKurg==", "integrity": "sha512-0nAcdrF8YJKUkb6PzWdvGftTPyCVWgoiot1AkNVbPKTeIGsWs6DrOjifrJ0Zi8WQfQmD2SuVCjkYIOip12igng==",
"requires": { "requires": {
"miniget": "^4.0.0", "miniget": "^4.0.0",
"sax": "^1.2.4" "sax": "^1.2.4"
} }
}, },
"miniget": { "miniget": {
"version": "4.0.0", "version": "4.1.0",
"resolved": "https://registry.npmjs.org/miniget/-/miniget-4.0.0.tgz", "resolved": "https://registry.npmjs.org/miniget/-/miniget-4.1.0.tgz",
"integrity": "sha512-2ABQKSjxOqXcrHdD2yKM7G7VAlBkgMcgoFMlACJ4is6rAJtcB/LvvasJU43NqjoCnAGk72jFP/H6qCjWXwJwlA==" "integrity": "sha512-kzhrNv5L7LlomwGmPGQsLQ2PnT1LeJJWfB0wNFGyv426gEM1gsfziBQmfkr6XOBA8EusZg9nowlNT5CbuKTjZg=="
}, },
"sax": { "sax": {
"version": "1.2.4", "version": "1.2.4",
@ -18510,20 +18510,35 @@
} }
}, },
"ytpl": { "ytpl": {
"version": "1.0.1", "version": "2.0.0-alpha.1",
"resolved": "https://registry.npmjs.org/ytpl/-/ytpl-1.0.1.tgz", "resolved": "https://registry.npmjs.org/ytpl/-/ytpl-2.0.0-alpha.1.tgz",
"integrity": "sha512-v2TGepCZSoVYZAAPoHIz1Hr+auGBJb11npBY4PLAofAdQFlJMopGodmv3JENkW1ghxBW94CASfyOJ9bgpb+nEg==", "integrity": "sha512-YKHfoYV7jkC/PjvcJe+GfBC4KPl9sXSIcHW0B0/ohYyv+BLlykeV6fM3olzQ0rT6LGhUK3qPgitqui8Py9bveA==",
"requires": { "requires": {
"html-entities": "^1.3.1", "html-entities": "^1.3.1",
"miniget": "^2.0.1" "miniget": "^4.1.0"
},
"dependencies": {
"miniget": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/miniget/-/miniget-4.1.0.tgz",
"integrity": "sha512-kzhrNv5L7LlomwGmPGQsLQ2PnT1LeJJWfB0wNFGyv426gEM1gsfziBQmfkr6XOBA8EusZg9nowlNT5CbuKTjZg=="
}
} }
}, },
"ytsr": { "ytsr": {
"version": "github:TimeForANinja/node-ytsr#cc183ef883930dc6b3619a7bf9b4813d2675bace", "version": "2.0.0-alpha.3",
"from": "github:TimeForANinja/node-ytsr#wip-api-adjustments", "resolved": "https://registry.npmjs.org/ytsr/-/ytsr-2.0.0-alpha.3.tgz",
"integrity": "sha512-NELl/ubEnBxxU/AofsXu8p6T2BArf/ROLOocblTgeSr7oNPPn6jPv57MCT4cIWJdzxWiHcdl6BqrypoIPejfmw==",
"requires": { "requires": {
"html-entities": "^1.3.1", "html-entities": "^1.3.1",
"miniget": "^2.0.1" "miniget": "^4.1.0"
},
"dependencies": {
"miniget": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/miniget/-/miniget-4.1.0.tgz",
"integrity": "sha512-kzhrNv5L7LlomwGmPGQsLQ2PnT1LeJJWfB0wNFGyv426gEM1gsfziBQmfkr6XOBA8EusZg9nowlNT5CbuKTjZg=="
}
} }
}, },
"zip-stream": { "zip-stream": {

View File

@ -47,9 +47,9 @@
"yt-dash-manifest-generator": "^1.1.0", "yt-dash-manifest-generator": "^1.1.0",
"yt-trending-scraper": "^1.0.4", "yt-trending-scraper": "^1.0.4",
"yt-xml2vtt": "^1.1.3", "yt-xml2vtt": "^1.1.3",
"ytdl-core": "^4.0.6", "ytdl-core": "^4.1.0",
"ytpl": "^1.0.1", "ytpl": "^2.0.0-alpha.1",
"ytsr": "github:TimeForANinja/node-ytsr#wip-api-adjustments" "ytsr": "^2.0.0-alpha.3"
}, },
"description": "A private YouTube client", "description": "A private YouTube client",
"devDependencies": { "devDependencies": {

View File

@ -83,19 +83,19 @@ export default Vue.extend({
this.infoData = { this.infoData = {
id: result.id, id: result.id,
title: result.title, title: result.title,
description: result.description, description: result.description ? result.description : '',
randomVideoId: result.items[randomVideoIndex].id, randomVideoId: result.items[randomVideoIndex].id,
viewCount: result.views, viewCount: result.views,
videoCount: result.total_items, videoCount: result.estimated_items,
lastUpdated: result.last_updated, // lastUpdated: result.last_updated ? result.last_updated : '',
channelName: result.author.name, // channelName: result.author ? result.author.name : '',
channelThumbnail: result.author.avatar, // channelThumbnail: result.author ? result.author.avatar : '',
channelId: result.author.id, // channelId: result.author ? result.author.id : '',
infoSource: 'local' infoSource: 'local'
} }
this.playlistItems = result.items.map((video) => { this.playlistItems = result.items.map((video) => {
if (video.author !== null) { if (typeof video.author !== 'undefined') {
const channelName = video.author.name const channelName = video.author.name
const channelId = video.author.ref.replace(/https:\/\/(www\.)?youtube\.com\/(user|channel)\//g, '') const channelId = video.author.ref.replace(/https:\/\/(www\.)?youtube\.com\/(user|channel)\//g, '')
video.author = channelName video.author = channelName