mirror of
https://onedev.site.tesses.net/tytd2025
synced 2026-06-01 09:55:34 +00:00
Fix the captions downloading
This commit is contained in:
@@ -14,6 +14,6 @@
|
|||||||
"project_dependencies": [
|
"project_dependencies": [
|
||||||
"..\/Tesses.YouTubeDownloader"
|
"..\/Tesses.YouTubeDownloader"
|
||||||
],
|
],
|
||||||
"version": "1.0.0.4-prod",
|
"version": "1.0.0.5-prod",
|
||||||
"compTime": "secure"
|
"compTime": "secure"
|
||||||
}
|
}
|
||||||
@@ -14,6 +14,6 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"name": "Tesses.YouTubeDownloader",
|
"name": "Tesses.YouTubeDownloader",
|
||||||
"version": "1.0.0.4-prod",
|
"version": "1.0.0.5-prod",
|
||||||
"icon": "icon.png"
|
"icon": "icon.png"
|
||||||
}
|
}
|
||||||
@@ -1341,7 +1341,7 @@ class TYTD.Downloader {
|
|||||||
if(e == null)
|
if(e == null)
|
||||||
{
|
{
|
||||||
var req = this.ManifestRequest(id);
|
var req = this.ManifestRequest(id);
|
||||||
this.DownloadCaptions(req);
|
|
||||||
this.PutVideoInfo(req.playerResponse.videoDetails);
|
this.PutVideoInfo(req.playerResponse.videoDetails);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1350,6 +1350,7 @@ class TYTD.Downloader {
|
|||||||
private DownloadCaptions(req)
|
private DownloadCaptions(req)
|
||||||
{
|
{
|
||||||
const tracks = req.playerResponse.captions.playerCaptionsTracklistRenderer.captionTracks;
|
const tracks = req.playerResponse.captions.playerCaptionsTracklistRenderer.captionTracks;
|
||||||
|
|
||||||
if(TypeIsList(tracks))
|
if(TypeIsList(tracks))
|
||||||
{
|
{
|
||||||
each(var item : tracks)
|
each(var item : tracks)
|
||||||
@@ -1727,7 +1728,7 @@ class TYTD.Downloader {
|
|||||||
{
|
{
|
||||||
throw new VideoDownloadError(id, "adaptiveFormats is missing");
|
throw new VideoDownloadError(id, "adaptiveFormats is missing");
|
||||||
}
|
}
|
||||||
|
this.DownloadCaptions(jsonResp);
|
||||||
return jsonResp;
|
return jsonResp;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user