adanvdo / YT-RED-UI

Windows .NET Framework GUI Application for Downloading Video and Audio Files from YouTube and Reddit
48 stars 1 forks source link

Error downloading reddit video #97

Closed adanvdo closed 2 years ago

adanvdo commented 2 years ago

I am getting the following error when trying to download a reddit video

7/28/2022 10:27:22 AM ----------------------------

Sequence contains no matching element

at System.Linq.Enumerable.First[TSource](IEnumerable1 source, Func2 predicate) at YT_RED.Utils.VideoUtil.d__12.MoveNext() in E:\Dev\YT-RED\YT-RED\Utils\VideoUtil.cs:line 357

adanvdo commented 2 years ago

parameters was missing a check to handle it being null or containing no parameter values. this has been fixed.

adanvdo commented 2 years ago

This is still happening when attempting to download a specific format

adanvdo commented 2 years ago

This was cause by accidentally using .First() instead of .FirstOrDefault() I've corrected any other instances of this as well