Fix no more support for AudioOnly :(, Youtube are assholes
This commit is contained in:
+5
-5
@@ -1121,7 +1121,7 @@ namespace Tesses.YouTubeDownloader2025Companion
|
||||
if (!File.Exists(videoPath + ".bin"))
|
||||
{
|
||||
var cfg = Config ?? new AuthConfig();
|
||||
HttpRequestMessage msg = new HttpRequestMessage(HttpMethod.Get, $"{cfg.TYTDUrl.TrimEnd('/')}/api/v1/download?v={id.Value}&res=AudioOnly");
|
||||
HttpRequestMessage msg = new HttpRequestMessage(HttpMethod.Get, $"{cfg.TYTDUrl.TrimEnd('/')}/api/v1/download?v={id.Value}&res=LowVideo");
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(cfg.Session))
|
||||
{
|
||||
@@ -1149,7 +1149,7 @@ namespace Tesses.YouTubeDownloader2025Companion
|
||||
}
|
||||
|
||||
string videoPath = Path.Combine("data", "MusicFromTYTD", $"{value.Value}.bin");
|
||||
if (!string.IsNullOrWhiteSpace(songId) && (File.Exists(videoPath) || await VideoExistsOnTYTD(value, TYTDResolution.AudioOnly)))
|
||||
if (!string.IsNullOrWhiteSpace(songId) && (File.Exists(videoPath) || await VideoExistsOnTYTD(value, TYTDResolution.LowVideo)))
|
||||
{
|
||||
await DownloadSongFromTYTD(value);
|
||||
|
||||
@@ -1180,7 +1180,7 @@ namespace Tesses.YouTubeDownloader2025Companion
|
||||
}
|
||||
else if (!string.IsNullOrWhiteSpace(songId))
|
||||
{
|
||||
AddVideo(value, TYTDResolution.AudioOnly);
|
||||
AddVideo(value, TYTDResolution.LowVideo);
|
||||
}
|
||||
|
||||
|
||||
@@ -1446,7 +1446,7 @@ namespace Tesses.YouTubeDownloader2025Companion
|
||||
|
||||
}
|
||||
|
||||
AddVideo(myId.Value.Value, TYTDResolution.AudioOnly);
|
||||
AddVideo(myId.Value.Value, TYTDResolution.LowVideo);
|
||||
//await ctx.SendTextAsync($"<p>{HttpUtility.HtmlEncode($"SongId: {songId}, AlbumId: {albumId}, Url: {url}")}</p>");
|
||||
|
||||
|
||||
@@ -1480,7 +1480,7 @@ namespace Tesses.YouTubeDownloader2025Companion
|
||||
|
||||
}
|
||||
|
||||
AddVideo(myId.Value.Value, TYTDResolution.AudioOnly);
|
||||
AddVideo(myId.Value.Value, TYTDResolution.LowVideo);
|
||||
//await ctx.SendTextAsync($"<p>{HttpUtility.HtmlEncode($"SongId: {songId}, AlbumId: {albumId}, Url: {url}")}</p>");
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user