Remove YouTube integration from backend and deployment config
Drops the YouTube-backed second catalog source entirely: the Local/External split on Track/Album collapses into single concrete entities, Artist/TrackArtist/ExternalTrack/ExternalAlbum and the YouTube service/download pipeline (yt-dlp, MassTransit consumer, routing slip) are deleted, and mixes now source discovery only from local listening history. Includes the RemoveYouTubeIntegration EF Core migration and matching Worker/deploy/compose cleanup (no more yt-dlp/python/deno in the Worker image, no thumbnail-cache/YtDlp config sections).
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
using Amazon.S3;
|
||||
using Hangfire;
|
||||
using Hangfire.PostgreSql;
|
||||
using Microsoft.Extensions.Caching.Memory;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Logging;
|
||||
@@ -99,33 +98,6 @@ namespace Musify.Infrastructure.Services
|
||||
return serviceDescriptors;
|
||||
}
|
||||
|
||||
public static IServiceCollection AddYouTubeMusicService(this IServiceCollection serviceDescriptors, IConfiguration configuration)
|
||||
{
|
||||
serviceDescriptors.AddValidatedOptions<YouTubeConfiguration>(configuration, YouTubeConfiguration.SectionName);
|
||||
|
||||
serviceDescriptors.AddMemoryCache();
|
||||
serviceDescriptors.AddSingleton<IYouTubeMusicService>(serviceProvider =>
|
||||
{
|
||||
var youTubeConfiguration = serviceProvider.GetRequiredService<YouTubeConfiguration>();
|
||||
if (!youTubeConfiguration.Enabled)
|
||||
return new DisabledYouTubeMusicService();
|
||||
|
||||
return new YouTubeMusicService(
|
||||
youTubeConfiguration,
|
||||
serviceProvider.GetRequiredService<IMemoryCache>(),
|
||||
serviceProvider.GetRequiredService<ILogger<YouTubeMusicService>>());
|
||||
} );
|
||||
return serviceDescriptors;
|
||||
}
|
||||
|
||||
public static IServiceCollection AddYouTubeDownloader(this IServiceCollection serviceDescriptors, IConfiguration configuration)
|
||||
{
|
||||
serviceDescriptors.AddValidatedOptions<YtDlpConfiguration>(configuration, YtDlpConfiguration.SectionName);
|
||||
|
||||
serviceDescriptors.AddScoped<IYouTubeDownloaderService, YouTubeDownloaderService>();
|
||||
return serviceDescriptors;
|
||||
}
|
||||
|
||||
public static IServiceCollection AddAudioTranscoder(this IServiceCollection serviceDescriptors, IConfiguration configuration)
|
||||
{
|
||||
serviceDescriptors
|
||||
|
||||
Reference in New Issue
Block a user