text
stringlengths
9
39.2M
dir
stringlengths
26
295
lang
stringclasses
185 values
created_date
timestamp[us]
updated_date
timestamp[us]
repo_name
stringlengths
1
97
repo_full_name
stringlengths
7
106
star
int64
1k
183k
len_tokens
int64
1
13.8M
```php <?php declare(strict_types=1); namespace Functional; use App\Entity\Enums\StorageLocationAdapters; use App\Entity\Enums\StorageLocationTypes; use FunctionalTester; class Api_Admin_StorageLocationsCest extends CestAbstract { /** * @before setupComplete * @before login */ public function manageStorageLocations(FunctionalTester $I): void { $I->wantTo('Manage storage locations via API.'); $this->testCrudApi( $I, '/api/admin/storage_locations', [ 'type' => StorageLocationTypes::StationMedia->value, 'adapter' => StorageLocationAdapters::Local->value, 'path' => '/tmp/test_storage_location', ], [ 'path' => '/tmp/test_storage_location_2', ] ); } } ```
/content/code_sandbox/tests/Functional/Api_Admin_StorageLocationsCest.php
php
2016-04-30T21:41:23
2024-08-16T18:27:26
AzuraCast
AzuraCast/AzuraCast
2,978
180
```php <?php declare(strict_types=1); namespace Functional; use App\Entity\Repository\RolePermissionRepository; use App\Enums\GlobalPermissions; use FunctionalTester; class Api_Admin_RolesCest extends CestAbstract { /** * @before setupComplete * @before login */ public function manageRoles(FunctionalTester $I): void { $I->wantTo('Manage roles via API.'); $this->testCrudApi( $I, '/api/admin/roles', [ 'name' => 'Generic Admin', 'permissions' => [ 'global' => [ GlobalPermissions::All->value, ], ], ], [ 'name' => 'Test Generic Administrator', ] ); } public function checkSuperAdminRole(FunctionalTester $I): void { $I->wantTo('Ensure super administrator is not editable.'); $permissionRepo = $this->di->get(RolePermissionRepository::class); $superAdminRole = $permissionRepo->ensureSuperAdministratorRole(); $I->sendPut( '/api/admin/role/' . $superAdminRole->getIdRequired(), [ 'name' => 'Edited Role', ] ); $I->seeResponseCodeIsClientError(); $I->sendDelete( '/api/admin/role/' . $superAdminRole->getIdRequired(), ); $I->seeResponseCodeIsClientError(); } } ```
/content/code_sandbox/tests/Functional/Api_Admin_RolesCest.php
php
2016-04-30T21:41:23
2024-08-16T18:27:26
AzuraCast
AzuraCast/AzuraCast
2,978
316
```php <?php declare(strict_types=1); namespace Functional; use FunctionalTester; class Frontend_PublicCest extends CestAbstract { /** * @before setupComplete */ public function seePublicPage(FunctionalTester $I): void { $I->wantTo('Verify that the public page displays.'); // Disable public pages $testStation = $this->getTestStation(); $testStation->setEnablePublicPage(false); $this->em->persist($testStation); $this->em->flush(); $I->amOnPage('/public/' . $testStation->getId()); $I->seeResponseCodeIs(404); // Enable public pages $testStation = $this->getTestStation(); $testStation->setEnablePublicPage(true); $this->em->persist($testStation); $this->em->flush(); $I->amOnPage('/public/' . $testStation->getId()); $I->seeResponseCodeIs(200); $I->see($testStation->getName()); $I->amOnPage('/public/' . $testStation->getId() . '/embed'); $I->seeResponseCodeIs(200); $I->amOnPage('/public/' . $testStation->getId() . '/history'); $I->seeResponseCodeIs(200); $I->amOnPage('/public/' . $testStation->getId() . '/playlist.pls'); $I->seeResponseCodeIs(200); $I->amOnPage('/public/' . $testStation->getId() . '/playlist.m3u'); $I->seeResponseCodeIs(200); // Disable WebDJ $testStation = $this->getTestStation(); $testStation->setEnableStreamers(false); $this->em->persist($testStation); $this->em->flush(); $I->amOnPage('/public/' . $testStation->getId() . '/dj'); $I->seeResponseCodeIs(500); // Enable WebDJ $testStation = $this->getTestStation(); $testStation->setEnableStreamers(true); $this->em->persist($testStation); $this->em->flush(); $I->amOnPage('/public/' . $testStation->getId() . '/dj'); $I->seeResponseCodeIs(200); } } ```
/content/code_sandbox/tests/Functional/Frontend_PublicCest.php
php
2016-04-30T21:41:23
2024-08-16T18:27:26
AzuraCast
AzuraCast/AzuraCast
2,978
529
```php <?php declare(strict_types=1); namespace Functional; use FunctionalTester; class Api_Admin_CustomFieldsCest extends CestAbstract { /** * @before setupComplete * @before login */ public function manageCustomFields(FunctionalTester $I): void { $I->wantTo('Manage custom fields via API.'); $this->testCrudApi( $I, '/api/admin/custom_fields', [ 'name' => 'Test Field', ], [ 'name' => 'Modified Field', ] ); } } ```
/content/code_sandbox/tests/Functional/Api_Admin_CustomFieldsCest.php
php
2016-04-30T21:41:23
2024-08-16T18:27:26
AzuraCast
AzuraCast/AzuraCast
2,978
126
```yaml # # AzuraCast Docker Compose Configuration File # # When updating, you will be prompted to replace this file with a new # version; you should do this whenever possible to take advantage of # new updates. # # If you need to customize this file, you can create a new file named: # docker-compose.override.yml # with any changes you need to make. # services: web: container_name: azuracast image: "ghcr.io/azuracast/azuracast:${AZURACAST_VERSION:-latest}" labels: - "com.centurylinklabs.watchtower.scope=azuracast" # Want to customize the HTTP/S ports? Follow the instructions here: # path_to_url#using-non-standard-ports ports: - '${AZURACAST_HTTP_PORT:-80}:${AZURACAST_HTTP_PORT:-80}' - '${AZURACAST_HTTPS_PORT:-443}:${AZURACAST_HTTPS_PORT:-443}' - '${AZURACAST_SFTP_PORT:-2022}:${AZURACAST_SFTP_PORT:-2022}' - '8000:8000' - '8005:8005' - '8006:8006' - '8010:8010' - '8015:8015' - '8016:8016' - '8020:8020' - '8025:8025' - '8026:8026' - '8030:8030' - '8035:8035' - '8036:8036' - '8040:8040' - '8045:8045' - '8046:8046' - '8050:8050' - '8055:8055' - '8056:8056' - '8060:8060' - '8065:8065' - '8066:8066' - '8070:8070' - '8075:8075' - '8076:8076' - '8090:8090' - '8095:8095' - '8096:8096' - '8100:8100' - '8105:8105' - '8106:8106' - '8110:8110' - '8115:8115' - '8116:8116' - '8120:8120' - '8125:8125' - '8126:8126' - '8130:8130' - '8135:8135' - '8136:8136' - '8140:8140' - '8145:8145' - '8146:8146' - '8150:8150' - '8155:8155' - '8156:8156' - '8160:8160' - '8165:8165' - '8166:8166' - '8170:8170' - '8175:8175' - '8176:8176' - '8180:8180' - '8185:8185' - '8186:8186' - '8190:8190' - '8195:8195' - '8196:8196' - '8200:8200' - '8205:8205' - '8206:8206' - '8210:8210' - '8215:8215' - '8216:8216' - '8220:8220' - '8225:8225' - '8226:8226' - '8230:8230' - '8235:8235' - '8236:8236' - '8240:8240' - '8245:8245' - '8246:8246' - '8250:8250' - '8255:8255' - '8256:8256' - '8260:8260' - '8265:8265' - '8266:8266' - '8270:8270' - '8275:8275' - '8276:8276' - '8280:8280' - '8285:8285' - '8286:8286' - '8290:8290' - '8295:8295' - '8296:8296' - '8300:8300' - '8305:8305' - '8306:8306' - '8310:8310' - '8315:8315' - '8316:8316' - '8320:8320' - '8325:8325' - '8326:8326' - '8330:8330' - '8335:8335' - '8336:8336' - '8340:8340' - '8345:8345' - '8346:8346' - '8350:8350' - '8355:8355' - '8356:8356' - '8360:8360' - '8365:8365' - '8366:8366' - '8370:8370' - '8375:8375' - '8376:8376' - '8380:8380' - '8385:8385' - '8386:8386' - '8390:8390' - '8395:8395' - '8396:8396' - '8400:8400' - '8405:8405' - '8406:8406' - '8410:8410' - '8415:8415' - '8416:8416' - '8420:8420' - '8425:8425' - '8426:8426' - '8430:8430' - '8435:8435' - '8436:8436' - '8440:8440' - '8445:8445' - '8446:8446' - '8450:8450' - '8455:8455' - '8456:8456' - '8460:8460' - '8465:8465' - '8466:8466' - '8470:8470' - '8475:8475' - '8476:8476' - '8480:8480' - '8485:8485' - '8486:8486' - '8490:8490' - '8495:8495' - '8496:8496' env_file: - azuracast.env - .env volumes: - station_data:/var/azuracast/stations - backups:/var/azuracast/backups - db_data:/var/lib/mysql - www_uploads:/var/azuracast/storage/uploads - shoutcast2_install:/var/azuracast/storage/shoutcast2 - stereo_tool_install:/var/azuracast/storage/stereo_tool - geolite_install:/var/azuracast/storage/geoip - sftpgo_data:/var/azuracast/storage/sftpgo - acme:/var/azuracast/storage/acme restart: unless-stopped ulimits: nofile: soft: 65536 hard: 65536 logging: options: max-size: "1m" max-file: "5" updater: container_name: azuracast_updater image: ghcr.io/azuracast/updater:latest restart: unless-stopped volumes: - /var/run/docker.sock:/var/run/docker.sock logging: options: max-size: "1m" max-file: "5" volumes: db_data: { } acme: { } shoutcast2_install: { } stereo_tool_install: { } geolite_install: { } sftpgo_data: { } station_data: { } www_uploads: { } backups: { } ```
/content/code_sandbox/docker-compose.sample.yml
yaml
2016-04-30T21:41:23
2024-08-16T18:27:26
AzuraCast
AzuraCast/AzuraCast
2,978
1,910
```php <?php declare(strict_types=1); namespace Functional; use FunctionalTester; class Station_IndexCest extends CestAbstract { /** * @before setupComplete * @before login */ public function viewIndex(FunctionalTester $I): void { $testStation = $this->getTestStation(); $stationId = $testStation->getId(); $I->wantTo('See a per-station management panel.'); $I->amOnPage('/station/' . $stationId); $I->seeResponseCodeIs(200); $I->seeInTitle($testStation->getName()); } } ```
/content/code_sandbox/tests/Functional/Station_IndexCest.php
php
2016-04-30T21:41:23
2024-08-16T18:27:26
AzuraCast
AzuraCast/AzuraCast
2,978
140
```yaml path: ./ jobs: 10 cache: ../www_tmp/phplint.cache extensions: - php - phtml exclude: - vendor ```
/content/code_sandbox/.phplint.yml
yaml
2016-04-30T21:41:23
2024-08-16T18:27:26
AzuraCast
AzuraCast/AzuraCast
2,978
37
```yaml actor: UnitTester suite_namespace: \Unit modules: enabled: - \App\Tests\Module error_level: "E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED" ```
/content/code_sandbox/tests/Unit.suite.yml
yaml
2016-04-30T21:41:23
2024-08-16T18:27:26
AzuraCast
AzuraCast/AzuraCast
2,978
44
```php <?php declare(strict_types=1); namespace Functional; use FunctionalTester; class Api_Stations_StreamersCest extends CestAbstract { /** * @before setupComplete * @before login */ public function manageStreamers(FunctionalTester $I): void { $I->wantTo('Manage station streamers via API.'); // Create new record $station = $this->getTestStation(); $station->setEnableStreamers(true); $this->em->persist($station); $this->em->flush(); $listUrl = '/api/station/' . $station->getId() . '/streamers'; $I->sendPOST( $listUrl, [ 'streamer_username' => 'test', 'streamer_password' => 'test', 'display_name' => 'Test Streamer', ] ); $I->seeResponseCodeIs(200); $newRecord = $I->grabDataFromResponseByJsonPath('links.self'); $newRecordSelfLink = $newRecord[0]; // Get single record. $I->sendGET($newRecordSelfLink); $I->seeResponseContainsJson( [ 'streamer_username' => 'test', 'display_name' => 'Test Streamer', ] ); // Modify record. $editJson = [ 'display_name' => 'Different Test Streamer', ]; $I->sendPUT($newRecordSelfLink, $editJson); // List all records. $I->sendGET($newRecordSelfLink); $I->seeResponseContainsJson($editJson); // Delete Record $I->sendDELETE($newRecordSelfLink); $I->sendGET($newRecordSelfLink); $I->seeResponseCodeIs(404); } } ```
/content/code_sandbox/tests/Functional/Api_Stations_StreamersCest.php
php
2016-04-30T21:41:23
2024-08-16T18:27:26
AzuraCast
AzuraCast/AzuraCast
2,978
404
```php <?php return [ 'defaultIncludes' => [ __DIR__ . '/util/psysh.php', ], ]; ```
/content/code_sandbox/.psysh.php
php
2016-04-30T21:41:23
2024-08-16T18:27:26
AzuraCast
AzuraCast/AzuraCast
2,978
28
```php <?php declare(strict_types=1); namespace Functional; use FunctionalTester; class Api_StationsCest extends CestAbstract { /** * @before setupComplete */ public function checkApiStation(FunctionalTester $I): void { $I->wantTo('Check station API endpoints.'); $testStation = $this->getTestStation(); $stationId = $testStation->getId(); $I->sendGET('/api/stations'); $I->seeResponseContainsJson([ 'name' => $testStation->getName(), ]); $I->sendGET('/api/station/' . $stationId); $I->seeResponseContainsJson([ 'name' => $testStation->getName(), ]); } } ```
/content/code_sandbox/tests/Functional/Api_StationsCest.php
php
2016-04-30T21:41:23
2024-08-16T18:27:26
AzuraCast
AzuraCast/AzuraCast
2,978
165
```php <?php namespace PHPSTORM_META { override( \Psr\Container\ContainerInterface::get(0), map( [ '' => '@', ] ) ); override( \DI\Container::get(0), map( [ '' => '@', ] ) ); override( \DI\FactoryInterface::make(0), map( [ '' => '@', ] ) ); override( \DI\Container::make(0), map( [ '' => '@', ] ) ); } ```
/content/code_sandbox/.phpstorm.meta.php
php
2016-04-30T21:41:23
2024-08-16T18:27:26
AzuraCast
AzuraCast/AzuraCast
2,978
127
```php <?php declare(strict_types=1); namespace Functional; use App\Acl; use App\Doctrine\ReloadableEntityManagerInterface; use App\Entity\ApiKey; use App\Entity\Repository\SettingsRepository; use App\Entity\Repository\StationRepository; use App\Entity\Repository\StorageLocationRepository; use App\Entity\Role; use App\Entity\RolePermission; use App\Entity\Settings; use App\Entity\Station; use App\Entity\StationMedia; use App\Entity\User; use App\Enums\GlobalPermissions; use App\Environment; use App\Media\MediaProcessor; use App\Security\SplitToken; use App\Tests\Module; use FunctionalTester; use Psr\Container\ContainerInterface; use RuntimeException; abstract class CestAbstract { protected ContainerInterface $di; protected Environment $environment; protected SettingsRepository $settingsRepo; protected StationRepository $stationRepo; protected ReloadableEntityManagerInterface $em; protected string $login_username = 'azuracast@azuracast.com'; protected string $login_password = 'AzuraCastFunctionalTests!'; protected ?string $login_api_key = null; private ?Station $test_station = null; protected function _inject(Module $testsModule): void { $this->di = $testsModule->container; $this->em = $testsModule->em; $this->settingsRepo = $this->di->get(SettingsRepository::class); $this->stationRepo = $this->di->get(StationRepository::class); $this->environment = $this->di->get(Environment::class); } public function _after(FunctionalTester $I): void { $this->em->clear(); if (null !== $this->test_station) { $I->sendDelete('/api/admin/station/' . $this->test_station->getId()); $this->em->clear(); } } protected function setupIncomplete(FunctionalTester $I): void { $I->wantTo('Start with an incomplete setup.'); $this->_cleanTables(); $settings = $this->settingsRepo->readSettings(); $settings->setSetupCompleteTime(0); $this->settingsRepo->writeSettings($settings); } protected function setupComplete(FunctionalTester $I): void { $this->_cleanTables(); /* Walk through the steps of completing setup automatically. */ $this->setupCompleteUser($I); $this->setupCompleteStations($I); $this->setupCompleteSettings($I); } protected function setupCompleteUser(FunctionalTester $I): void { // Create administrator account. $role = new Role(); $role->setName('Super Administrator'); $this->em->persist($role); $rha = new RolePermission($role); $rha->setActionName(GlobalPermissions::All); $this->em->persist($rha); // Create user account. $user = new User(); $user->setName('AzuraCast Test User'); $user->setEmail($this->login_username); $user->setNewPassword($this->login_password); $user->getRoles()->add($role); $user->setLocale('en_US.UTF-8'); $this->em->persist($user); // Create API key $key = SplitToken::generate(); $apiKey = new ApiKey($user, $key); $apiKey->setComment('Test Suite'); $this->em->persist($apiKey); $this->em->flush(); $this->login_api_key = (string)$key; $I->amBearerAuthenticated($this->login_api_key); $this->di->get(Acl::class)->reload(); } protected function setupCompleteStations(FunctionalTester $I): void { $I->sendPost( '/api/admin/stations', [ 'name' => 'Functional Test Radio', 'description' => 'Test radio station.', ] ); $stationId = $I->grabDataFromResponseByJsonPath('id'); $this->test_station = $this->em->find(Station::class, $stationId[0]); } protected function setupCompleteSettings(FunctionalTester $I): void { $I->sendPut( '/api/admin/settings/' . Settings::GROUP_GENERAL, [ 'base_url' => 'path_to_url ] ); } protected function getTestStation(): Station { if ($this->test_station instanceof Station) { $testStation = $this->em->refetch($this->test_station); if ($testStation instanceof Station) { return $testStation; } $this->test_station = null; } throw new RuntimeException('Test station is not established.'); } protected function uploadTestSong(): StationMedia { $testStation = $this->getTestStation(); $songSrc = '/var/azuracast/www/resources/error.mp3'; $storageLocation = $testStation->getMediaStorageLocation(); $storageLocationRepo = $this->di->get(StorageLocationRepository::class); $storageFs = $storageLocationRepo->getAdapter($storageLocation)->getFilesystem(); $storageFs->upload($songSrc, 'test.mp3'); /** @var MediaProcessor $mediaProcessor */ $mediaProcessor = $this->di->get(MediaProcessor::class); return $mediaProcessor->process($storageLocation, 'test.mp3'); } protected function _cleanTables(): void { $cleanTables = [ User::class, Role::class, Station::class, Settings::class, ]; foreach ($cleanTables as $cleanTable) { $this->em->createQuery('DELETE FROM ' . $cleanTable . ' t')->execute(); } $this->em->clear(); } protected function login(FunctionalTester $I): void { $this->setupComplete($I); $I->amOnPage('/'); $I->seeInCurrentUrl('/login'); $I->sendPost('/login', [ 'username' => $this->login_username, 'password' => $this->login_password, ]); $I->amOnPage('/'); $I->seeInCurrentUrl('/dashboard'); } protected function testCrudApi( FunctionalTester $I, string $listUrl, array $createJson = [], array $editJson = [] ): void { // Create new record $I->sendPOST($listUrl, $createJson); $I->seeResponseCodeIs(200); $newRecord = $I->grabDataFromResponseByJsonPath('links.self'); $newRecordSelfLink = $newRecord[0]; // Get single record. $I->sendGET($newRecordSelfLink); $I->seeResponseContainsJson($createJson); // Modify record. $I->sendPUT($newRecordSelfLink, $editJson); // List all records. $I->sendGET($newRecordSelfLink); $I->seeResponseContainsJson($editJson); // Delete Record $I->sendDELETE($newRecordSelfLink); $I->sendGET($newRecordSelfLink); $I->seeResponseCodeIs(404); } } ```
/content/code_sandbox/tests/Functional/CestAbstract.php
php
2016-04-30T21:41:23
2024-08-16T18:27:26
AzuraCast
AzuraCast/AzuraCast
2,978
1,601
```php <?php declare(strict_types=1); // Here you can initialize variables that will be available to your tests ```
/content/code_sandbox/tests/Unit/_bootstrap.php
php
2016-04-30T21:41:23
2024-08-16T18:27:26
AzuraCast
AzuraCast/AzuraCast
2,978
24
```php <?php // This is global bootstrap for autoloading $autoloader = require __DIR__.'/../vendor/autoload.php'; $autoloader->addClassMap([ 'Functional\CestAbstract' => __DIR__ . '/Functional/CestAbstract.php', ]); if (!function_exists('__')) { Gettext\TranslatorFunctions::register(new Gettext\Translator()); } // Clear output directory function rrmdir($dir) { if (is_dir($dir)) { $objects = array_diff(scandir($dir, SCANDIR_SORT_NONE) ?: [], ['.', '..', '.gitignore']); foreach ($objects as $object) { if (is_dir($dir . '/' . $object)) { rrmdir($dir . '/' . $object); } else { unlink($dir . '/' . $object); } } reset($objects); @rmdir($dir); } } rrmdir(__DIR__ . '/_output'); ```
/content/code_sandbox/tests/_bootstrap.php
php
2016-04-30T21:41:23
2024-08-16T18:27:26
AzuraCast
AzuraCast/AzuraCast
2,978
203
```php <?php declare(strict_types=1); namespace Functional; use FunctionalTester; class Api_Admin_UsersCest extends CestAbstract { /** * @before setupComplete * @before login */ public function manageUsers(FunctionalTester $I): void { $I->wantTo('Manage users via API.'); $this->testCrudApi( $I, '/api/admin/users', [ 'name' => 'Test User', 'email' => 'test@example.com', ], [ 'name' => 'Test User Renamed', ] ); } } ```
/content/code_sandbox/tests/Functional/Api_Admin_UsersCest.php
php
2016-04-30T21:41:23
2024-08-16T18:27:26
AzuraCast
AzuraCast/AzuraCast
2,978
135
```yaml base_url: "path_to_url" project_id_env: CROWDIN_PROJECT_ID api_token_env: CROWDIN_PERSONAL_TOKEN preserve_hierarchy: true files: - source: /translations/default.pot translation: /translations/%locale_with_underscore%.UTF-8/LC_MESSAGES/default.po ```
/content/code_sandbox/crowdin.yaml
yaml
2016-04-30T21:41:23
2024-08-16T18:27:26
AzuraCast
AzuraCast/AzuraCast
2,978
69
```php <?php declare(strict_types=1); namespace Functional; use FunctionalTester; class Api_Stations_MountsCest extends CestAbstract { /** * @before setupComplete * @before login */ public function manageMounts(FunctionalTester $I): void { $I->wantTo('Manage station mount points via API.'); $station = $this->getTestStation(); $this->testCrudApi( $I, '/api/station/' . $station->getId() . '/mounts', [ 'name' => '/radio.mp3', 'enable_autodj' => true, 'autodj_format' => 'mp3', 'autodj_bitrate' => 128, ], [ 'name' => '/music.mp3', 'enable_autodj' => false, ] ); } } ```
/content/code_sandbox/tests/Functional/Api_Stations_MountsCest.php
php
2016-04-30T21:41:23
2024-08-16T18:27:26
AzuraCast
AzuraCast/AzuraCast
2,978
196
```yaml gitConfig: core.autocrlf: input github: prebuilds: master: true branches: true pullRequests: true pullRequestsFromForks: true addCheck: false addComment: false addBadge: true ports: - name: AzuraCast HTTP port: 80 onOpen: ignore - name: AzuraCast HTTPS port: 443 onOpen: open-browser visibility: public - name: SFTP port: 2022 onOpen: ignore - name: MariaDB port: 3306 onOpen: ignore - name: Redis port: 6379 onOpen: ignore - name: Broadcast Ports port: 8000-8999 onOpen: ignore tasks: - name: Backend init: | cp dev.env .env cp azuracast.dev.env azuracast.env cp docker-compose.sample.yml docker-compose.yml cp docker-compose.dev.yml docker-compose.override.yml docker-compose build command: | bash util/setup_gitpod.sh bash docker.sh install-dev gp sync-done install make bash - name: Frontend command: | gp sync-await install make frontend-bash ```
/content/code_sandbox/.gitpod.yml
yaml
2016-04-30T21:41:23
2024-08-16T18:27:26
AzuraCast
AzuraCast/AzuraCast
2,978
306
```php <?php declare(strict_types=1); namespace Functional; use FunctionalTester; class Api_Frontend_AccountCest extends CestAbstract { /** * @before setupComplete * @before login */ public function checkAccount(FunctionalTester $I): void { $I->wantTo('Check frontend account API functions.'); // GET me endpoint $I->sendGet('/api/frontend/account/me'); $I->seeResponseCodeIsSuccessful(); $I->seeResponseContainsJson( [ 'email' => $this->login_username, 'name' => 'AzuraCast Test User', ] ); // PUT me endpoint $I->sendPut('/api/frontend/account/me', [ 'name' => 'AzuraCast User with New Name', ]); $I->seeResponseCodeIsSuccessful(); $I->sendGet('/api/frontend/account/me'); $I->seeResponseContainsJson([ 'name' => 'AzuraCast User with New Name', ]); // PUT password endpoint $I->sendPut('/api/frontend/account/password', [ 'current_password' => 'wrongpassword', 'new_password' => 'asdfasdfasdfasdf', ]); $I->seeResponseCodeIs(400); // GET twofactor endpoint $I->sendGet('/api/frontend/account/two-factor'); $I->seeResponseCodeIsSuccessful(); $I->seeResponseContainsJson([ 'two_factor_enabled' => false, ]); // PUT twofactor endpoint without secret $I->sendPut('/api/frontend/account/two-factor'); $I->seeResponseCodeIsSuccessful(); // CRUD API Keys $createJson = [ 'comment' => 'API Key Test', ]; $I->sendPost('/api/frontend/account/api-keys', $createJson); $I->seeResponseCodeIsSuccessful(); $newRecord = $I->grabDataFromResponseByJsonPath('links.self'); $newRecordSelfLink = $newRecord[0]; $I->sendGet($newRecordSelfLink); $I->seeResponseContainsJson($createJson); $I->sendGet($newRecordSelfLink); $I->seeResponseContainsJson($createJson); $I->sendDelete($newRecordSelfLink); $I->sendGet($newRecordSelfLink); $I->seeResponseCodeIs(404); } } ```
/content/code_sandbox/tests/Functional/Api_Frontend_AccountCest.php
php
2016-04-30T21:41:23
2024-08-16T18:27:26
AzuraCast
AzuraCast/AzuraCast
2,978
535
```php <?php declare(strict_types=1); namespace Unit; use App\Entity\Api\StationPlaylistQueue; use App\Radio\AutoDJ\DuplicatePrevention; use App\Tests\Module; use Codeception\Test\Unit; use UnitTester; class DuplicatePreventionTest extends Unit { protected UnitTester $tester; protected DuplicatePrevention $duplicatePrevention; protected function _inject(Module $testsModule): void { $di = $testsModule->container; $this->duplicatePrevention = $di->get(DuplicatePrevention::class); } public function testDistinctTracks(): void { $eligibleTrack = new StationPlaylistQueue(); $eligibleTrack->artist = 'Foo Fighters feat. AzuraCast Testers'; $eligibleTrack->title = 'Best of You'; $eligibleTracks = [$eligibleTrack]; $fullDuplicateTest = [ [ 'title' => 'Best of You', 'artist' => 'Foo Fighters', ], ]; $fullDuplicateResult = $this->duplicatePrevention->getDistinctTrack($eligibleTracks, $fullDuplicateTest); $this->assertNull($fullDuplicateResult); $artistDuplicateTest = [ [ 'title' => 'Everlong', 'artist' => 'Foo Fighters', ], ]; $artistDuplicateResult = $this->duplicatePrevention->getDistinctTrack($eligibleTracks, $artistDuplicateTest); $this->assertNull($artistDuplicateResult); $partialDuplicateTest = [ [ 'title' => 'Testing Song', 'artist' => 'Foo Fighters feat. Fall Out Boy', ], ]; $partialDuplicateResult = $this->duplicatePrevention->getDistinctTrack($eligibleTracks, $partialDuplicateTest); $this->assertNull($partialDuplicateResult); $noDuplicatesTest = [ [ 'title' => 'Testing Song 1', 'artist' => 'Panic! at the Disco', ], [ 'title' => 'Lost Memory', 'artist' => '', ], ]; $noDuplicatesResult = $this->duplicatePrevention->getDistinctTrack($eligibleTracks, $noDuplicatesTest); $this->assertNotNull($noDuplicatesResult); } } ```
/content/code_sandbox/tests/Unit/DuplicatePreventionTest.php
php
2016-04-30T21:41:23
2024-08-16T18:27:26
AzuraCast
AzuraCast/AzuraCast
2,978
482
```php <?php /** * Inherited Methods * @method void wantToTest($text) * @method void wantTo($text) * @method void execute($callable) * @method void expectTo($prediction) * @method void expect($prediction) * @method void amGoingTo($argumentation) * @method void am($role) * @method void lookForwardTo($achieveValue) * @method void comment($description) * @method \Codeception\Lib\Friend haveFriend($name, $actorClass = NULL) * * @SuppressWarnings(PHPMD) */ class UnitTester extends \Codeception\Actor { use _generated\UnitTesterActions; /** * Define custom actions here */ } ```
/content/code_sandbox/tests/_support/UnitTester.php
php
2016-04-30T21:41:23
2024-08-16T18:27:26
AzuraCast
AzuraCast/AzuraCast
2,978
152
```php <?php declare(strict_types=1); namespace Functional; use FunctionalTester; class Frontend_IndexCest extends CestAbstract { /** * @before setupComplete * @before login */ public function seeHomepage(FunctionalTester $I): void { $I->wantTo('See the proper data on the homepage.'); $I->amOnPage('/dashboard'); $I->seeInTitle('Dashboard'); } } ```
/content/code_sandbox/tests/Functional/Frontend_IndexCest.php
php
2016-04-30T21:41:23
2024-08-16T18:27:26
AzuraCast
AzuraCast/AzuraCast
2,978
99
```php <?php declare(strict_types=1); namespace Functional; use App\Webhook\Enums\WebhookTypes; use FunctionalTester; class Api_Stations_WebhooksCest extends CestAbstract { /** * @before setupComplete * @before login */ public function manageWebhooks(FunctionalTester $I): void { $I->wantTo('Manage station webhooks via API.'); $station = $this->getTestStation(); $this->testCrudApi( $I, '/api/station/' . $station->getId() . '/webhooks', [ 'type' => WebhookTypes::Generic->value, 'name' => 'Test Webhook', ], [ 'name' => 'Modified Webhook', ] ); } } ```
/content/code_sandbox/tests/Functional/Api_Stations_WebhooksCest.php
php
2016-04-30T21:41:23
2024-08-16T18:27:26
AzuraCast
AzuraCast/AzuraCast
2,978
175
```php <?php declare(strict_types=1); namespace Unit; use App\Entity\Listener; use Carbon\CarbonImmutable; use Codeception\Test\Unit; use DateTimeZone; class ListenerIntervalTest extends Unit { public function testListenerIntervals(): void { $utc = new DateTimeZone('UTC'); $intervals = [ [ 'start' => CarbonImmutable::parse('2019-12-01 00:00:00', $utc)->getTimestamp(), 'end' => CarbonImmutable::parse('2019-12-01 02:05:00', $utc)->getTimestamp(), ], [ 'start' => CarbonImmutable::parse('2019-12-01 00:00:00', $utc)->getTimestamp(), 'end' => CarbonImmutable::parse('2019-12-01 03:00:00', $utc)->getTimestamp(), ], [ 'start' => CarbonImmutable::parse('2019-12-01 05:00:00', $utc)->getTimestamp(), 'end' => CarbonImmutable::parse('2019-12-01 07:05:00', $utc)->getTimestamp(), ], [ 'start' => CarbonImmutable::parse('2019-12-01 05:05:30', $utc)->getTimestamp(), 'end' => CarbonImmutable::parse('2019-12-01 08:00:00', $utc)->getTimestamp(), ], ]; $expected = 6 * 60 * 60; self::assertEquals($expected, Listener::getListenerSeconds($intervals)); } } ```
/content/code_sandbox/tests/Unit/ListenerIntervalTest.php
php
2016-04-30T21:41:23
2024-08-16T18:27:26
AzuraCast
AzuraCast/AzuraCast
2,978
352
```shell #!/usr/bin/env bash echo "Ansible installation is now a standalone repository. For more information, visit:" echo "path_to_url" exit 0 ```
/content/code_sandbox/update.sh
shell
2016-04-30T21:41:23
2024-08-16T18:27:26
AzuraCast
AzuraCast/AzuraCast
2,978
34
```javascript import {defineConfig} from 'vite' import vue from '@vitejs/plugin-vue' import {glob} from "glob"; import {resolve} from "path"; import eslint from "vite-plugin-eslint"; const inputs = glob.sync('./frontend/js/pages/**/*.js').reduce((acc, path) => { // vue/pages/Admin/Index becomes AdminIndex const entry = path.replace(/\.js$/g, '') .replace(/^frontend\/js\/pages\//g, '') .replace(/\//g, ''); acc[entry] = resolve(__dirname, path) return acc }, {}); inputs['Layout'] = resolve(__dirname, './frontend/js/layout.js'); console.log(inputs); // path_to_url export default defineConfig({ root: resolve(__dirname, './frontend/'), base: '/static/vite_dist', build: { rollupOptions: { input: inputs, output: { manualChunks: { vue: ['vue'], lodash: ['lodash'], leaflet: ['leaflet'], hlsjs: ['hls.js'], zxcvbn: ['zxcvbn'] }, chunkFileNames: (assetInfo) => { if (assetInfo.name) { if (assetInfo.name === 'translations') { const translationParts = assetInfo.facadeModuleId .split('/'); const translationPath = translationParts[translationParts.length - 2]; return `translations-${translationPath}-[hash:8].js` } const assetName = assetInfo.name.replace( '.vue_vue_type_style_index_0_lang', '' ).replace( '.vue_vue_type_script_setup_true_lang', '' ); return `${assetName}-[hash:8].js`; } return '[name]-[hash:8].js'; } } }, manifest: true, emptyOutDir: true, chunkSizeWarningLimit: '1m', outDir: resolve(__dirname, './web/static/vite_dist') }, server: { strictPort: true, host: true, fs: { allow: [ resolve(__dirname, './frontend/'), resolve(__dirname, './node_modules/'), resolve(__dirname, './translations/') ] } }, resolve: { alias: { '!': resolve(__dirname, '.'), '~': resolve(__dirname, './frontend') }, extensions: ['.mjs', '.js', '.mts', '.ts', '.jsx', '.tsx', '.json', '.vue'] }, plugins: [ vue(), eslint({ fix: true }) ], }) ```
/content/code_sandbox/vite.config.js
javascript
2016-04-30T21:41:23
2024-08-16T18:27:26
AzuraCast
AzuraCast/AzuraCast
2,978
573
```shell #!/usr/bin/env bash # shellcheck disable=SC2145,SC2178,SC2120,SC2162 PODMAN_MODE=0 # Docker and Docker Compose aliases d() { if [[ $PODMAN_MODE -ne 0 ]]; then podman "$@" else docker "$@" fi } dc() { if [[ $PODMAN_MODE -ne 0 ]]; then podman-compose "$@" else if [[ $(docker compose version) ]]; then docker compose "$@" else docker-compose "$@" fi fi } # Functions to manage .env files __dotenv= __dotenv_file= __dotenv_cmd=.env .env() { REPLY=() [[ $__dotenv_file || ${1-} == -* ]] || .env.--file .env || return if declare -F -- ".env.${1-}" >/dev/null; then .env."$@" return fi return 64 } .env.-f() { .env.--file "$@"; } .env.get() { .env::arg "get requires a key" "$@" && [[ "$__dotenv" =~ ^(.*(^|$'\n'))([ ]*)"$1="(.*)$ ]] && REPLY=${BASH_REMATCH[4]%%$'\n'*} && REPLY=${REPLY%"${REPLY##*[![:space:]]}"} } .env.parse() { local line key while IFS= read -r line; do line=${line#"${line%%[![:space:]]*}"} # trim leading whitespace line=${line%"${line##*[![:space:]]}"} # trim trailing whitespace if [[ ! "$line" || "$line" == '#'* ]]; then continue; fi if (($#)); then for key; do if [[ $key == "${line%%=*}" ]]; then REPLY+=("$line") break fi done else REPLY+=("$line") fi done <<<"$__dotenv" ((${#REPLY[@]})) } .env.export() { ! .env.parse "$@" || export "${REPLY[@]}"; } .env.set() { .env::file load || return local key saved=$__dotenv while (($#)); do key=${1#+} key=${key%%=*} if .env.get "$key"; then REPLY=() if [[ $1 == +* ]]; then shift continue # skip if already found elif [[ $1 == *=* ]]; then __dotenv=${BASH_REMATCH[1]}${BASH_REMATCH[3]}$1$'\n'${BASH_REMATCH[4]#*$'\n'} else __dotenv=${BASH_REMATCH[1]}${BASH_REMATCH[4]#*$'\n'} continue # delete all occurrences fi elif [[ $1 == *=* ]]; then __dotenv+="${1#+}"$'\n' fi shift done [[ $__dotenv == "$saved" ]] || .env::file save } .env.puts() { echo "${1-}" >>"$__dotenv_file" && __dotenv+="$1"$'\n'; } .env.generate() { .env::arg "key required for generate" "$@" || return .env.get "$1" && return || REPLY=$("${@:2}") || return .env::one "generate: ouptut of '${*:2}' has more than one line" "$REPLY" || return .env.puts "$1=$REPLY" } .env.--file() { .env::arg "filename required for --file" "$@" || return __dotenv_file=$1 .env::file load || return (($# < 2)) || .env "${@:2}" } .env::arg() { [[ "${2-}" ]] || { echo "$__dotenv_cmd: $1" >&2 return 64 }; } .env::one() { [[ "$2" != *$'\n'* ]] || .env::arg "$1"; } .env::file() { local REPLY=$__dotenv_file case "$1" in load) __dotenv= ! [[ -f "$REPLY" ]] || __dotenv="$(<"$REPLY")"$'\n' || return ;; save) if [[ -L "$REPLY" ]] && declare -F -- realpath.resolved >/dev/null; then realpath.resolved "$REPLY" fi { [[ ! -f "$REPLY" ]] || cp -p "$REPLY" "$REPLY.bak"; } && printf %s "$__dotenv" >"$REPLY.bak" && mv "$REPLY.bak" "$REPLY" ;; esac } # Shortcut to convert semver version (x.yyy.zzz) into a comparable number. version-number() { echo "$@" | awk -F. '{ printf("%03d%03d%03d\n", $1,$2,$3); }' } # Get the current release channel for AzuraCast get-release-channel() { local AZURACAST_VERSION="latest" if [[ -f .env ]]; then .env --file .env get AZURACAST_VERSION AZURACAST_VERSION="${REPLY:-latest}" fi echo "$AZURACAST_VERSION" } get-release-branch-name() { if [[ $(get-release-channel) == "stable" ]]; then echo "stable" else echo "main" fi } # This is a general-purpose function to ask Yes/No questions in Bash, either # with or without a default answer. It keeps repeating the question until it # gets a valid answer. ask() { # path_to_url local prompt default reply while true; do if [[ "${2:-}" == "Y" ]]; then prompt="Y/n" default=Y elif [[ "${2:-}" == "N" ]]; then prompt="y/N" default=N else prompt="y/n" default= fi # Ask the question (not using "read -p" as it uses stderr not stdout) echo -n "$1 [$prompt] " read reply # Default? if [[ -z "$reply" ]]; then reply=${default} fi # Check if the reply is valid case "$reply" in Y* | y*) return 0 ;; N* | n*) return 1 ;; esac done } # Generate a prompt to set an environment file value. envfile-set() { local VALUE INPUT .env --file .env .env get "$1" VALUE=${REPLY:-$2} echo -n "$3 [$VALUE]: " read INPUT VALUE=${INPUT:-$VALUE} .env set "${1}=${VALUE}" } # # Configure the ports used by AzuraCast. # setup-ports() { envfile-set "AZURACAST_HTTP_PORT" "80" "Port to use for HTTP connections" envfile-set "AZURACAST_HTTPS_PORT" "443" "Port to use for HTTPS connections" envfile-set "AZURACAST_SFTP_PORT" "2022" "Port to use for SFTP connections" } # # Configure release mode settings. # setup-release() { if [[ ! -f .env ]]; then curl -fsSL path_to_url -o .env fi local OLD_RELEASE_CHANNEL .env --file .env get AZURACAST_VERSION OLD_RELEASE_CHANNEL="${REPLY:-latest}" local AZURACAST_VERSION="${OLD_RELEASE_CHANNEL}" if [[ ! -z "${1}" ]]; then echo "Setting release channel to the specific value: ${1}" AZURACAST_VERSION="${1}" elif [[ $AZURACAST_VERSION == "latest" ]]; then if ask "Your current release channel is 'Rolling Release'. Switch to 'Stable' release channel?" N; then AZURACAST_VERSION="stable" fi elif [[ $AZURACAST_VERSION == "stable" ]]; then if ask "Your current release channel is 'Stable'. Switch to 'Rolling Release' release channel?" N; then AZURACAST_VERSION="latest" fi else if ask "Your current release channel is locked to a stable release, version '${OLD_RELEASE_CHANNEL}'. Switch to the 'Stable' release channel?" N; then AZURACAST_VERSION="stable" fi fi .env --file .env set AZURACAST_VERSION=${AZURACAST_VERSION} if [[ $AZURACAST_VERSION != $OLD_RELEASE_CHANNEL ]]; then if ask "You should update the Docker Utility Script after changing release channels. Automatically update it now?" Y; then update-self fi fi } check-install-requirements() { local CURRENT_OS CURRENT_ARCH REQUIRED_COMMANDS SCRIPT_DIR set -e echo "Checking installation requirements for AzuraCast..." CURRENT_OS=$(uname -s) if [[ $CURRENT_OS == "Linux" ]]; then echo -en "\e[32m[PASS]\e[0m Operating System: ${CURRENT_OS}\n" else echo -en "\e[41m[FAIL]\e[0m Operating System: ${CURRENT_OS}\n" echo " You are running an unsupported operating system." echo " Automated AzuraCast installation is not currently supported on this" echo " operating system." exit 1 fi CURRENT_ARCH=$(uname -m) if [[ $CURRENT_ARCH == "x86_64" ]]; then echo -en "\e[32m[PASS]\e[0m Architecture: ${CURRENT_ARCH}\n" elif [[ $CURRENT_ARCH == "aarch64" ]]; then echo -en "\e[32m[PASS]\e[0m Architecture: ${CURRENT_ARCH}\n" else echo -en "\e[41m[FAIL]\e[0m Architecture: ${CURRENT_ARCH}\n" echo " You are running an unsupported processor architecture." echo " Automated AzuraCast installation is not currently supported on this " echo " operating system." exit 1 fi REQUIRED_COMMANDS=(curl awk) for COMMAND in "${REQUIRED_COMMANDS[@]}" ; do if [[ $(command -v "$COMMAND") ]]; then echo -en "\e[32m[PASS]\e[0m Command Present: ${COMMAND}\n" else echo -en "\e[41m[FAIL]\e[0m Command Present: ${COMMAND}\n" echo " ${COMMAND} does not appear to be installed." echo " Install ${COMMAND} using your host's package manager," echo " then continue installing using this script." exit 1 fi done if [[ $EUID -ne 0 ]]; then if [[ $(command -v sudo) ]]; then echo -en "\e[32m[PASS]\e[0m User Permissions\n" else echo -en "\e[41m[FAIL]\e[0m User Permissions\n" echo " You are not currently the root user, and " echo " 'sudo' does not appear to be installed." echo " Install sudo using your host's package manager," echo " then continue installing using this script." exit 1 fi else echo -en "\e[32m[PASS]\e[0m User Permissions\n" fi SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" if [[ $SCRIPT_DIR == "/var/azuracast" ]]; then echo -en "\e[32m[PASS]\e[0m Installation Directory\n" else echo -en "\e[93m[WARN]\e[0m Installation Directory\n" echo " AzuraCast is not installed in /var/azuracast, as is recommended" echo " for most installations. This will not prevent AzuraCast from" echo " working, but you will need to update any instructions in our" echo " documentation to reflect your current directory:" echo " $SCRIPT_DIR" fi echo -en "\e[32m[PASS]\e[0m All requirements met!\n" set +e } install-docker() { set -e curl -fsSL get.docker.com -o get-docker.sh sh get-docker.sh rm get-docker.sh if [[ $EUID -ne 0 ]]; then sudo usermod -aG docker "$(whoami)" echo "You must log out or restart to apply necessary Docker permissions changes." echo "Restart, then continue installing using this script." exit 1 fi set +e } install-docker-compose() { set -e echo "Installing Docker Compose..." curl -fsSL -o docker-compose path_to_url -m) ARCHITECTURE=amd64 if [ "$(uname -m)" = "aarch64" ]; then ARCHITECTURE=arm64 fi curl -fsSL -o docker-compose-switch path_to_url{ARCHITECTURE} if [[ $EUID -ne 0 ]]; then sudo chmod a+x ./docker-compose sudo chmod a+x ./docker-compose-switch sudo mv ./docker-compose /usr/libexec/docker/cli-plugins/docker-compose sudo mv ./docker-compose-switch /usr/local/bin/docker-compose else chmod a+x ./docker-compose chmod a+x ./docker-compose-switch mv ./docker-compose /usr/libexec/docker/cli-plugins/docker-compose mv ./docker-compose-switch /usr/local/bin/docker-compose fi echo "Docker Compose updated!" set +e } run-installer() { local AZURACAST_RELEASE_BRANCH AZURACAST_RELEASE_BRANCH=$(get-release-branch-name) if [[ ! -f .env ]]; then curl -fsSL path_to_url -o .env fi if [[ ! -f azuracast.env ]]; then curl -fsSL path_to_url -o azuracast.env fi if [[ ! -f docker-compose.yml ]]; then curl -fsSL path_to_url -o docker-compose.yml fi touch docker-compose.new.yml local dc_config_test=$(dc -f docker-compose.new.yml config 2>/dev/null) if [ $? -ne 0 ]; then if ask "Docker Compose needs to be updated to continue. Update to latest version?" Y; then install-docker-compose fi fi curl -fsSL path_to_url -o docker-compose.installer.yml dc -p azuracast_installer -f docker-compose.installer.yml pull dc -p azuracast_installer -f docker-compose.installer.yml run --rm installer install "$@" rm docker-compose.installer.yml } # # Run the initial installer of Docker and AzuraCast. # Usage: ./docker.sh install # install() { check-install-requirements if [[ $PODMAN_MODE -ne 0 ]]; then echo "Podman was detected and will be used instead of Docker..." if [[ $(command -v podman-compose) ]]; then echo "Podman-compose is installed!" else echo "Podman mode is active, but podman-compose is not found." echo "Install it by following the instructions on this page:" echo "path_to_url" exit 1 fi else if [[ $(command -v docker) && $(docker --version) ]]; then echo "Docker is already installed! Continuing..." else if ask "Docker does not appear to be installed. Install Docker now?" Y; then install-docker fi fi if [[ $(docker compose version) ]]; then echo "Docker Compose v2 is already installed. Continuing..." else if [[ $(command -v docker-compose) ]]; then echo "Docker Compose is already installed. Continuing..." else if ask "Docker Compose does not appear to be installed. Install Docker Compose now?" Y; then install-docker-compose fi fi fi fi setup-release run-installer "$@" # Installer creates a file at docker-compose.new.yml; copy it to the main spot. if [[ -s docker-compose.new.yml ]]; then if [[ -f docker-compose.yml ]]; then rm docker-compose.yml fi mv docker-compose.new.yml docker-compose.yml fi # If this script is running as a non-root user, set the PUID/PGID in the environment vars appropriately. if [[ $EUID -ne 0 ]]; then .env --file .env set AZURACAST_PUID="$(id -u)" .env --file .env set AZURACAST_PGID="$(id -g)" fi if [[ $PODMAN_MODE -ne 0 ]]; then .env --file .env set AZURACAST_PODMAN_MODE=true fi dc pull dc run --rm web -- azuracast_install "$@" dc up -d exit } install-dev() { if [[ $(command -v docker) && $(docker --version) ]]; then echo "Docker is already installed! Continuing..." else if ask "Docker does not appear to be installed. Install Docker now?" Y; then install-docker fi fi if [[ $(docker compose version) ]]; then echo "Docker Compose v2 is already installed. Continuing..." else if [[ $(command -v docker-compose) ]]; then echo "Docker Compose is already installed. Continuing..." else if ask "Docker Compose does not appear to be installed. Install Docker Compose now?" Y; then install-docker-compose fi fi fi if [[ ! -f docker-compose.yml ]]; then cp docker-compose.sample.yml docker-compose.yml fi if [[ ! -f docker-compose.override.yml ]]; then cp docker-compose.dev.yml docker-compose.override.yml fi if [[ ! -f .env ]]; then cp dev.env .env fi if [[ ! -f azuracast.env ]]; then cp azuracast.dev.env azuracast.env echo "Customize azuracast.env file now before continuing. Re-run this command to continue installation." exit fi # If this script is running as a non-root user, set the PUID/PGID in the environment vars appropriately. if [[ $EUID -ne 0 ]]; then .env --file .env set AZURACAST_PUID="$(id -u)" .env --file .env set AZURACAST_PGID="$(id -g)" fi if [[ $PODMAN_MODE -ne 0 ]]; then .env --file .env set AZURACAST_PODMAN_MODE=true fi dc build dc run --rm web -- azuracast_dev_install "$@" dc up -d exit } # # Update the Docker images and codebase. # Usage: ./docker.sh update # update() { echo "[NOTICE] Before you continue, please make sure you have a recent snapshot of your system and or backed it up." if ask "Are you ready to continue with the update?" Y; then # Check for a new Docker Utility Script. local AZURACAST_RELEASE_BRANCH AZURACAST_RELEASE_BRANCH=$(get-release-branch-name) curl -fsSL path_to_url -o docker.new.sh local UTILITY_FILES_MATCH UTILITY_FILES_MATCH="$( cmp --silent docker.sh docker.new.sh echo $? )" local UPDATE_UTILITY=0 if [[ ${UTILITY_FILES_MATCH} -ne 0 ]]; then if ask "The Docker Utility Script has changed since your version. Update to latest version?" Y; then UPDATE_UTILITY=1 fi fi if [[ ${UPDATE_UTILITY} -ne 0 ]]; then mv docker.new.sh docker.sh chmod a+x docker.sh echo "A new Docker Utility Script has been downloaded." echo "Please re-run the update process to continue." exit else rm docker.new.sh fi # Check Docker version. if [[ $PODMAN_MODE -eq 0 ]]; then DOCKER_VERSION=$(docker version -f "{{.Server.Version}}") DOCKER_VERSION_MAJOR=$(echo "$DOCKER_VERSION"| cut -d'.' -f 1) if [ "${DOCKER_VERSION_MAJOR}" -ge 20 ]; then echo "Docker server (version ${DOCKER_VERSION}) meets minimum version requirements." else if ask "Docker is out of date on this server. Attempt automatic upgrade?" Y; then install-docker install-docker-compose fi fi fi run-installer --update "$@" # Check for updated Docker Compose config. local COMPOSE_FILES_MATCH if [[ ! -s docker-compose.new.yml ]]; then curl -fsSL path_to_url -o docker-compose.new.yml fi COMPOSE_FILES_MATCH="$( cmp --silent docker-compose.yml docker-compose.new.yml echo $? )" if [[ ${COMPOSE_FILES_MATCH} -ne 0 ]]; then dc -f docker-compose.new.yml pull dc down --timeout 60 cp docker-compose.yml docker-compose.backup.yml mv docker-compose.new.yml docker-compose.yml else rm docker-compose.new.yml dc pull dc down --timeout 60 fi dc run --rm web -- azuracast_update "$@" dc up -d if ask "Clean up all stopped Docker containers and images to save space?" Y; then d system prune -f fi echo "Update complete!" fi exit } # # Update this Docker utility script. # Usage: ./docker.sh update-self # update-self() { local AZURACAST_RELEASE_BRANCH AZURACAST_RELEASE_BRANCH=$(get-release-branch-name) curl -H 'Cache-Control: no-cache, no-store' -fsSL \ path_to_url +%s) \ -o docker.sh chmod a+x docker.sh echo "New Docker utility script downloaded." exit } # # Run a CLI command inside the Docker container. # Usage: ./docker.sh cli [command] # cli() { dc exec --user="azuracast" web azuracast_cli "$@" exit } # # Enter the bash terminal of the running web container. # Usage: ./docker.sh bash # bash() { dc exec --user="azuracast" web bash exit } # # Enter the MariaDB database management terminal with the correct credentials. # db() { dc exec web azuracast_db exit } # # Back up the Docker volumes to a .tar.gz file. # Usage: # ./docker.sh backup [/custom/backup/dir/custombackupname.zip] # backup() { local BACKUP_PATH BACKUP_DIR BACKUP_FILENAME BACKUP_EXT BACKUP_PATH=$(readlink -f ${1:-"./backup.tar.gz"}) BACKUP_DIR=$(dirname -- "$BACKUP_PATH") BACKUP_FILENAME=$(basename -- "$BACKUP_PATH") BACKUP_EXT="${BACKUP_FILENAME##*.}" shift # Prepare permissions if [[ $EUID -ne 0 ]]; then .env --file .env set AZURACAST_PUID="$(id -u)" .env --file .env set AZURACAST_PGID="$(id -g)" fi dc exec --user="azuracast" web azuracast_cli azuracast:backup "/var/azuracast/backups/${BACKUP_FILENAME}" "$@" # Move from Docker volume to local filesystem d run --rm -v "azuracast_backups:/backup_src" \ -v "$BACKUP_DIR:/backup_dest" \ busybox mv "/backup_src/${BACKUP_FILENAME}" "/backup_dest/${BACKUP_FILENAME}" echo "Backup completed." exit } # # Restore an AzuraCast backup into Docker. # Usage: # ./docker.sh restore [/custom/backup/dir/custombackupname.zip] # restore() { if [[ ! -f .env ]] || [[ ! -f azuracast.env ]]; then echo "AzuraCast hasn't been installed yet on this server." echo "You should run './docker.sh install' first before restoring." exit 1 fi if ask "Restoring will remove any existing AzuraCast installation data, replacing it with your backup. Continue?" Y; then if [[ $1 != "" ]]; then local BACKUP_PATH BACKUP_DIR BACKUP_FILENAME BACKUP_EXT BACKUP_PATH=$(readlink -f ${1:-"./backup.tar.gz"}) BACKUP_DIR=$(dirname -- "$BACKUP_PATH") BACKUP_FILENAME=$(basename -- "$BACKUP_PATH") BACKUP_EXT="${BACKUP_FILENAME##*.}" shift if [[ ! -f ${BACKUP_PATH} ]]; then echo "File '${BACKUP_PATH}' does not exist. Nothing to restore." exit 1 fi dc down # Remove most AzuraCast volumes but preserve some essential ones. d volume rm -f $(d volume ls | grep 'azuracast' | grep -v 'station\|install' | awk 'NR>1 {print $2}') d volume create azuracast_backups # Move from local filesystem to Docker volume d run --rm -v "$BACKUP_DIR:/backup_src" \ -v "azuracast_backups:/backup_dest" \ busybox mv "/backup_src/${BACKUP_FILENAME}" "/backup_dest/${BACKUP_FILENAME}" # Prepare permissions if [[ $EUID -ne 0 ]]; then .env --file .env set AZURACAST_PUID="$(id -u)" .env --file .env set AZURACAST_PGID="$(id -g)" fi dc run --rm web -- azuracast_restore "/var/azuracast/backups/${BACKUP_FILENAME}" "$@" # Move file back from volume to local filesystem d run --rm -v "azuracast_backups:/backup_src" \ -v "$BACKUP_DIR:/backup_dest" \ busybox mv "/backup_src/${BACKUP_FILENAME}" "/backup_dest/${BACKUP_FILENAME}" dc down --timeout 30 dc up -d else dc down # Remove most AzuraCast volumes but preserve some essential ones. d volume rm -f $(d volume ls | grep 'azuracast' | grep -v 'station\|backups\|install' | awk 'NR>1 {print $2}') dc run --rm web -- azuracast_restore "$@" dc down --timeout 30 dc up -d fi fi exit } # # Restore the Docker volumes from a legacy backup format .tar.gz file. # Usage: # ./docker.sh restore [/custom/backup/dir/custombackupname.tar.gz] # restore-legacy() { local APP_BASE_DIR BACKUP_PATH BACKUP_DIR BACKUP_FILENAME APP_BASE_DIR=$(pwd) BACKUP_PATH=${1:-"./backup.tar.gz"} BACKUP_DIR=$(cd "$(dirname "$BACKUP_PATH")" && pwd) BACKUP_FILENAME=$(basename "$BACKUP_PATH") cd "$APP_BASE_DIR" || exit if [ -f "$BACKUP_PATH" ]; then dc down --timeout 30 d volume rm azuracast_db_data azuracast_station_data d volume create azuracast_db_data d volume create azuracast_station_data d run --rm -v "$BACKUP_DIR:/backup" \ -v azuracast_db_data:/azuracast/db \ -v azuracast_station_data:/azuracast/stations \ busybox tar zxvf "/backup/$BACKUP_FILENAME" dc up -d else echo "File $BACKUP_PATH does not exist in this directory. Nothing to restore." exit 1 fi exit } # # Stop all Docker containers and remove related volumes. # Usage: ./docker.sh uninstall # uninstall() { if ask "This operation is destructive and will wipe your existing Docker containers. Continue?" N; then dc down -v dc rm -f d volume prune -f echo "All AzuraCast Docker containers and volumes were removed." echo "To remove *all* Docker containers and volumes, run:" echo " docker stop \$(docker ps -a -q)" echo " docker rm \$(docker ps -a -q)" echo " docker volume prune -f" echo "" fi exit } # # Roll back to a specific stable release version. # rollback() { local AZURACAST_ROLLBACK_VERSION AZURACAST_ROLLBACK_VERSION="$1" if [[ -z "$AZURACAST_ROLLBACK_VERSION" ]]; then echo "No version specified. Specify a version, like 0.19.0." exit 1 fi echo "[NOTICE] Before you continue, please make sure you have a recent snapshot of your system and or backed it up." if ask "Are you ready to continue with the rollback?" Y; then dc exec --user="azuracast" web azuracast_cli azuracast:setup:rollback "${AZURACAST_ROLLBACK_VERSION}" dc down --timeout 60 .env --file .env set AZURACAST_VERSION=${AZURACAST_ROLLBACK_VERSION} dc pull dc run --rm web -- azuracast_update dc up -d if ask "Clean up all stopped Docker containers and images to save space?" Y; then d system prune -f fi echo "Rollback complete. Your installation has been returned to stable version '${AZURACAST_ROLLBACK_VERSION}'." echo "To return to the regular update channels, run:" echo " ./docker.sh setup-release" echo " " fi exit } # # LetsEncrypt: Now managed via the Web UI. # setup-letsencrypt() { echo "LetsEncrypt is now managed from within the web interface." echo "You can manage it via the 'Administration' panel, then 'System Settings'." echo "Under 'Services' you will find the LetsEncrypt settings." } letsencrypt-create() { setup-letsencrypt exit } # # Utility script to facilitate switching ports. # Usage: ./docker.sh change-ports # change-ports() { setup-ports dc down --timeout 60 dc up -d } # # Helper scripts for basic Docker Compose functions # up() { echo "Starting up AzuraCast services..." dc up -d } down() { echo "Shutting down AzuraCast services..." dc down --timeout 60 } restart() { down up } # Ensure we're in the same directory as this script. cd "$( dirname "${BASH_SOURCE[0]}" )" || exit # Podman support if [[ $(command -v podman) ]]; then PODMAN_MODE=1 fi "$@" ```
/content/code_sandbox/docker.sh
shell
2016-04-30T21:41:23
2024-08-16T18:27:26
AzuraCast
AzuraCast/AzuraCast
2,978
7,054
```yaml services: installer: container_name: azuracast_installer image: 'ghcr.io/azuracast/azuracast:${AZURACAST_VERSION:-latest}' volumes: - './:/installer' restart: 'no' entrypoint: docker_installer command: install privileged: true ```
/content/code_sandbox/docker-compose.installer.yml
yaml
2016-04-30T21:41:23
2024-08-16T18:27:26
AzuraCast
AzuraCast/AzuraCast
2,978
76
```yaml services: web: build: context: . environment: APPLICATION_ENV: 'testing' LOG_LEVEL: 'debug' volumes: - ./vendor:/var/azuracast/www/vendor - .:/var/azuracast/www ```
/content/code_sandbox/docker-compose.testing.yml
yaml
2016-04-30T21:41:23
2024-08-16T18:27:26
AzuraCast
AzuraCast/AzuraCast
2,978
59
```php <?php declare(strict_types=1); namespace Functional; use FunctionalTester; class Api_Stations_PodcastsCest extends CestAbstract { /** * @before setupComplete * @before login */ public function managePodcasts(FunctionalTester $I): void { $I->wantTo('Manage station podcasts via API.'); $station = $this->getTestStation(); // Test CRUD for the podcast itself $listUrl = '/api/station/' . $station->getId() . '/podcasts'; $this->testCrudApi( $I, $listUrl, [ 'title' => 'My Awesome Podcast', 'description' => 'A functional test podcast.', 'language' => 'en', 'author' => 'AzuraCast', 'email' => 'demo@azuracast.com', ], [ 'title' => 'My Modified Podcast', 'language' => 'de', 'author' => 'Test', 'email' => 'test@azuracast.com', ] ); // Test CRUD for the episodes $I->sendPOST( $listUrl, [ 'title' => 'Episode Test Podcast', 'description' => 'A podcast with episodes.', 'language' => 'en', 'author' => 'AzuraCast', 'email' => 'demo@azuracast.com', ] ); $I->seeResponseCodeIs(200); $newRecordSelfLink = ($I->grabDataFromResponseByJsonPath('links.self'))[0]; $episodesLink = ($I->grabDataFromResponseByJsonPath('links.episodes'))[0]; $this->testCrudApi( $I, $episodesLink, [ 'title' => 'My Awesome Podcast Episode', 'description' => 'A functional test podcast episode!', 'explicit' => false, ], [ 'title' => 'My Awesome Suddenly Explicit Podcast Episode', 'explicit' => true, ] ); // Delete Record $I->sendDELETE($newRecordSelfLink); $I->sendGET($newRecordSelfLink); $I->seeResponseCodeIs(404); } } ```
/content/code_sandbox/tests/Functional/Api_Stations_PodcastsCest.php
php
2016-04-30T21:41:23
2024-08-16T18:27:26
AzuraCast
AzuraCast/AzuraCast
2,978
498
```php <?php declare(strict_types=1); namespace Unit; use App\Xml\Reader; use App\Xml\Writer; use Codeception\Test\Unit; use UnitTester; class XmlTest extends Unit { protected UnitTester $tester; public function testXml(): void { $arrayValue = [ 'mounts' => [ 'mount' => [ [ '@type' => 'normal', 'path' => '/radio.mp3', ], [ '@type' => 'special', 'path' => '/special.mp3', ], ], ], ]; $xmlString = (new Writer())->toString($arrayValue, 'icecast'); $xmlExpected = <<<'XML' <?xml version="1.0" encoding="UTF-8"?> <icecast> <mounts> <mount type="normal"> <path>/radio.mp3</path> </mount> <mount type="special"> <path>/special.mp3</path> </mount> </mounts> </icecast> XML; self::assertEquals($xmlString, $xmlExpected); $backToArray = (new Reader())->fromString($xmlString); self::assertEquals($arrayValue, $backToArray); } } ```
/content/code_sandbox/tests/Unit/XmlTest.php
php
2016-04-30T21:41:23
2024-08-16T18:27:26
AzuraCast
AzuraCast/AzuraCast
2,978
279
```php <?php /** * Inherited Methods * @method void wantToTest($text) * @method void wantTo($text) * @method void execute($callable) * @method void expectTo($prediction) * @method void expect($prediction) * @method void amGoingTo($argumentation) * @method void am($role) * @method void lookForwardTo($achieveValue) * @method void comment($description) * @method \Codeception\Lib\Friend haveFriend($name, $actorClass = NULL) * * @SuppressWarnings(PHPMD) */ class FunctionalTester extends \Codeception\Actor { use _generated\FunctionalTesterActions; /** * Define custom actions here */ } ```
/content/code_sandbox/tests/_support/FunctionalTester.php
php
2016-04-30T21:41:23
2024-08-16T18:27:26
AzuraCast
AzuraCast/AzuraCast
2,978
153
```php <?php declare(strict_types=1); namespace Functional; use Codeception\Util\Shared\Asserts; use DateInterval; use DateTime; use FunctionalTester; use League\Csv\Reader; class Api_Stations_ReportsCest extends CestAbstract { use Asserts; /** * @before setupComplete * @before login */ public function viewReports(FunctionalTester $I): void { $I->wantTo('View various station reports via API.'); $station = $this->getTestStation(); $uriBase = '/api/station/' . $station->getId(); $I->sendGet($uriBase . '/reports/overview/charts'); $I->seeResponseCodeIs(200); $I->sendGet($uriBase . '/reports/overview/best-and-worst'); $I->seeResponseCodeIs(200); $I->sendGet($uriBase . '/reports/overview/by-stream'); $I->seeResponseCodeIs(200); $I->sendGet($uriBase . '/reports/overview/by-browser'); $I->seeResponseCodeIs(200); $I->sendGet($uriBase . '/reports/overview/by-country'); $I->seeResponseCodeIs(200); } /** * @before setupComplete * @before login */ public function downloadListenerReportsCsv(FunctionalTester $I): void { $I->wantTo('Download station listener report CSV via API.'); $station = $this->getTestStation(); $uriBase = '/api/station/' . $station->getId(); $startDateTime = (new DateTime())->sub(DateInterval::createFromDateString('30 days')); $endDateTime = new DateTime(); $requestUrl = $uriBase . '/listeners?' . http_build_query( [ 'format' => 'csv', 'start' => $startDateTime->format('Y-m-d\TH:i:s.v\Z'), 'end' => $endDateTime->format('Y-m-d\TH:i:s.v\Z'), ] ); $csvHeaders = [ 'IP', 'Start Time', 'End Time', 'Seconds Connected', 'User Agent', 'Mount Type', 'Mount Name', 'Device: Client', 'Device: Is Mobile', 'Device: Is Browser', 'Device: Is Bot', 'Device: Browser Family', 'Device: OS Family', 'Location: Description', 'Location: Country', 'Location: Region', 'Location: City', 'Location: Latitude', 'Location: Longitude', ]; $this->testReportCsv($I, $requestUrl, $csvHeaders); } /** * @before setupComplete * @before login */ public function downloadHistoryReportCsv(FunctionalTester $I): void { $I->wantTo('Download station timeline report CSV via API.'); $station = $this->getTestStation(); $uriBase = '/api/station/' . $station->getId(); $startDateTime = (new DateTime())->sub(DateInterval::createFromDateString('30 days')); $endDateTime = new DateTime(); $requestUrl = $uriBase . '/history?' . http_build_query( [ 'format' => 'csv', 'start' => $startDateTime->format('Y-m-d\TH:i:s.v\Z'), 'end' => $endDateTime->format('Y-m-d\TH:i:s.v\Z'), ] ); $csvHeaders = [ 'Date', 'Time', 'Listeners', 'Delta', 'Track', 'Artist', 'Playlist', 'Streamer', ]; $this->testReportCsv($I, $requestUrl, $csvHeaders); } protected function testReportCsv( FunctionalTester $I, string $url, array $headerFields ): void { $I->sendGet($url); $response = $I->grabResponse(); $csvReader = Reader::createFromString($response); $csvReader->setHeaderOffset(0); $csvHeaders = $csvReader->getHeader(); $this->assertIsArray($csvHeaders); $this->assertTrue( count($csvHeaders) > 0, 'CSV is not empty' ); foreach ($headerFields as $csvHeaderField) { $this->assertContains( $csvHeaderField, $csvHeaders, 'CSV has header field' ); } } } ```
/content/code_sandbox/tests/Functional/Api_Stations_ReportsCest.php
php
2016-04-30T21:41:23
2024-08-16T18:27:26
AzuraCast
AzuraCast/AzuraCast
2,978
996
```php <?php declare(strict_types=1); namespace Functional; use FunctionalTester; class Frontend_SetupCest extends CestAbstract { /** * @before setupIncomplete * @after setupRegister * @after setupStation * @after setupSettings */ public function setupStart(FunctionalTester $I): void { $I->wantTo('Complete the initial setup process.'); $I->amOnPage('/'); $I->seeCurrentUrlEquals('/setup/register'); $I->seeInTitle('Set Up'); $I->comment('Setup redirect found.'); } protected function setupRegister(FunctionalTester $I): void { $I->amOnPage('/setup'); $I->seeCurrentUrlEquals('/setup/register'); $I->seeResponseCodeIs(200); $this->setupCompleteUser($I); $I->amOnPage('/login'); $I->sendPost( '/login', [ 'username' => $this->login_username, 'password' => $this->login_password, ] ); } protected function setupStation(FunctionalTester $I): void { $I->amOnPage('/setup'); $I->seeCurrentUrlEquals('/setup/station'); $I->seeResponseCodeIs(200); $this->setupCompleteStations($I); } protected function setupSettings(FunctionalTester $I): void { $I->amOnPage('/setup'); $I->seeCurrentUrlEquals('/setup/settings'); $I->seeResponseCodeIs(200); $I->seeInTitle('System Settings'); $this->setupCompleteSettings($I); $I->amOnPage('/dashboard'); $I->seeResponseCodeIs(200); } } ```
/content/code_sandbox/tests/Functional/Frontend_SetupCest.php
php
2016-04-30T21:41:23
2024-08-16T18:27:26
AzuraCast
AzuraCast/AzuraCast
2,978
398
```php <?php namespace Helper; // here you can define custom actions // all public methods declared in helper class will be available in $I class Unit extends \Codeception\Module { } ```
/content/code_sandbox/tests/_support/Helper/Unit.php
php
2016-04-30T21:41:23
2024-08-16T18:27:26
AzuraCast
AzuraCast/AzuraCast
2,978
40
```yaml services: web: image: ghcr.io/azuracast/azuracast:development build: context: . target: development ports: - "127.0.0.1:3306:3306" # MariaDB - "127.0.0.1:6025:6025" # Centrifugo - "127.0.0.1:6379:6379" # Redis environment: VAR_DUMPER_FORMAT: server VAR_DUMPER_SERVER: host.docker.internal:9912 volumes: # Uncomment these lines if mounting a custom SSL cert (i.e. mkcert) # - $PWD/util/local_ssl/default.crt:/var/azuracast/storage/acme/custom.crt:ro # - $PWD/util/local_ssl/default.key:/var/azuracast/storage/acme/custom.key:ro - $PWD/node_modules:/var/azuracast/www/node_modules - $PWD/vendor:/var/azuracast/www/vendor - $PWD:/var/azuracast/www extra_hosts: - "host.docker.internal:host-gateway" ```
/content/code_sandbox/docker-compose.dev.yml
yaml
2016-04-30T21:41:23
2024-08-16T18:27:26
AzuraCast
AzuraCast/AzuraCast
2,978
259
```yaml actor: FunctionalTester suite_namespace: \Functional modules: enabled: - \App\Tests\Module - Doctrine2: depends: \App\Tests\Module - REST: depends: \App\Tests\Module - Cli ```
/content/code_sandbox/tests/Functional.suite.yml
yaml
2016-04-30T21:41:23
2024-08-16T18:27:26
AzuraCast
AzuraCast/AzuraCast
2,978
53
```php <?php declare(strict_types=1); namespace Functional; use FunctionalTester; class Api_Admin_DebugCest extends CestAbstract { /** * @before setupComplete * @before login */ public function syncTasks(FunctionalTester $I) { $I->wantTo('Test All Synchronized Tasks'); $I->sendPUT('/api/admin/debug/sync/all'); $I->seeResponseCodeIs(200); } } ```
/content/code_sandbox/tests/Functional/Api_Admin_DebugCest.php
php
2016-04-30T21:41:23
2024-08-16T18:27:26
AzuraCast
AzuraCast/AzuraCast
2,978
100
```php <?php declare(strict_types=1); namespace Functional; use FunctionalTester; class Admin_IndexCest extends CestAbstract { /** * @before setupComplete * @before login */ public function seeAdminHomepage(FunctionalTester $I): void { $I->wantTo('See the administration homepage.'); $I->amOnPage('/admin'); $I->seeResponseCodeIs(200); $I->seeInTitle('Administration'); } } ```
/content/code_sandbox/tests/Functional/Admin_IndexCest.php
php
2016-04-30T21:41:23
2024-08-16T18:27:26
AzuraCast
AzuraCast/AzuraCast
2,978
107
```yaml actor: Tester paths: tests: tests output: tests/_output data: tests/_data support: tests/_support envs: tests/_envs bootstrap: _bootstrap.php settings: colors: true memory_limit: 1024M error_level: "E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED" modules: coverage : enabled : true include : - src/* exclude : # Application bootstrapping - src/AppFactory.php - src/EventDispatcher.php - src/Exception.php - src/Plugins.php # Used in application, but not used in tests - src/Radio/Frontend/ShoutCast2.php - src/Console/*.php - src/Console/Command/*.php - src/Entity/Fixture/* - src/Entity/Migration/* - src/Service/IpGeolocator/GeoLite.php - src/RateLimit.php # Exceptions - src/Exception/*.php - src/Http/ErrorHandler.php ```
/content/code_sandbox/codeception.yml
yaml
2016-04-30T21:41:23
2024-08-16T18:27:26
AzuraCast
AzuraCast/AzuraCast
2,978
244
```php <?php declare(strict_types=1); namespace Functional; use FunctionalTester; class Api_IndexCest extends CestAbstract { /** * @before setupComplete */ public function checkApiIndex(FunctionalTester $I): void { $I->wantTo('Check basic API functions.'); $I->sendGET('/api/status'); $I->seeResponseContainsJson( [ 'online' => true, ] ); $I->sendGET('/api/time'); $I->seeResponseCodeIs(200); } } ```
/content/code_sandbox/tests/Functional/Api_IndexCest.php
php
2016-04-30T21:41:23
2024-08-16T18:27:26
AzuraCast
AzuraCast/AzuraCast
2,978
123
```php <?php declare(strict_types=1); namespace Functional; use FunctionalTester; class Api_Frontend_DashboardCest extends CestAbstract { /** * @before setupComplete * @before login */ public function checkDashboard(FunctionalTester $I): void { $I->wantTo('Check dashboard API functions.'); $I->sendGet('/api/frontend/dashboard/charts'); $I->seeResponseCodeIs(200); $I->canSeeResponseContainsJson( [ 'metrics' => [], ] ); $I->sendGet('/api/frontend/dashboard/notifications'); $I->seeResponseCodeIs(200); $I->sendGet('/api/frontend/dashboard/stations'); $I->seeResponseCodeIs(200); } } ```
/content/code_sandbox/tests/Functional/Api_Frontend_DashboardCest.php
php
2016-04-30T21:41:23
2024-08-16T18:27:26
AzuraCast
AzuraCast/AzuraCast
2,978
173
```php <?php declare(strict_types=1); namespace Unit; use App\Utilities\Strings; use Codeception\Test\Unit; use UnitTester; class UtilitiesTest extends Unit { protected UnitTester $tester; public function testUtilities(): void { $testResult = Strings::generatePassword(10); self::assertEquals(10, strlen($testResult)); $testString = 'Lorem ipsum dolor sit amet lorem ipsum dolor sit amet lorem ipsum dolor sit amet'; $testResult = Strings::truncateText($testString, 15); $expectedResult = 'Lorem ipsum...'; self::assertEquals($testResult, $expectedResult); $testUrl = 'path_to_url $testResult = Strings::truncateUrl($testUrl); $expectedResult = 'twitter.com'; self::assertEquals($testResult, $expectedResult); } } ```
/content/code_sandbox/tests/Unit/UtilitiesTest.php
php
2016-04-30T21:41:23
2024-08-16T18:27:26
AzuraCast
AzuraCast/AzuraCast
2,978
185
```php <?php declare(strict_types=1); namespace Functional; use FunctionalTester; class Frontend_ErrorCest extends CestAbstract { public function seeErrorPages(FunctionalTester $I): void { $I->wantTo('Verify error code pages.'); $I->amOnPage('/azurafake'); $I->seeResponseCodeIs(404); $I->see('404'); } } ```
/content/code_sandbox/tests/Functional/Frontend_ErrorCest.php
php
2016-04-30T21:41:23
2024-08-16T18:27:26
AzuraCast
AzuraCast/AzuraCast
2,978
92
```php <?php declare(strict_types=1); namespace Functional; use App\Entity\Enums\PlaylistSources; use App\Entity\Enums\PlaylistTypes; use FunctionalTester; class Api_Stations_PlaylistsCest extends CestAbstract { /** * @before setupComplete * @before login */ public function managePlaylists(FunctionalTester $I): void { $I->wantTo('Manage station playlists via API.'); $station = $this->getTestStation(); $this->testCrudApi( $I, '/api/station/' . $station->getId() . '/playlists', [ 'name' => 'General Rotation Playlist', 'source' => PlaylistSources::Songs->value, 'type' => PlaylistTypes::Standard->value, 'weight' => 5, ], [ 'name' => 'Modified Playlist', 'type' => PlaylistTypes::Advanced->value, ] ); } } ```
/content/code_sandbox/tests/Functional/Api_Stations_PlaylistsCest.php
php
2016-04-30T21:41:23
2024-08-16T18:27:26
AzuraCast
AzuraCast/AzuraCast
2,978
211
```scss @import "roboto"; // Include functions first (so you can manipulate colors, SVGs, calc, etc) @import "bootstrap/scss/functions"; // Include any default variable overrides here @import 'variables'; @import 'functions'; @import 'mixins'; // Include remainder of required Bootstrap stylesheets (including any separate color mode stylesheets) @import "bootstrap/scss/variables"; @import "bootstrap/scss/variables-dark"; // Include any default map overrides here // Core Bootstrap components @import "bootstrap-core"; // Overrides for specific third-party products @import 'vendors/codemirror'; @import 'vendors/vue_datepicker'; @import 'vendors/fullcalendar'; @import 'vendors/sweetalert2'; @import 'vendors/nprogress'; // Material design components @import 'overrides/navdrawer'; // Overrides for the Daemonite Material theme @import "root"; @import 'overrides/badges'; @import 'overrides/body'; @import 'overrides/buttons'; @import 'overrides/card'; @import 'overrides/components'; @import 'overrides/dropdown'; @import 'overrides/file-uploads'; @import 'overrides/footer'; @import 'overrides/forms'; @import 'overrides/header'; @import 'overrides/icons'; @import 'overrides/modal'; @import 'overrides/navbar'; @import 'overrides/notifications'; @import 'overrides/sweetalert2'; @import 'overrides/progressbar'; @import 'overrides/tables'; @import 'overrides/toasts'; // Individual AzuraCast pages @import 'pages/search'; @import 'pages/embed'; @import 'pages/public'; @import 'pages/log_viewer'; ```
/content/code_sandbox/frontend/scss/style.scss
scss
2016-04-30T21:41:23
2024-08-16T18:27:26
AzuraCast
AzuraCast/AzuraCast
2,978
333
```scss $primary: #1e88e5; $red: #dc3545; $body-bg: #FFF; $body-bg-dark: #22252f; $body-color: #595959; $font-family-sans-serif: "Roboto", system-ui, -apple-system, "Segoe UI", "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; $font-size-root: 14px; $link-decoration: none; $header-nav-height: 5.15rem; $navbar-light-brand-color: #FFF; $navbar-dark-brand-color: #FFF; $navbar-light-color: #FFF; $navbar-dark-color: #FFF; $navbar-light-brand-hover-color: $navbar-light-color; $navbar-dark-brand-hover-color: $navbar-dark-color; $border-color: #8E939F; $border-color-dark: #6c757d; $list-group-item-padding-y: 1rem; $dropdown-item-padding-y: .75rem; $focus-ring-opacity: 0.3; $input-btn-padding-y: .75rem; $input-btn-padding-x: .5rem; $form-range-track-bg: var(--bs-secondary-bg); $form-range-thumb-bg: var(--bs-body-color); $btn-font-size: 1rem; $btn-font-size-sm: 0.9rem; $btn-padding-x: .75rem; $btn-padding-y-sm: 0.45rem; $btn-padding-x-sm: 0.6rem; $btn-hover-bg-shade-amount: 40%; $btn-hover-border-shade-amount: 50%; $card-border-width: 0; $card-cap-padding-y: 1.1rem; $card-cap-padding-x: 1.1rem; $card-spacer-x: 1.0rem; $card-spacer-y: 1.0rem; $badge-padding-x: 0.75rem; $badge-padding-y: 0.45rem; $badge-font-size: 0.9rem; $badge-font-weight: normal; $table-border-width: 0; $table-striped-bg-factor: .05; $modal-border-width: 0; $progress-bar-bg: #3f51b5; $toast-font-size: 1rem; $offcanvas-border-width: 0; $offcanvas-bg-color: var(--bs-tertiary-bg); $offcanvas-padding-x: 0; $offcanvas-padding-y: 0; $enable-grid-classes: true; $navdrawer-width: 17.5rem; $navdrawer-gutter-width: 3.5rem; $navdrawer-inner-spacer-x: 1rem; $navdrawer-inner-spacer-y: 0.5rem; $navdrawer-icon-width: 2rem; $navdrawer-link-height: 3rem; $navdrawer-subheader-height: 3rem; $icon-size: 1.5rem; $icon-size-xl: ($icon-size * 1.5); $icon-size-lg: ($icon-size * 1.25); $icon-size-sm: ($icon-size * 0.6); ```
/content/code_sandbox/frontend/scss/_variables.scss
scss
2016-04-30T21:41:23
2024-08-16T18:27:26
AzuraCast
AzuraCast/AzuraCast
2,978
678
```scss @mixin might-overflow() { // Pulled from: // path_to_url text-overflow: ellipsis; overflow: hidden; white-space: nowrap; &:hover { text-overflow: clip; white-space: normal; word-break: break-all; } } ```
/content/code_sandbox/frontend/scss/_mixins.scss
scss
2016-04-30T21:41:23
2024-08-16T18:27:26
AzuraCast
AzuraCast/AzuraCast
2,978
66
```scss // Configuration @import "bootstrap/scss/maps"; @import "bootstrap/scss/mixins"; @import "bootstrap/scss/utilities"; // Layout & components @import "bootstrap/scss/root"; @import "bootstrap/scss/reboot"; @import "bootstrap/scss/type"; @import "bootstrap/scss/images"; @import "bootstrap/scss/containers"; @import "bootstrap/scss/grid"; @import "bootstrap/scss/tables"; @import "bootstrap/scss/forms"; @import "bootstrap/scss/buttons"; @import "bootstrap/scss/transitions"; @import "bootstrap/scss/dropdown"; @import "bootstrap/scss/button-group"; @import "bootstrap/scss/nav"; @import "bootstrap/scss/navbar"; @import "bootstrap/scss/card"; @import "bootstrap/scss/accordion"; @import "bootstrap/scss/breadcrumb"; @import "bootstrap/scss/pagination"; @import "bootstrap/scss/badge"; @import "bootstrap/scss/alert"; @import "bootstrap/scss/progress"; @import "bootstrap/scss/list-group"; @import "bootstrap/scss/close"; @import "bootstrap/scss/toasts"; @import "bootstrap/scss/modal"; // @import "bootstrap/scss/tooltip"; // @import "bootstrap/scss/popover"; // @import "bootstrap/scss/carousel"; @import "bootstrap/scss/spinners"; @import "bootstrap/scss/offcanvas"; // @import "bootstrap/scss/placeholders"; // Helpers @import "bootstrap/scss/helpers"; // Utilities @import "bootstrap/scss/utilities/api"; ```
/content/code_sandbox/frontend/scss/_bootstrap-core.scss
scss
2016-04-30T21:41:23
2024-08-16T18:27:26
AzuraCast
AzuraCast/AzuraCast
2,978
332
```scss @function color-contrast($background, $color-contrast-dark: $color-contrast-dark, $color-contrast-light: $color-contrast-light, $min-contrast-ratio: $min-contrast-ratio) { $foregrounds: $color-contrast-light, $color-contrast-dark, $white, $black; $max-ratio: 0; $max-ratio-color: null; @if $background == $primary { @return $white; } @each $color in $foregrounds { $contrast-ratio: contrast-ratio($background, $color); @if $contrast-ratio > $min-contrast-ratio { @return $color; } @else if $contrast-ratio > $max-ratio { $max-ratio: $contrast-ratio; $max-ratio-color: $color; } } @warn "Found no color leading to #{$min-contrast-ratio}:1 contrast ratio against #{$background}..."; @return $max-ratio-color; } ```
/content/code_sandbox/frontend/scss/_functions.scss
scss
2016-04-30T21:41:23
2024-08-16T18:27:26
AzuraCast
AzuraCast/AzuraCast
2,978
229
```scss @font-face { font-family: 'Roboto'; src: url('roboto-fontface/fonts/roboto/Roboto-Light.woff2') format('woff2'), url('roboto-fontface/fonts/roboto/Roboto-Light.woff') format('woff'); font-weight: 300; font-style: normal; } @font-face { font-family: 'Roboto-Light'; src: url('roboto-fontface/fonts/roboto/Roboto-Light.woff2') format('woff2'), url('roboto-fontface/fonts/roboto/Roboto-Light.woff') format('woff'); } @font-face { font-family: 'Roboto'; src: url('roboto-fontface/fonts/roboto/Roboto-LightItalic.woff2') format('woff2'), url('roboto-fontface/fonts/roboto/Roboto-LightItalic.woff') format('woff'); font-weight: 300; font-style: italic; } @font-face { font-family: 'Roboto-LightItalic'; src: url('roboto-fontface/fonts/roboto/Roboto-LightItalic.woff2') format('woff2'), url('roboto-fontface/fonts/roboto/Roboto-LightItalic.woff') format('woff'); } @font-face { font-family: 'Roboto'; src: url('roboto-fontface/fonts/roboto/Roboto-Regular.woff2') format('woff2'), url('roboto-fontface/fonts/roboto/Roboto-Regular.woff') format('woff'); font-weight: 400; font-style: normal; } @font-face { font-family: 'Roboto-Regular'; src: url('roboto-fontface/fonts/roboto/Roboto-Regular.woff2') format('woff2'), url('roboto-fontface/fonts/roboto/Roboto-Regular.woff') format('woff'); } @font-face { font-family: 'Roboto'; src: url('roboto-fontface/fonts/roboto/Roboto-RegularItalic.woff2') format('woff2'), url('roboto-fontface/fonts/roboto/Roboto-RegularItalic.woff') format('woff'); font-weight: 400; font-style: italic; } @font-face { font-family: 'Roboto-RegularItalic'; src: url('roboto-fontface/fonts/roboto/Roboto-RegularItalic.woff2') format('woff2'), url('roboto-fontface/fonts/roboto/Roboto-RegularItalic.woff') format('woff'); } @font-face { font-family: 'Roboto'; src: url('roboto-fontface/fonts/roboto/Roboto-Medium.woff2') format('woff2'), url('roboto-fontface/fonts/roboto/Roboto-Medium.woff') format('woff'); font-weight: 500; font-style: normal; } @font-face { font-family: 'Roboto-Medium'; src: url('roboto-fontface/fonts/roboto/Roboto-Medium.woff2') format('woff2'), url('roboto-fontface/fonts/roboto/Roboto-Medium.woff') format('woff'); } @font-face { font-family: 'Roboto'; src: url('roboto-fontface/fonts/roboto/Roboto-MediumItalic.woff2') format('woff2'), url('roboto-fontface/fonts/roboto/Roboto-MediumItalic.woff') format('woff'); font-weight: 500; font-style: italic; } @font-face { font-family: 'Roboto-MediumItalic'; src: url('roboto-fontface/fonts/roboto/Roboto-MediumItalic.woff2') format('woff2'), url('roboto-fontface/fonts/roboto/Roboto-MediumItalic.woff') format('woff'); } @font-face { font-family: 'Roboto'; src: url('roboto-fontface/fonts/roboto/Roboto-Bold.woff2') format('woff2'), url('roboto-fontface/fonts/roboto/Roboto-Bold.woff') format('woff'); font-weight: 700; font-style: normal; } @font-face { font-family: 'Roboto-Bold'; src: url('roboto-fontface/fonts/roboto/Roboto-Bold.woff2') format('woff2'), url('roboto-fontface/fonts/roboto/Roboto-Bold.woff') format('woff'); } @font-face { font-family: 'Roboto'; src: url('roboto-fontface/fonts/roboto/Roboto-BoldItalic.woff2') format('woff2'), url('roboto-fontface/fonts/roboto/Roboto-BoldItalic.woff') format('woff'); font-weight: 700; font-style: italic; } @font-face { font-family: 'Roboto-BoldItalic'; src: url('roboto-fontface/fonts/roboto/Roboto-BoldItalic.woff2') format('woff2'), url('roboto-fontface/fonts/roboto/Roboto-BoldItalic.woff') format('woff'); } ```
/content/code_sandbox/frontend/scss/_roboto.scss
scss
2016-04-30T21:41:23
2024-08-16T18:27:26
AzuraCast
AzuraCast/AzuraCast
2,978
1,065
```scss :root, [data-bs-theme="light"] { --public-page-bg: url('/static/img/hexbg.webp'); --scrollbar-color: #{$gray-400}; } @include color-mode(dark, true) { color-scheme: unset; body { color-scheme: dark; } iframe { // Workaround for Bootstrap 5.3 weirdness with embeds. color-scheme: light; } --public-page-bg: url('/static/img/hexbg_dark.webp'); --scrollbar-color: #{$gray-800}; --bs-info-bg-subtle: #bbdefb; --bs-info-text-emphasis: #2C363D; .table-striped { --bs-table-striped-bg: #2b2e37; } } ```
/content/code_sandbox/frontend/scss/_root.scss
scss
2016-04-30T21:41:23
2024-08-16T18:27:26
AzuraCast
AzuraCast/AzuraCast
2,978
174
```scss @import '@vuepic/vue-datepicker/dist/main.css'; ```
/content/code_sandbox/frontend/scss/vendors/_vue_datepicker.scss
scss
2016-04-30T21:41:23
2024-08-16T18:27:26
AzuraCast
AzuraCast/AzuraCast
2,978
12
```scss @import "nprogress/nprogress.css"; #nprogress .bar { background: #FFF; } /* Fancy blur effect */ #nprogress .peg { box-shadow: 0 0 10px #FFF, 0 0 5px #FFF; } ```
/content/code_sandbox/frontend/scss/vendors/_nprogress.scss
scss
2016-04-30T21:41:23
2024-08-16T18:27:26
AzuraCast
AzuraCast/AzuraCast
2,978
59
```scss .cm-content, .cm-gutter { min-height: 200px !important; } ```
/content/code_sandbox/frontend/scss/vendors/_codemirror.scss
scss
2016-04-30T21:41:23
2024-08-16T18:27:26
AzuraCast
AzuraCast/AzuraCast
2,978
19
```scss :root { --fc-border-color: var(--bs-secondary-bg); --fc-page-bg-color: var(--bs-body-bg); } .fc th { background: var(--bs-secondary-bg); } ```
/content/code_sandbox/frontend/scss/vendors/_fullcalendar.scss
scss
2016-04-30T21:41:23
2024-08-16T18:27:26
AzuraCast
AzuraCast/AzuraCast
2,978
43
```scss @import 'sweetalert2/src/variables'; $swal2-dark-theme-black: #19191a; $swal2-dark-theme-white: #e1e1e1; $swal2-background: var(--bs-body-bg); $swal2-border: 1px solid var(--bs-tertiary-color); $swal2-title-color: var(--bs-body-color); $swal2-backdrop: rgba(var(--bs-tertiary-bg-rgb), .75); // FOOTER $swal2-footer-border-color: var(--bs-table-border-color); $swal2-footer-color: darken($swal2-dark-theme-black, 15%); // TIMER POGRESS BAR $swal2-timer-progress-bar-background: rgba(var(--bs-body-color-rgb), .6); // INPUT $swal2-input-color: var(--bs-input-color); $swal2-input-background: transparent; $swal2-input-border: 1px solid var(--bs-border-color); // VALIDATION MESSAGE $swal2-validation-message-background: lighten($swal2-dark-theme-black, 10%); $swal2-validation-message-color: $swal2-dark-theme-white; // QUEUE $swal2-progress-step-background: lighten($swal2-dark-theme-black, 25%); // COMMON VARIABLES FOR CONFIRM AND CANCEL BUTTONS $swal2-button-focus-box-shadow: 0 0 0 1px $swal2-background, 0 0 0 3px $swal2-outline-color; // TOAST $swal2-toast-background: $swal2-dark-theme-black; $swal2-toast-button-focus-box-shadow: 0 0 0 1px $swal2-background, 0 0 0 3px $swal2-outline-color; // CANCEL BUTTON $swal2-cancel-button-background-color: $gray-600; @import 'sweetalert2/src/sweetalert2'; ```
/content/code_sandbox/frontend/scss/vendors/_sweetalert2.scss
scss
2016-04-30T21:41:23
2024-08-16T18:27:26
AzuraCast
AzuraCast/AzuraCast
2,978
422
```scss textarea.log-viewer { white-space: pre; font-family: $font-family-monospace; font-size: $font-size-sm; min-height: 300px !important; max-height: 500px; overflow-x: auto; overflow-y: scroll; } ```
/content/code_sandbox/frontend/scss/pages/_log_viewer.scss
scss
2016-04-30T21:41:23
2024-08-16T18:27:26
AzuraCast
AzuraCast/AzuraCast
2,978
62
```scss input[type=search]::-webkit-search-cancel-button { -webkit-appearance: searchfield-cancel-button; } ```
/content/code_sandbox/frontend/scss/pages/_search.scss
scss
2016-04-30T21:41:23
2024-08-16T18:27:26
AzuraCast
AzuraCast/AzuraCast
2,978
23
```scss @use "sass:math"; body.page-minimal { background: var(--bs-body-bg) var(--public-page-bg); background-size: cover; background-attachment: fixed; background-position: center center; footer { text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black, 0 0 4px #000; } .public-page { .card { margin: auto; width: 500px; .card-body { position: relative; .card-title { font-weight: normal; } } @include media-breakpoint-only('xs') { width: 100%; margin-left: 15px; margin-right: 15px; } } } .might-overflow { @include might-overflow(); } &:not(.embed) { #main { display: flex; align-items: stretch; justify-content: stretch; padding: 1.5rem; } #footer { padding-top: 0.5rem; } .public-page { flex: 1; display: flex; align-items: center; justify-content: center; } .full-height-wrapper { display: contents; .card { flex: 1; .card-body { flex: 0 1 auto; } // Only make the datatable scrollable if it's the only element in the card. & > .datatable-wrapper { .datatable-main { overflow-y: auto; } } & > .full-height-scrollable { overflow-y: auto; } } } } } ```
/content/code_sandbox/frontend/scss/pages/_public.scss
scss
2016-04-30T21:41:23
2024-08-16T18:27:26
AzuraCast
AzuraCast/AzuraCast
2,978
381
```scss body.embed { background: transparent !important; color-scheme: unset; min-height: auto; } body.embed-social { min-height: auto; padding: 1rem; background: var(--bs-card-bg) !important; } ```
/content/code_sandbox/frontend/scss/pages/_embed.scss
scss
2016-04-30T21:41:23
2024-08-16T18:27:26
AzuraCast
AzuraCast/AzuraCast
2,978
55
```scss div.datatable-wrapper { display: contents; } div.datatable-toolbar-top, div.datatable-toolbar-bottom { &:empty { display: none; } } div.datatable-main { table { tr > th:first-child, tr > td:first-child { padding-left: 1rem; } tr > th:last-child, tr > td:last-child { padding-right: 1rem; } &.table-selectable { tr > th:first-child, tr > td:first-child { width: .1%; white-space: nowrap; padding-right: 0.1rem; } } th.sortable { cursor: pointer; } th.shrink, td.shrink { width: 0.1%; white-space: nowrap; } .form-check, .form-check input, .form-check label { margin: 0; padding: 0; } } } .table { thead th { font-size: 1.1rem; font-weight: normal; } > :not(caption) > * > * { padding: 1rem 1rem; } &.table-striped { thead th { border-bottom: 1px solid rgba(0,0,0, 0.1); } } } ```
/content/code_sandbox/frontend/scss/overrides/_tables.scss
scss
2016-04-30T21:41:23
2024-08-16T18:27:26
AzuraCast
AzuraCast/AzuraCast
2,978
297
```scss .outside-card-header { h1, h2, h3, h4 { @include font-size($h2-font-size); margin: 0; } padding: $card-spacer-y $card-spacer-x; margin: 0; &:first-child { padding-top: ($container-padding-x - $card-spacer-x); } } .card { box-shadow: 0 0 4px 0 rgba(0, 0, 0, .14), 0 3px 4px 0 rgba(0, 0, 0, .12), 0 1px 5px 0 rgba(0, 0, 0, .2); .card-title { @include font-size($h4-font-size); font-weight: 400; margin-bottom: 0; } .card-subtitle { @include font-size($h5-font-size); font-weight: normal; margin-bottom: 0; } .card-body.alert { border-left: 0; border-right: 0; border-top: 0; &:last-of-type { border-bottom: 0; } border-radius: 0; margin-bottom: 0; } .card-header, .alert { &:first-child { border-top-left-radius: var(--bs-card-border-radius); border-top-right-radius: var(--bs-card-border-radius); } &:last-child { border-bottom-left-radius: var(--bs-card-border-radius); border-bottom-right-radius: var(--bs-card-border-radius); } } & > .table:last-child tbody tr:last-child { td:first-child { border-bottom-left-radius: var(--bs-card-border-radius); } td:last-child { border-bottom-right-radius: var(--bs-card-border-radius); } } & > .list-group-flush > .list-group-item:last-child { border-bottom-left-radius: var(--bs-card-border-radius); border-bottom-right-radius: var(--bs-card-border-radius); } .card-body { .card-body-flush { margin: (0-$card-spacer-y) (0-$card-spacer-x); } nav.nav-tabs { background: var(--bs-tertiary-bg); margin: (0-$card-spacer-y) (0-$card-spacer-x) 0 (0-$card-spacer-x); padding: $card-spacer-y $card-spacer-x 0 $card-spacer-x; } } } .row-of-cards { & .card { margin-bottom: 1.5rem !important; } } ```
/content/code_sandbox/frontend/scss/overrides/_card.scss
scss
2016-04-30T21:41:23
2024-08-16T18:27:26
AzuraCast
AzuraCast/AzuraCast
2,978
582
```scss .btn { display: inline-flex; align-items: center; gap: calc(var(--bs-btn-padding-x) / 2); font-weight: 500; text-transform: uppercase; &.btn-link { text-decoration: none; &:hover { background-image: linear-gradient(to bottom, rgba(0, 0, 0, .12), rgba(0, 0, 0, .12)); } } } .buttons { & > * { margin-right: .75rem; } & > *:last-child { margin-right: 0; } } .block-buttons { display: grid; gap: 0.5rem; .btn { display: block; } } ```
/content/code_sandbox/frontend/scss/overrides/_buttons.scss
scss
2016-04-30T21:41:23
2024-08-16T18:27:26
AzuraCast
AzuraCast/AzuraCast
2,978
163
```scss .icon { min-width: 1em; width: 1em; height: 1em; display: inline-block; vertical-align: -.125em; fill: currentcolor; font-size: $icon-size; &.sm, .btn-sm & { font-size: $icon-size-sm; } &.lg, .btn-lg & { font-size: $icon-size-lg; } &.xl, .btn-xl & { font-size: $icon-size-xl; } } ```
/content/code_sandbox/frontend/scss/overrides/_icons.scss
scss
2016-04-30T21:41:23
2024-08-16T18:27:26
AzuraCast
AzuraCast/AzuraCast
2,978
117
```scss .nav { .nav-link { cursor: pointer; font-weight: normal; } } ```
/content/code_sandbox/frontend/scss/overrides/_navbar.scss
scss
2016-04-30T21:41:23
2024-08-16T18:27:26
AzuraCast
AzuraCast/AzuraCast
2,978
22
```scss @use "sass:math"; .modal-content { box-shadow: 0 4px 5px 0 rgba(0,0,0,0.14), 0 1px 10px 0 rgba(0,0,0,0.12), 0 2px 4px -1px rgba(0,0,0,0.3); } .modal-body { nav.nav-tabs { background: var(--bs-tertiary-bg); margin: (0-$modal-inner-padding) (0-$modal-inner-padding) 0 (0-$modal-inner-padding); padding: math.div($modal-inner-padding, 2) $modal-inner-padding 0 $modal-inner-padding; } } ```
/content/code_sandbox/frontend/scss/overrides/_modal.scss
scss
2016-04-30T21:41:23
2024-08-16T18:27:26
AzuraCast
AzuraCast/AzuraCast
2,978
156
```scss body.page-full { div.toast-container.top-0 { top: $header-nav-height !important; } } ```
/content/code_sandbox/frontend/scss/overrides/_toasts.scss
scss
2016-04-30T21:41:23
2024-08-16T18:27:26
AzuraCast
AzuraCast/AzuraCast
2,978
26
```scss .dropdown-menu { border: none; box-shadow: 0 4px 5px 0 rgba(0,0,0,0.14), 0 1px 10px 0 rgba(0,0,0,0.12), 0 2px 4px -1px rgba(0,0,0,0.3); .form-check { margin-bottom: 1rem; } } ```
/content/code_sandbox/frontend/scss/overrides/_dropdown.scss
scss
2016-04-30T21:41:23
2024-08-16T18:27:26
AzuraCast
AzuraCast/AzuraCast
2,978
96
```scss body.page-full { #main { padding-top: ($header-nav-height + ($container-padding-x * .5)); } @include media-breakpoint-down(sm) { #main { padding-top: ($container-padding-x * .5); } } } ::-webkit-scrollbar { width: 12px; background: var(--bs-body-bg); } ::-webkit-scrollbar-track { padding: 2px; border-radius: 10px; } ::-webkit-scrollbar-thumb { margin: 2px 0; border-radius: 10px; background: var(--scrollbar-color); } ::-webkit-scrollbar-corner { border: 0; background: var(--bs-body-bg); } ```
/content/code_sandbox/frontend/scss/overrides/_body.scss
scss
2016-04-30T21:41:23
2024-08-16T18:27:26
AzuraCast
AzuraCast/AzuraCast
2,978
154
```scss // Enables a "sticky" footer that adheres to the bottom but scrolls with larger pages. #page-wrapper { display: flex; flex-direction: column; min-height: 100vh; align-items: stretch; #main { flex-grow: 1; } #footer { flex-shrink: 1; } } #footer { opacity: .6; text-align: center; padding: 1.5rem; } ```
/content/code_sandbox/frontend/scss/overrides/_footer.scss
scss
2016-04-30T21:41:23
2024-08-16T18:27:26
AzuraCast
AzuraCast/AzuraCast
2,978
102
```scss .swal2-popup { border: none; box-shadow: 0 0 4px 0 rgba(0, 0, 0, .14), 0 3px 4px 0 rgba(0, 0, 0, .12), 0 1px 5px 0 rgba(0, 0, 0, .2); .swal2-actions { .swal2-styled { &.swal2-confirm { background-color: var(--bs-primary); } } } } ```
/content/code_sandbox/frontend/scss/overrides/_sweetalert2.scss
scss
2016-04-30T21:41:23
2024-08-16T18:27:26
AzuraCast
AzuraCast/AzuraCast
2,978
122
```scss .vue-component { display: contents; } ```
/content/code_sandbox/frontend/scss/overrides/_components.scss
scss
2016-04-30T21:41:23
2024-08-16T18:27:26
AzuraCast
AzuraCast/AzuraCast
2,978
10
```scss body.page-full { .notices { padding: ($header-nav-height + 1rem) 1rem 1rem 1rem; } } article.alert { button.btn-close { padding: 0.8rem; } .alert-wrapper { padding-right: 2rem; } } ```
/content/code_sandbox/frontend/scss/overrides/_notifications.scss
scss
2016-04-30T21:41:23
2024-08-16T18:27:26
AzuraCast
AzuraCast/AzuraCast
2,978
70
```scss div.flow-upload { div.file-drop-target { border: 4px dashed var(--bs-secondary-bg); color: #5e5e5e; &.drag_over { border: 4px dashed var(--bs-tertiary-color); color: $text-muted; } } } ```
/content/code_sandbox/frontend/scss/overrides/_file-uploads.scss
scss
2016-04-30T21:41:23
2024-08-16T18:27:26
AzuraCast
AzuraCast/AzuraCast
2,978
69
```scss .progress { &.h-5 { height: 5px; } &.h-10 { height: 10px; } &.h-15 { height: 15px; } &.h-20 { height: 20px; } } ```
/content/code_sandbox/frontend/scss/overrides/_progressbar.scss
scss
2016-04-30T21:41:23
2024-08-16T18:27:26
AzuraCast
AzuraCast/AzuraCast
2,978
68
```scss input, textarea { &.text-preformatted { font-family: $font-family-monospace; } } .form-check, .custom-checkbox { margin-bottom: 0.35rem; .form-check-input, .custom-control-input { width: 1.5rem; height: 1.5rem; cursor: pointer; margin-top: 0; } &.form-switch { .form-check-input, .custom-control-input { width: 2.5rem; } } .form-check-label, .custom-control-label { margin-left: 0.5rem; cursor: pointer; } .custom-control-label { vertical-align: top; } } .input-group-text { padding: .75rem; } .form { .row { margin-bottom: 1rem; &:last-child { margin-bottom: 0; } } .form-group { & > label { margin-bottom: .5rem !important; font-size: 1.1rem; } &:last-child { margin-bottom: 0; } .form-text { margin-top: .5rem; margin-bottom: .5rem; } } label.required { &:after { content: " *"; color: $red-700; } } .form-control:not([type="file"]), .form-select { padding: .75rem; } .form-select { option { border-radius: var(--bs-border-radius); padding: .5rem; cursor: pointer; &:hover { background-color: var(--bs-secondary-bg); } } } fieldset { margin-bottom: 1rem; legend { border-bottom: 2px dotted; padding-bottom: 0.5rem; } div.fieldset-legend, legend.col-form-label { p { margin-bottom: 0.5rem; } margin-bottom: 0.75rem; } } & > fieldset:last-of-type { margin-bottom: 0; } } .form-range { height: 10px; width: auto; } ```
/content/code_sandbox/frontend/scss/overrides/_forms.scss
scss
2016-04-30T21:41:23
2024-08-16T18:27:26
AzuraCast
AzuraCast/AzuraCast
2,978
486
```scss header.navbar { background-image: url('/static/img/header_bg.webp'), linear-gradient(90deg, #0a6fc2 0%, #2196f3 100%); background-position: top left, center; background-repeat: no-repeat; background-size: 500px 100px, cover; min-height: $header-nav-height; padding: 1rem; color: $white !important; .navbar-brand { font-size: 3rem; letter-spacing: -2px; line-height: 1; font-weight: normal; align-items: baseline; text-shadow: 0 0 2px #000; padding: 0; b { font-weight: bold; } small { padding-left: .75rem; font-size: 1.5rem; letter-spacing: normal; } } @include media-breakpoint-down(sm) { & { position: relative; } .navbar-brand { font-size: 2rem; small { font-size: 1rem; } } } .navbar-toggler { border: 0; line-height: 1rem; } .dropdown-menu { .dropdown-item { display: inline-flex; align-items: center; gap: 0.5rem; } } } ```
/content/code_sandbox/frontend/scss/overrides/_header.scss
scss
2016-04-30T21:41:23
2024-08-16T18:27:26
AzuraCast
AzuraCast/AzuraCast
2,978
303
```scss .badges { & > * { margin-right: .25rem; } & > *:last-child { margin-right: 0; } } ```
/content/code_sandbox/frontend/scss/overrides/_badges.scss
scss
2016-04-30T21:41:23
2024-08-16T18:27:26
AzuraCast
AzuraCast/AzuraCast
2,978
37
```scss .offcanvas.navdrawer { width: $navdrawer-width; box-shadow: 0 0 4px 0 rgba(0, 0, 0, .14), 0 3px 4px 0 rgba(0, 0, 0, .12), 0 1px 5px 0 rgba(0, 0, 0, .2); } @include media-breakpoint-up(lg) { #page-wrapper.has-sidebar { margin-left: $navdrawer-width; } .offcanvas-backdrop { display: none; } .offcanvas.navdrawer { transform: none; visibility: visible; top: $header-nav-height; z-index: auto; } } // Content .navdrawer-content { width: 100%; } // Misc .navdrawer-body { margin-bottom: $navdrawer-inner-spacer-y; padding-right: $navdrawer-inner-spacer-x; padding-left: $navdrawer-inner-spacer-x; } .navdrawer-header { display: block; border-bottom: 1px solid rgba(0, 0, 0, .2); padding: $navdrawer-inner-spacer-y $navdrawer-inner-spacer-x; background-color: var(--bs-secondary-bg); .navbar-brand { font-size: 1.25rem; @include might-overflow(); } } .navdrawer-subheader { @include text-truncate; display: block; height: $navdrawer-subheader-height; line-height: 1; margin-top: 0; margin-bottom: 0; padding: ($navdrawer-subheader-height * 0.5) $navdrawer-inner-spacer-x; color: var(--bs-secondary-color); .navdrawer-divider + & { margin-top: ($navdrawer-inner-spacer-y * -1); } } .navdrawer-alert { display: block; line-height: 1; margin: 0; a { display: block; color: inherit; padding: $navdrawer-inner-spacer-x; } } // Nav .navdrawer-nav { display: flex; flex-direction: column; list-style: none; margin-top: $navdrawer-inner-spacer-y; margin-bottom: $navdrawer-inner-spacer-y; padding-left: 0; .navdrawer-header + &, .navdrawer-subheader + & { margin-top: 0; } .nav-link { @include text-truncate; display: inline-flex; align-items: center; width: 100%; font-size: 1rem; font-weight: 500; line-height: 1; padding: .75rem 1rem; color: var(--bs-body-color); & > .navdrawer-nav-icon { font-size: 1.5rem; margin-right: .75rem; } &:focus { outline: 0; } &.active, &:active { color: var(--bs-primary); } &:hover { background-color: var(--bs-secondary-bg); } &.disabled { background-color: transparent; color: var(--bs-nav-link-disabled-color); } } } ```
/content/code_sandbox/frontend/scss/overrides/_navdrawer.scss
scss
2016-04-30T21:41:23
2024-08-16T18:27:26
AzuraCast
AzuraCast/AzuraCast
2,978
714
```javascript import '~/scss/style.scss'; import * as bootstrap from 'bootstrap'; const ready = (callback) => { if (document.readyState !== "loading") callback(); else document.addEventListener("DOMContentLoaded", callback); } // Theme setting const getStoredTheme = () => localStorage.getItem('theme'); const getPreferredTheme = () => { const storedTheme = getStoredTheme(); if (storedTheme) { return storedTheme; } return window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light'; } const currentTheme = document.documentElement.getAttribute('data-bs-theme'); if (currentTheme !== 'light' && currentTheme !== 'dark') { document.documentElement.setAttribute('data-bs-theme', getPreferredTheme()); } window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', () => { const storedTheme = getStoredTheme(); if (storedTheme !== 'light' && storedTheme !== 'dark') { document.documentElement.setAttribute('data-bs-theme', getPreferredTheme()); } }); ready(() => { // Toasts document.querySelectorAll('.toast-notification').forEach((el) => { const toast = new bootstrap.Toast(el); toast.show(); }); // If in a frame, notify the parent frame of the frame dimensions. if (window.self !== window.top) { let docHeight = 0; let docWidth = 0; const postSizeToParent = () => { if (document.body.scrollHeight !== docHeight || document.body.scrollWidth !== docWidth) { docHeight = document.body.scrollHeight; docWidth = document.body.scrollWidth; const message = {height: docHeight, width: docWidth}; window.top.postMessage(message, "*"); } } postSizeToParent(); document.addEventListener("vue-ready", postSizeToParent); const mainElem = document.querySelector('main'); const resizeObserver = new ResizeObserver(postSizeToParent); resizeObserver.observe(mainElem); } }); export default bootstrap; ```
/content/code_sandbox/frontend/js/layout.js
javascript
2016-04-30T21:41:23
2024-08-16T18:27:26
AzuraCast
AzuraCast/AzuraCast
2,978
425
```javascript import Recover from '~/components/Recover.vue'; import initApp from "~/layout"; import useMinimalLayout from "~/layouts/MinimalLayout"; initApp(useMinimalLayout(Recover)); ```
/content/code_sandbox/frontend/js/pages/Recover.js
javascript
2016-04-30T21:41:23
2024-08-16T18:27:26
AzuraCast
AzuraCast/AzuraCast
2,978
38
```javascript import initApp from "~/layout"; import {h} from "vue"; import {createRouter, createWebHistory} from "vue-router"; import AdminLayout from "~/components/Admin/AdminLayout.vue"; import useAdminRoutes from "~/components/Admin/routes"; import {useAzuraCast} from "~/vendor/azuracast"; import {installRouter} from "~/vendor/router"; initApp({ render() { return h(AdminLayout); } }, async (vueApp) => { const routes = useAdminRoutes(); const {componentProps} = useAzuraCast(); installRouter( createRouter({ history: createWebHistory(componentProps.baseUrl), routes }), vueApp ); }); ```
/content/code_sandbox/frontend/js/pages/Admin.js
javascript
2016-04-30T21:41:23
2024-08-16T18:27:26
AzuraCast
AzuraCast/AzuraCast
2,978
151
```javascript import initApp from "~/layout"; import usePanelLayout from "~/layouts/PanelLayout"; import Dashboard from "~/components/Dashboard.vue"; initApp(usePanelLayout(Dashboard)); ```
/content/code_sandbox/frontend/js/pages/Dashboard.js
javascript
2016-04-30T21:41:23
2024-08-16T18:27:26
AzuraCast
AzuraCast/AzuraCast
2,978
36
```javascript import Account from '~/components/Account'; import initApp from "~/layout"; import usePanelLayout from "~/layouts/PanelLayout"; initApp(usePanelLayout(Account)); ```
/content/code_sandbox/frontend/js/pages/Account.js
javascript
2016-04-30T21:41:23
2024-08-16T18:27:26
AzuraCast
AzuraCast/AzuraCast
2,978
34
```javascript import initApp from "~/layout"; import useMinimalLayout from "~/layouts/MinimalLayout"; import Login from "~/components/Login.vue"; initApp(useMinimalLayout(Login)); ```
/content/code_sandbox/frontend/js/pages/Login.js
javascript
2016-04-30T21:41:23
2024-08-16T18:27:26
AzuraCast
AzuraCast/AzuraCast
2,978
34
```javascript import initApp from "~/layout"; import {h} from "vue"; import {createRouter, createWebHistory} from "vue-router"; import StationsLayout from "~/components/Stations/StationsLayout.vue"; import useStationsRoutes from "~/components/Stations/routes"; import {useAzuraCast} from "~/vendor/azuracast"; import {installRouter} from "~/vendor/router"; initApp({ render() { return h(StationsLayout); } }, (vueApp) => { const routes = useStationsRoutes(); const {componentProps} = useAzuraCast(); installRouter( createRouter({ history: createWebHistory(componentProps.baseUrl), routes }), vueApp ); }); ```
/content/code_sandbox/frontend/js/pages/Stations.js
javascript
2016-04-30T21:41:23
2024-08-16T18:27:26
AzuraCast
AzuraCast/AzuraCast
2,978
156
```javascript import SetupSettings from '~/components/Setup/Settings.vue'; import initApp from "~/layout"; import usePanelLayout from "~/layouts/PanelLayout"; initApp(usePanelLayout(SetupSettings)); ```
/content/code_sandbox/frontend/js/pages/Setup/Settings.js
javascript
2016-04-30T21:41:23
2024-08-16T18:27:26
AzuraCast
AzuraCast/AzuraCast
2,978
40
```javascript import SetupRegister from '~/components/Setup/Register.vue'; import initApp from "~/layout"; import useMinimalLayout from "~/layouts/MinimalLayout"; initApp(useMinimalLayout(SetupRegister)); ```
/content/code_sandbox/frontend/js/pages/Setup/Register.js
javascript
2016-04-30T21:41:23
2024-08-16T18:27:26
AzuraCast
AzuraCast/AzuraCast
2,978
39
```javascript import SetupStation from '~/components/Setup/Station.vue'; import initApp from "~/layout"; import usePanelLayout from "~/layouts/PanelLayout"; initApp(usePanelLayout(SetupStation)); ```
/content/code_sandbox/frontend/js/pages/Setup/Station.js
javascript
2016-04-30T21:41:23
2024-08-16T18:27:26
AzuraCast
AzuraCast/AzuraCast
2,978
40
```javascript import WebDJ from '~/components/Public/WebDJ.vue'; import initApp from "~/layout"; import useMinimalLayout from "~/layouts/MinimalLayout"; initApp(useMinimalLayout(WebDJ)); ```
/content/code_sandbox/frontend/js/pages/Public/WebDJ.js
javascript
2016-04-30T21:41:23
2024-08-16T18:27:26
AzuraCast
AzuraCast/AzuraCast
2,978
38
```javascript import Schedule from '~/components/Public/Schedule.vue'; import initApp from "~/layout"; import useMinimalLayout from "~/layouts/MinimalLayout"; initApp(useMinimalLayout(Schedule)); ```
/content/code_sandbox/frontend/js/pages/Public/Schedule.js
javascript
2016-04-30T21:41:23
2024-08-16T18:27:26
AzuraCast
AzuraCast/AzuraCast
2,978
37
```javascript import Player from '~/components/Public/Player.vue'; import initApp from "~/layout"; import useMinimalLayout from "~/layouts/MinimalLayout"; initApp(useMinimalLayout(Player)); ```
/content/code_sandbox/frontend/js/pages/Public/Player.js
javascript
2016-04-30T21:41:23
2024-08-16T18:27:26
AzuraCast
AzuraCast/AzuraCast
2,978
36
```javascript import History from '~/components/Public/History.vue'; import initApp from "~/layout"; import useMinimalLayout from "~/layouts/MinimalLayout"; initApp(useMinimalLayout(History)); ```
/content/code_sandbox/frontend/js/pages/Public/History.js
javascript
2016-04-30T21:41:23
2024-08-16T18:27:26
AzuraCast
AzuraCast/AzuraCast
2,978
37
```javascript import initApp from "~/layout"; import {h} from "vue"; import {createRouter, createWebHistory} from "vue-router"; import {useAzuraCast} from "~/vendor/azuracast"; import {installRouter} from "~/vendor/router"; import PodcastsLayout from "~/components/Public/Podcasts/PodcastsLayout.vue"; import usePodcastRoutes from "~/components/Public/Podcasts/routes"; initApp({ setup() { const {componentProps} = useAzuraCast(); return {componentProps}; }, render() { return h(PodcastsLayout, this.componentProps); } }, async (vueApp) => { const routes = usePodcastRoutes(); const {componentProps} = useAzuraCast(); installRouter( createRouter({ history: createWebHistory(componentProps.baseUrl), routes }), vueApp ); }); ```
/content/code_sandbox/frontend/js/pages/Public/Podcasts.js
javascript
2016-04-30T21:41:23
2024-08-16T18:27:26
AzuraCast
AzuraCast/AzuraCast
2,978
191
```javascript import FullPlayer from '~/components/Public/FullPlayer.vue'; import initApp from "~/layout"; import useMinimalLayout from "~/layouts/MinimalLayout"; initApp(useMinimalLayout(FullPlayer)); ```
/content/code_sandbox/frontend/js/pages/Public/FullPlayer.js
javascript
2016-04-30T21:41:23
2024-08-16T18:27:26
AzuraCast
AzuraCast/AzuraCast
2,978
40
```javascript import OnDemand from '~/components/Public/OnDemand.vue'; import initApp from "~/layout"; import useMinimalLayout from "~/layouts/MinimalLayout"; initApp(useMinimalLayout(OnDemand)); ```
/content/code_sandbox/frontend/js/pages/Public/OnDemand.js
javascript
2016-04-30T21:41:23
2024-08-16T18:27:26
AzuraCast
AzuraCast/AzuraCast
2,978
40
```javascript import Requests from '~/components/Public/Requests.vue'; import initApp from "~/layout"; import useMinimalLayout from "~/layouts/MinimalLayout"; initApp(useMinimalLayout(Requests)); ```
/content/code_sandbox/frontend/js/pages/Public/Requests.js
javascript
2016-04-30T21:41:23
2024-08-16T18:27:26
AzuraCast
AzuraCast/AzuraCast
2,978
37
```vue <template> <div class="public-page"> <section class="card" role="region" aria-labelledby="hdr_recover_account" > <div class="card-body p-4"> <div class="mb-3"> <h2 id="hdr_recover_account" class="card-title mb-0 text-center" > {{ $gettext('Recover Account') }} </h2> <h3 class="text-center"> <small class="text-muted"> {{ $gettext('Choose a new password for your account.') }} </small> </h3> </div> <div v-show="error != null" class="alert alert-danger" > {{ error }} </div> <form id="recover-form" class="form vue-form" action="" method="post" > <input type="hidden" name="csrf" :value="csrf" > <form-group-field id="password" name="password" label-class="mb-2" :field="v$.password" input-type="password" > <template #label> <icon :icon="IconVpnKey" class="me-1" /> {{ $gettext('Password') }} </template> </form-group-field> <div class="block-buttons mt-2"> <button type="submit" class="btn btn-primary btn-block" :disabled="v$.$invalid" > {{ $gettext('Recover Account') }} </button> </div> </form> </div> </section> </div> </template> <script setup lang="ts"> import FormGroupField from "~/components/Form/FormGroupField.vue"; import Icon from "~/components/Common/Icon.vue"; import validatePassword from '~/functions/validatePassword'; import {required} from '@vuelidate/validators'; import {useVuelidateOnForm} from "~/functions/useVuelidateOnForm"; import {IconVpnKey} from "~/components/Common/icons"; const props = defineProps({ csrf: { type: String, required: true }, error: { type: String, default: null }, }); const {v$} = useVuelidateOnForm( { password: {required, validatePassword} }, { password: null, } ) </script> ```
/content/code_sandbox/frontend/components/Recover.vue
vue
2016-04-30T21:41:23
2024-08-16T18:27:26
AzuraCast
AzuraCast/AzuraCast
2,978
547