Fix upstream issues caused by EM clearing on media processing.

This commit is contained in:
Buster "Silver Eagle" Neece 2020-01-29 18:22:21 -06:00
parent 793f54413f
commit fd67b04e71
No known key found for this signature in database
GPG Key ID: 6D9E12FF03411F4E
2 changed files with 6 additions and 2 deletions

View File

@ -191,10 +191,12 @@ class StationRepository extends Repository
// Scan directory for any existing files.
set_time_limit(600);
$this->media_sync->importMusic($station);
$this->em->refresh($station);
$station = $this->em->find(Entity\Station::class, $station->getId());
$this->media_sync->importPlaylists($station);
$this->em->refresh($station);
$station = $this->em->find(Entity\Station::class, $station->getId());
// Load adapters.
$frontend_adapter = $this->adapters->getFrontendAdapter($station);

View File

@ -211,6 +211,8 @@ class StationCloneForm extends StationForm
// Run normal post-creation steps.
$this->media_sync->importMusic($new_record);
$new_record = $this->em->find(Entity\Station::class, $new_record_id);
$this->configuration->assignRadioPorts($new_record, true);
$this->configuration->writeConfiguration($new_record);