pcwii / cpkodi-skill

updated Mycroft.AI Kodi Skill using the Common Play Framework
GNU General Public License v3.0
14 stars 6 forks source link

Enchancement request on Youtube #22

Closed david-morris closed 3 years ago

david-morris commented 3 years ago

The youtube commands didn't work on my system, and I saw that you have been changing that lately.

Why not add a dependency to youtube_dl? Then you could use their API to fetch video entries:

ydl = youtube_dl.YoutubeDL(ydl_opts)
results = ydl.extract_info("ytsearch:<query string>")

and that way, if the Youtube API changes, you won't duplicate the youtube_dl team's work.

pcwii commented 3 years ago

Thanks for contributing. This is a good idea. I am also looking at https://github.com/HelloChatterbox/youtube_searcher as a dependancy since this is maintained by a Mycroft.ai contributer.

pcwii commented 3 years ago

refactored the youtube functions using the youtube_searcher. It appears to be working on my end, Let me know if it is working for you now.

david-morris commented 3 years ago

Great work! I also see why a fresh install isn't the usual upgrade path for devs. I haven't tested that the manifest changes worked, but I know it works when you pull in the dependency with mycroft-pip.