2022-08-03 22:51:39 +01:00
|
|
|
|
using System;
|
2023-10-12 19:51:29 +01:00
|
|
|
|
using System.Linq;
|
2022-08-07 13:54:29 +01:00
|
|
|
|
using Mixonomer.Fire;
|
2022-08-03 22:51:39 +01:00
|
|
|
|
using System.Threading.Tasks;
|
2024-01-21 20:43:46 +00:00
|
|
|
|
using Microsoft.Extensions.Logging;
|
|
|
|
|
using Microsoft.Extensions.Logging.Abstractions;
|
2023-10-12 19:51:29 +01:00
|
|
|
|
using Mixonomer.Fire.Extensions;
|
2024-01-21 20:43:46 +00:00
|
|
|
|
using Mixonomer;
|
2024-01-23 17:43:25 +00:00
|
|
|
|
using Mixonomer.Playlist;
|
2022-08-03 22:51:39 +01:00
|
|
|
|
|
2024-01-18 22:30:34 +00:00
|
|
|
|
namespace Mixonomer.CLI;
|
|
|
|
|
|
|
|
|
|
class Program
|
2022-08-03 22:51:39 +01:00
|
|
|
|
{
|
2024-01-18 22:30:34 +00:00
|
|
|
|
static async Task Main(string[] args)
|
2022-08-03 22:51:39 +01:00
|
|
|
|
{
|
2024-01-18 22:30:34 +00:00
|
|
|
|
var repo = new UserRepo(projectId: System.Environment.GetEnvironmentVariable("GOOGLE_CLOUD_PROJECT"));
|
|
|
|
|
|
|
|
|
|
var walker = new PartTreeWalker(repo);
|
2024-06-14 07:23:25 +01:00
|
|
|
|
// var partPlaylists = await walker.GetPlaylistParts("andy", "RAP");
|
2024-01-21 20:43:46 +00:00
|
|
|
|
|
|
|
|
|
var spotifyNetwork = new SpotifyNetworkProvider(repo, null, NullLogger<SpotifyNetworkProvider>.Instance);
|
|
|
|
|
|
|
|
|
|
var generator = new PlaylistGenerator(repo, spotifyNetwork, walker, NullLogger<PlaylistGenerator>.Instance);
|
|
|
|
|
|
2024-06-14 07:23:25 +01:00
|
|
|
|
await generator.GeneratePlaylist("POP", "andy");
|
2022-08-03 22:51:39 +01:00
|
|
|
|
}
|
|
|
|
|
}
|