jimbuck / pully

A simple CLI and library for downloading high quality YouTube videos!
https://www.npmjs.com/package/pully
MIT License
187 stars 19 forks source link

Changed format.type to format.raw.mimeType to fix video and audio filter in analyzer.ts #40

Closed GreysonR closed 3 years ago

GreysonR commented 3 years ago

I wasn't able to use the program because the filters in analyzer.ts would always return an empty array, even if there were matching formats. After some digging around, I found out that the type was in raw.mimeType, not just type.

jimbuck commented 3 years ago

Hey there! Thank you so much for opening a PR! Could you please provide some examples of the data you were seeing (type vs mimeType vs expectedType)

As for a fix, this would definitely work, but it really should be addressed in the pully-core repo. This line here actually shows we use the mimeType property from the raw data. If you could open a PR there implementing a smarter logic for grabbing the type that would be great (try the current way, if it's empty, try the non-split/truncate version).

As you can also see, the builds are broken (not by you). I will try to work on those today to get them working.