MetadataSyncService
in package
Table of Contents
Properties
- $albumSearchService : AlbumSearchService
- $artistSearchService : ArtistSearchService
- $localMetadataService : LocalMetadataService
- $logger : LoggerInterface
- $metadataProcessor : MetadataProcessor
- $songSearchService : SongSearchService
Methods
- __construct() : mixed
- getSyncRecommendations() : array<string|int, mixed>
- Get sync recommendations based on album metadata completeness
- queueAlbumCompleteSync() : array<string|int, mixed>
- Queue complete album sync (album + artists + songs)
- queueAlbumSync() : void
- Queue album sync using the modern job system
- queueArtistSync() : void
- Queue artist sync using the modern job system
- queueBatchAlbumSync() : int
- Batch queue multiple albums for sync
- syncAlbum() : array<string|int, mixed>
- Sync metadata for a specific album
- syncAlbumComplete() : array<string|int, mixed>
- Batch sync entire album with all its songs
- syncArtist() : array<string|int, mixed>
- Sync metadata for a specific artist
- syncSong() : array<string|int, mixed>
- Sync metadata for a specific song
- getEmptyAlbumResult() : array<string|int, mixed>
- getEmptyArtistResult() : array<string|int, mixed>
- getEmptySongResult() : array<string|int, mixed>
- selectBestMatch() : array<string|int, mixed>|null
- Select the best match from multiple search results
Properties
$albumSearchService read-only
private
AlbumSearchService
$albumSearchService
$artistSearchService read-only
private
ArtistSearchService
$artistSearchService
$localMetadataService read-only
private
LocalMetadataService
$localMetadataService
$logger
private
LoggerInterface
$logger
Attributes
- #[LogChannel]
- $channel: \App\Modules\Logging\Channel::Metadata
$metadataProcessor read-only
private
MetadataProcessor
$metadataProcessor
$songSearchService read-only
private
SongSearchService
$songSearchService
Methods
__construct()
public
__construct(AlbumSearchService $albumSearchService, ArtistSearchService $artistSearchService, SongSearchService $songSearchService, MetadataProcessor $metadataProcessor, LocalMetadataService $localMetadataService) : mixed
Parameters
- $albumSearchService : AlbumSearchService
- $artistSearchService : ArtistSearchService
- $songSearchService : SongSearchService
- $metadataProcessor : MetadataProcessor
- $localMetadataService : LocalMetadataService
getSyncRecommendations()
Get sync recommendations based on album metadata completeness
public
getSyncRecommendations(Album $album) : array<string|int, mixed>
Parameters
- $album : Album
Return values
array<string|int, mixed>queueAlbumCompleteSync()
Queue complete album sync (album + artists + songs)
public
queueAlbumCompleteSync(Album $album[, bool $forceUpdate = false ][, string $albumSyncType = 'general' ][, string $artistSyncType = 'general' ][, string $queue = 'default' ][, int $delayBetweenJobs = 30 ]) : array<string|int, mixed>
Parameters
- $album : Album
- $forceUpdate : bool = false
- $albumSyncType : string = 'general'
- $artistSyncType : string = 'general'
- $queue : string = 'default'
- $delayBetweenJobs : int = 30
Return values
array<string|int, mixed>queueAlbumSync()
Queue album sync using the modern job system
public
queueAlbumSync(Album $album[, bool $forceUpdate = false ][, string $syncType = 'general' ][, string $queue = 'default' ]) : void
Parameters
- $album : Album
- $forceUpdate : bool = false
- $syncType : string = 'general'
- $queue : string = 'default'
queueArtistSync()
Queue artist sync using the modern job system
public
queueArtistSync(Artist $artist[, bool $forceUpdate = false ][, string $syncType = 'general' ][, string $queue = 'default' ]) : void
Parameters
- $artist : Artist
- $forceUpdate : bool = false
- $syncType : string = 'general'
- $queue : string = 'default'
queueBatchAlbumSync()
Batch queue multiple albums for sync
public
queueBatchAlbumSync(array<string|int, mixed> $albumIds[, bool $forceUpdate = false ][, string $syncType = 'general' ][, string $queue = 'default' ][, int $batchSize = 10 ][, int $delayBetweenBatches = 60 ]) : int
Parameters
- $albumIds : array<string|int, mixed>
- $forceUpdate : bool = false
- $syncType : string = 'general'
- $queue : string = 'default'
- $batchSize : int = 10
- $delayBetweenBatches : int = 60
Return values
intsyncAlbum()
Sync metadata for a specific album
public
syncAlbum(Album $album) : array<string|int, mixed>
Use SyncAlbumJob directly for new implementations
Parameters
- $album : Album
Return values
array<string|int, mixed>syncAlbumComplete()
Batch sync entire album with all its songs
public
syncAlbumComplete(Album $album) : array<string|int, mixed>
Parameters
- $album : Album
Return values
array<string|int, mixed>syncArtist()
Sync metadata for a specific artist
public
syncArtist(Artist $artist) : array<string|int, mixed>
Use SyncArtistJob directly for new implementations
Parameters
- $artist : Artist
Return values
array<string|int, mixed>syncSong()
Sync metadata for a specific song
public
syncSong(Song $song) : array<string|int, mixed>
Parameters
- $song : Song
Return values
array<string|int, mixed>getEmptyAlbumResult()
private
getEmptyAlbumResult() : array<string|int, mixed>
Return values
array<string|int, mixed>getEmptyArtistResult()
private
getEmptyArtistResult() : array<string|int, mixed>
Return values
array<string|int, mixed>getEmptySongResult()
private
getEmptySongResult() : array<string|int, mixed>
Return values
array<string|int, mixed>selectBestMatch()
Select the best match from multiple search results
private
selectBestMatch(array<string|int, mixed> $searchResults) : array<string|int, mixed>|null
Parameters
- $searchResults : array<string|int, mixed>