Skip to content

Commit

Permalink
Improve decision for downloading YouTube video
Browse files Browse the repository at this point in the history
  • Loading branch information
MirisWisdom committed Oct 14, 2021
1 parent a5087f1 commit 6c2690e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Album.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,9 @@ public FileInfo Download(YTDL YTDL)

public void Encode(Toolkit toolkit)
{
var video = Source.Contains("https://youtu") ? Download(toolkit.YTDL) : new FileInfo(Source);
var video = Source.Contains("http")
? Download(toolkit.YTDL)
: new FileInfo(Source);

if (!Target.Exists)
Target.Create();
Expand Down

0 comments on commit 6c2690e

Please sign in to comment.