feat: enhance YouTube API integration by adding support for topic channel ID and improving release sync functionality with localization updates
This commit is contained in:
@@ -12,7 +12,8 @@ use Illuminate\Support\Str;
|
||||
class SyncYoutubeReleases extends Command
|
||||
{
|
||||
protected $signature = 'youtube:sync-releases
|
||||
{--channel= : Override YouTube channel ID}
|
||||
{--channel= : Override YouTube main channel ID}
|
||||
{--topic= : Override YouTube Topic channel ID (Yayınlananlar / art track)}
|
||||
{--playlist= : Override Releases playlist ID}
|
||||
{--dry-run : Show changes without writing to database}';
|
||||
|
||||
@@ -20,9 +21,10 @@ class SyncYoutubeReleases extends Command
|
||||
|
||||
public function handle(YouTubeService $youTubeService): int
|
||||
{
|
||||
if ($this->option('channel') || $this->option('playlist')) {
|
||||
if ($this->option('channel') || $this->option('topic') || $this->option('playlist')) {
|
||||
$youTubeService = new YouTubeService(
|
||||
channelId: $this->option('channel') ?? config('services.youtube.channel_id'),
|
||||
topicChannelId: $this->option('topic') ?? config('services.youtube.topic_channel_id'),
|
||||
playlistId: $this->option('playlist') ?? config('services.youtube.playlist_id'),
|
||||
);
|
||||
}
|
||||
@@ -34,6 +36,9 @@ class SyncYoutubeReleases extends Command
|
||||
}
|
||||
|
||||
$this->info(__('music_productions.youtube_sync_started'));
|
||||
$this->line(__('music_productions.youtube_sync_source', [
|
||||
'source' => $youTubeService->getReleasesSourceLabel(),
|
||||
]));
|
||||
$this->line('Playlist ID: ' . $youTubeService->resolveReleasesPlaylistId());
|
||||
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user