Closed superbonaci closed 6 months ago
Merge it if you can, I think you can refactor later everything you need even add more features.
I decided to backport the M3U8 parser since kick-support still has some kinks to be ironed out. It should be pretty straight forward to use that instead of looping through a generic input file (and update the docs to reflect the change), however I am writing some extension methods right now to make it even easier for you.
Thanks for the merge. I can't confirm wether the CopyToAsync
method does always perform a raw concatenation or not, I'll have to ask people with deeper knowledge than me. All the recent tests I did recently do it.
string InputList = downloadOptions.InputList;
List<string> videoPartsList = System.IO.File.ReadLines(InputList).ToList();
with:
await using var fs = File.Open(downloadOptions.InputList, FileMode.Open, FileAccess.Read, FileShare.Read);
var m3u8 = M3U8.Parse(fs, Encoding.UTF8);
You may refer to VideoDownloader.cs
on how to modify the other functions.
Don't forget to mention the user should input .m3u
/.m3u8
files in the documentation.
Also, consider renaming downloadOptions
to better reflect what type of options it is.
I decided to make some of the changes myself, I hope you don't mind.
I also realized that limiting the user to M3U/M3U8 files was dumb, as it just requires the user to do more research before using the tool.
Sorry this took so long to merge.
When kick-support gets merged, it will bring an M3U8 parser with it (among several other changes).
Either I can refactor this feature (and its documentation) after that is merged, or I can merge this now and a temporary disclaimer is added that explains that there may be breaking changes in the next version (1.53.6). Which would you prefer?