johnmaguire / Cardinal

A Python IRC bot, designed to make adding functionality quick and simple. (est. 2013)
MIT License
100 stars 38 forks source link

Add music indicator to YouTube videos? Maybe color? #179

Closed johnmaguire closed 2 years ago

johnmaguire commented 3 years ago

I have to guess, given YT Music, and the fact that YouTube has categories, we can determine whether the video is actually a song. If it is, maybe we could use the headphone emoji, or a music (♫ / ♪) symbol to show it as such in the channel?

rijandev commented 3 years ago

John I’d like to contribute to this project. I am new to Open source contribute. How do you suggest I go about adding the music signs?

johnmaguire commented 3 years ago

Hi @rijandev -

The first step would be checking the Youtube Data API to find a way to detect if the video belongs to a music category.

The next step would be to check for this data in the plugin itself (probably in _get_video_info), and add some sort of symbol in the event that you detect that category (in _parse_item): https://github.com/JohnMaguire/Cardinal/blob/master/plugins/youtube/plugin.py

Finally, test the functionality manually by connecting the bot to an IRC network and trying .yt <some song name> as well as pasting a URL to a music video, and verifying that it correctly adds the music symbols. You shouldn't need to request an API key, as a Youtube API key is included in this repository (since Youtube doesn't rate limit or anything.)

aaitbr commented 3 years ago

Hey @JohnMaguire I'm new to the world of contribution. Can i start by working on this one ? if it's not done yet !

johnmaguire commented 3 years ago

@aaitbr Please go ahead! This API might provide a list of categories, which we can check to see if there's any way to find music-related ones: https://developers.google.com/youtube/v3/docs/videoCategories/list

aaitbr commented 3 years ago

@JohnMaguire Thank u ! i'll see that & I'll let you know if anything is unclear ! if you don't mind

MelstromH commented 2 years ago

Hi, is this issue still open? It seems that several other people have made attempts.

johnmaguire commented 2 years ago

Thanks, you're correct, this issue was resolved.