valerebron / usetube

search & get datas from youtube no google account needed
GNU General Public License v3.0
50 stars 18 forks source link

Noticing duration is wrong on some videos, is this something that can be corrected? #15

Closed CosmosisT closed 3 years ago

CosmosisT commented 3 years ago

https://www.youtube.com/watch?v=nDjFsPMcs5Q https://www.youtube.com/watch?v=xFPPnVxEZYc

and all sorts...

Not sure if it's how the values are being converted but if not mistaken the format is a bit weird with YouTube time, wondering if you could take a peak. Cheers, works well otherwise.

There may be something else with the durations, sometimes they return null; I think I had only encountered this looking at 5 second videos and running a queue of them. This proved quickly it was somewhat of a problem but for now just gave them 5 seconds default in this case.

Would say if the durations could be sorted, you have a nice tool.

valerebron commented 3 years ago

Thanks for the feedback Cosmosis.

Indeed, the duration formating part of formatVideo helper didn't manage hours and I didn't target the good data for channel's video duration. Moreover I didn't manage less than one minute videos. I think it should fix all those bug, tell me I you find new ones. You should upgrade to usetube 2.1.0 to get those fixes.

cheers

CosmosisT commented 3 years ago

I will be upgrading, I appreciate the reply. Glad my diagnostic efforts without diving into the code were easy enough for you to determine and possibly fast?

I have worked with the embedded player lots and the API and it's weird... So just glad this wasn't YouTube error but just a format issue. It honestly would had slipped most people's minds anyways so cheers to that fix.

I won't be able to test it much for next little bit but I trust and believe this and love it. My many to many broadcasting site will very-much so appreciate YouTube and this makes that happen. Currently in development but what I've tested so far of usetube I am a fan and will stick around and report any issues.

Keep up the works! :)

valerebron commented 3 years ago

2.1.0 is published now ! https://www.npmjs.com/package/usetube