DraxCodes / Youtube2Mp3

Take playlists from other sources like Spotify and feed them into Youtube to get either a playable stream or a download for each track as an MP3.
GNU General Public License v3.0
8 stars 2 forks source link

Setup Youtube Search #5

Closed DraxCodes closed 4 years ago

DraxCodes commented 4 years ago

:warning: This is gonna be a little more complex over time but for now, a simple implementation of searching youtube which returns a single YoutubeTrack based on the entered search param.

:information_source: I'm thinking that it's fine for this YoutubeTrack entity to live in Core, or we could have it live in the Youtube project and inherit the Track entity. Up to you to see what works best though.

:1st_place_medal: Would be awesome if you also extend this to have an abstraction in core and add it to the IOC project by replacing:

public static IServiceCollection UseYoutube(this IServiceCollection services)
            => throw new NotImplementedException();

Instead of throwing, it would add the YoutubeService, or whatever you name it, as a singleton.

:question: I'm not 100% sure what we can get from YoutubeExplode, if we can get a stream, that would be ideal as we can then manipulate that stream in a different service for saving/playback or whatever else.

svr333 commented 4 years ago

I'll try my best to work something out. Sadly enough, YoutubeExplode doesn't give us a Stream, it gives us POCO's from the lib. I'm getting started after dinner, will definitely ask for input / help.

svr333 commented 4 years ago

I'm quite sure this will be solved once we merge ImplementDownload into master. I was thinking of enhancing the search feature though, because right now all we search for is Track.Title.

My idea was something along the lines of this:

now realizes this will also be used without spotify tracks being converted This could be something specific for when there is a Spotify Track as well.