Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reimplement playlist queue to be attached to StationPlaylistMedia tab…
…le. (#4031)
- Loading branch information
1 parent
35cfd67
commit 4e6f1d7
Showing
11 changed files
with
321 additions
and
281 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<?php | ||
|
||
namespace App\Entity\Api; | ||
|
||
class StationPlaylistQueue | ||
{ | ||
/** | ||
* ID of the StationPlaylistMedia record associating this track with the playlist | ||
* | ||
* @OA\Property(example=1) | ||
* @var int|null | ||
*/ | ||
public ?int $spm_id = null; | ||
|
||
/** | ||
* ID of the StationPlaylistMedia record associating this track with the playlist | ||
* | ||
* @OA\Property(example=1) | ||
* @var int | ||
*/ | ||
public int $media_id; | ||
|
||
/** | ||
* The song's 32-character unique identifier hash | ||
* | ||
* @OA\Property(example="9f33bbc912c19603e51be8e0987d076b") | ||
* @var string | ||
*/ | ||
public string $song_id; | ||
|
||
/** | ||
* The song artist. | ||
* | ||
* @OA\Property(example="Chet Porter") | ||
* @var string | ||
*/ | ||
public string $artist = ''; | ||
|
||
/** | ||
* The song title. | ||
* | ||
* @OA\Property(example="Aluko River") | ||
* @var string | ||
*/ | ||
public string $title = ''; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace App\Entity\Migration; | ||
|
||
use Doctrine\DBAL\Schema\Schema; | ||
use Doctrine\Migrations\AbstractMigration; | ||
|
||
/** | ||
* Auto-generated Migration: Please modify to your needs! | ||
*/ | ||
final class Version20210416214621 extends AbstractMigration | ||
{ | ||
public function getDescription(): string | ||
{ | ||
return 'Move playlist queue to station_playlist_media table.'; | ||
} | ||
|
||
public function up(Schema $schema): void | ||
{ | ||
// this up() migration is auto-generated, please modify it to your needs | ||
$this->addSql('ALTER TABLE station_playlist_media ADD is_queued TINYINT(1) NOT NULL'); | ||
$this->addSql('ALTER TABLE station_playlists DROP queue'); | ||
} | ||
|
||
public function down(Schema $schema): void | ||
{ | ||
// this down() migration is auto-generated, please modify it to your needs | ||
$this->addSql('ALTER TABLE station_playlist_media DROP is_queued'); | ||
$this->addSql('ALTER TABLE station_playlists ADD queue LONGTEXT CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_general_ci` COMMENT \'(DC2Type:array)\''); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.