From fdb258b4e3dcad793df13cfba3de730232558d75 Mon Sep 17 00:00:00 2001 From: Preston Date: Sat, 28 Nov 2020 19:08:39 -0500 Subject: [PATCH] Use WIP branch for Search and playlists --- package-lock.json | 47 ++++++++++++++++--------- package.json | 6 ++-- src/renderer/views/Playlist/Playlist.js | 14 ++++---- 3 files changed, 41 insertions(+), 26 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7fd5bd04..30ce8c84 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18478,9 +18478,9 @@ "integrity": "sha512-MH9xq4gxR54oktdPnkMXftKJ7aqp3iCDURKjEg/5NBoCPsOZUGFMtyAaVUBVNQsoAg1Dd0vxEPinbC/aJa/InQ==" }, "ytdl-core": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/ytdl-core/-/ytdl-core-4.0.6.tgz", - "integrity": "sha512-QFFtwaY3D8FErr3kM71zpQlUzONabyzZrhNpO3b/Ies9Z+4hKI4zuM8AGPG5nOW0PKkyCXscKPW9K4CzPuhUkA==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ytdl-core/-/ytdl-core-4.1.0.tgz", + "integrity": "sha512-W/iiX3Wtd+qEnIfm9BRe66hvzuTX5kOss1jgTuuVGUjOBqtSJOvzkffCaDkSW0xwXCB+iGs2k7zsgisbYkpVNw==", "requires": { "html-entities": "^1.3.1", "m3u8stream": "^0.8.2", @@ -18489,18 +18489,18 @@ }, "dependencies": { "m3u8stream": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/m3u8stream/-/m3u8stream-0.8.2.tgz", - "integrity": "sha512-UxOH/35QF12fnqdP8pQ3CJ2SLpjSl32DSSnC0kLdqUBkVgwvWfMIY1X816KC4Ulyzf/tZy8OYijqvdTQMiKurg==", + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/m3u8stream/-/m3u8stream-0.8.3.tgz", + "integrity": "sha512-0nAcdrF8YJKUkb6PzWdvGftTPyCVWgoiot1AkNVbPKTeIGsWs6DrOjifrJ0Zi8WQfQmD2SuVCjkYIOip12igng==", "requires": { "miniget": "^4.0.0", "sax": "^1.2.4" } }, "miniget": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/miniget/-/miniget-4.0.0.tgz", - "integrity": "sha512-2ABQKSjxOqXcrHdD2yKM7G7VAlBkgMcgoFMlACJ4is6rAJtcB/LvvasJU43NqjoCnAGk72jFP/H6qCjWXwJwlA==" + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/miniget/-/miniget-4.1.0.tgz", + "integrity": "sha512-kzhrNv5L7LlomwGmPGQsLQ2PnT1LeJJWfB0wNFGyv426gEM1gsfziBQmfkr6XOBA8EusZg9nowlNT5CbuKTjZg==" }, "sax": { "version": "1.2.4", @@ -18510,20 +18510,35 @@ } }, "ytpl": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/ytpl/-/ytpl-1.0.1.tgz", - "integrity": "sha512-v2TGepCZSoVYZAAPoHIz1Hr+auGBJb11npBY4PLAofAdQFlJMopGodmv3JENkW1ghxBW94CASfyOJ9bgpb+nEg==", + "version": "2.0.0-alpha.1", + "resolved": "https://registry.npmjs.org/ytpl/-/ytpl-2.0.0-alpha.1.tgz", + "integrity": "sha512-YKHfoYV7jkC/PjvcJe+GfBC4KPl9sXSIcHW0B0/ohYyv+BLlykeV6fM3olzQ0rT6LGhUK3qPgitqui8Py9bveA==", "requires": { "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": { - "version": "github:TimeForANinja/node-ytsr#cc183ef883930dc6b3619a7bf9b4813d2675bace", - "from": "github:TimeForANinja/node-ytsr#wip-api-adjustments", + "version": "2.0.0-alpha.3", + "resolved": "https://registry.npmjs.org/ytsr/-/ytsr-2.0.0-alpha.3.tgz", + "integrity": "sha512-NELl/ubEnBxxU/AofsXu8p6T2BArf/ROLOocblTgeSr7oNPPn6jPv57MCT4cIWJdzxWiHcdl6BqrypoIPejfmw==", "requires": { "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": { diff --git a/package.json b/package.json index 28da0022..4d7b7ebc 100644 --- a/package.json +++ b/package.json @@ -47,9 +47,9 @@ "yt-dash-manifest-generator": "^1.1.0", "yt-trending-scraper": "^1.0.4", "yt-xml2vtt": "^1.1.3", - "ytdl-core": "^4.0.6", - "ytpl": "^1.0.1", - "ytsr": "github:TimeForANinja/node-ytsr#wip-api-adjustments" + "ytdl-core": "^4.1.0", + "ytpl": "^2.0.0-alpha.1", + "ytsr": "^2.0.0-alpha.3" }, "description": "A private YouTube client", "devDependencies": { diff --git a/src/renderer/views/Playlist/Playlist.js b/src/renderer/views/Playlist/Playlist.js index c9df0126..4b00bf93 100644 --- a/src/renderer/views/Playlist/Playlist.js +++ b/src/renderer/views/Playlist/Playlist.js @@ -83,19 +83,19 @@ export default Vue.extend({ this.infoData = { id: result.id, title: result.title, - description: result.description, + description: result.description ? result.description : '', randomVideoId: result.items[randomVideoIndex].id, viewCount: result.views, - videoCount: result.total_items, - lastUpdated: result.last_updated, - channelName: result.author.name, - channelThumbnail: result.author.avatar, - channelId: result.author.id, + videoCount: result.estimated_items, + // lastUpdated: result.last_updated ? result.last_updated : '', + // channelName: result.author ? result.author.name : '', + // channelThumbnail: result.author ? result.author.avatar : '', + // channelId: result.author ? result.author.id : '', infoSource: 'local' } this.playlistItems = result.items.map((video) => { - if (video.author !== null) { + if (typeof video.author !== 'undefined') { const channelName = video.author.name const channelId = video.author.ref.replace(/https:\/\/(www\.)?youtube\.com\/(user|channel)\//g, '') video.author = channelName