m3u8 icon indicating copy to clipboard operation
m3u8 copied to clipboard

Elegant way to find items by criteria

Open forthrin opened this issue 3 years ago • 0 comments

Thanks for making this library!

Is there a built-in search feature, ie. find the item with the best video resolution? Or at least a less clunky way than:

item = m3u8.items.max_by { |e| (e.respond_to?(:height) && e.height) || 0 }

Wouldn't it be simpler and better if the object returned was a symbol hash rather than an object with methods?

forthrin avatar Feb 24 '23 07:02 forthrin