sintonia/legacy/application/configs/constants.php

131 lines
5.0 KiB
PHP
Raw Normal View History

<?php
2021-10-11 16:10:47 +02:00
define('PRODUCT_NAME', 'LibreTime');
define('PRODUCT_SITE_URL', 'http://libretime.org');
define('SAAS_PRODUCT_BRANDING_NAME', 'LibreTime');
define('SAAS_LOGIN_REFERRER', 'http://libretime.org');
2021-10-11 16:10:47 +02:00
define('COMPANY_NAME', 'LibreTime Community');
define('COMPANY_SUFFIX', '');
define('COMPANY_SITE', 'libretime.org');
define('COMPANY_SITE_URL', 'http://libretime.org');
define('SUPPORT_ADDRESS', 'https://discourse.libretime.org/');
define('HELP_URL', 'https://discourse.libretime.org/');
define('WHOS_USING_URL', 'https://github.com/orgs/LibreTime/people');
define('TERMS_AND_CONDITIONS_URL', 'https://github.com/LibreTime/libretime/blob/main/README.md');
define('PRIVACY_POLICY_URL', 'https://github.com/LibreTime/code-of-conduct/blob/main/CODE_OF_CONDUCT.md');
2021-10-11 16:10:47 +02:00
define('USER_MANUAL_URL', 'http://libretime.org/docs');
define('ABOUT_AIRTIME_URL', 'http://libretime.org');
define('LIBRETIME_CONTRIBUTE_URL', 'https://libretime.org/contribute');
define('LIBRETIME_DISCOURSE_URL', 'https://discourse.libretime.org');
define('UI_REVAMP_EMBED_URL', 'https://www.youtube.com/embed/nqpNnCKGluY');
define('LIBRETIME_WHATS_NEW_URL', 'https://github.com/LibreTime/libretime/releases');
define('LIBRETIME_UPDATE_FEED', 'https://github.com/LibreTime/libretime/releases.atom');
define('LIBRETIME_EMAIL_FROM', 'noreply@libretime.org');
define('LICENSE_VERSION', 'GNU AGPL v.3');
define('LICENSE_URL', 'http://www.gnu.org/licenses/agpl-3.0-standalone.html');
define('AIRTIME_COPYRIGHT_DATE', '2010-2015');
define('AIRTIME_REST_VERSION', '1.1');
define('AIRTIME_API_VERSION', '1.1');
// XXX: it's important that we upgrade this on major version bumps, usually users get more exact info from VERSION in airtime root dir
define('LIBRETIME_MAJOR_VERSION', '3');
Vendorize ZF1, fix PHPUnit and configure travis This a a rather large commit due to the nature of the stuff it is touching. To get PHPUnit up and running again I had to update some deps and I did so by vendorizing them. The vendorizing of zf1 makes sense since distros are already considering to drop it from their repos. * [x] install vendorized zf1 with composer * [x] load composer autoloader before zf1 * [x] Implement headAction for all Zend_Rest_Controller based controllers * [x] switch to yml dataset to get around string only limitations of xml sets (also removed warning in readme) * [x] use year 2044 as hardcoded date for tests since it is in the future and has the same days like previously used 2016 * [x] make tests easier to run when accessing phpunit directly * [x] clean up test helper to always use airtime.conf * [x] switch test dbname to libretime_test * [x] test db username password switched to libretime/libretime * [x] install phpunit with composer in a clear version (make tests easier to reproduce on other platforms) * [x] remove local libs from airtime repo (most of airtime_mvc/library was not needed of in vendor already) * [x] configure composer autoloading and use it (also removed requires that are not needed anymore) * [x] add LibreTime prefix for FileNotFoundException (phing had a similar class and these are all pre-namespace style) * [x] add .travis.yml file * [x] make etc and logdir configurable with LIBRETIME_CONF_DIR and LIBRETIME_LOG_DIR env (so travis can change it) * [x] slight cleanup in config for travis not to fail * [x] add cloud_storage.conf for during test runs * [x] rewrite mvc testing docs and move them to docs/ folder * [x] don't use `static::class` in a class that does not have a parent class, use `__CLASS__` instead. * [x] don't use `<ClassName>::class`, since we already know what class we want `"<ClassName>"` ist just fine. * [x] fix "can't use method in write context" errors on 5.4 (also helps the optimizer) * [x] add build status badge on main README.md Fixes https://github.com/LibreTime/libretime/issues/4 The PHP parts of https://github.com/LibreTime/libretime/pull/10 get obsoleted by this change and it will need rebasing. This also contains https://github.com/LibreTime/libretime/pull/8, the late static binding compat code was broken for no reason and until CentOS drops php 5.4 there is no reason I'm aware of not to support it. I inlined #8 since the test would be failing on php 5.4 without the change. If you want to run tests you need to run `composer install` in the root directory and then `cd airtime_mvc/tests && ../../vendor/bin/phpunit`. For the tests to run the user `libretime` needs to be allowed to create the `libretime_test` database. See `docs/TESTING.md` for more info on getting set up.
2017-02-20 21:47:53 +01:00
// grab values from env (i'll do this everywhere with a small function if we like it)
define('LIBRETIME_CONF_DIR', getenv('LIBRETIME_CONF_DIR') ? getenv('LIBRETIME_CONF_DIR') : '/etc/airtime');
define('LIBRETIME_LOG_DIR', getenv('LIBRETIME_LOG_DIR') ? getenv('LIBRETIME_LOG_DIR') : '/var/log/libretime');
Vendorize ZF1, fix PHPUnit and configure travis This a a rather large commit due to the nature of the stuff it is touching. To get PHPUnit up and running again I had to update some deps and I did so by vendorizing them. The vendorizing of zf1 makes sense since distros are already considering to drop it from their repos. * [x] install vendorized zf1 with composer * [x] load composer autoloader before zf1 * [x] Implement headAction for all Zend_Rest_Controller based controllers * [x] switch to yml dataset to get around string only limitations of xml sets (also removed warning in readme) * [x] use year 2044 as hardcoded date for tests since it is in the future and has the same days like previously used 2016 * [x] make tests easier to run when accessing phpunit directly * [x] clean up test helper to always use airtime.conf * [x] switch test dbname to libretime_test * [x] test db username password switched to libretime/libretime * [x] install phpunit with composer in a clear version (make tests easier to reproduce on other platforms) * [x] remove local libs from airtime repo (most of airtime_mvc/library was not needed of in vendor already) * [x] configure composer autoloading and use it (also removed requires that are not needed anymore) * [x] add LibreTime prefix for FileNotFoundException (phing had a similar class and these are all pre-namespace style) * [x] add .travis.yml file * [x] make etc and logdir configurable with LIBRETIME_CONF_DIR and LIBRETIME_LOG_DIR env (so travis can change it) * [x] slight cleanup in config for travis not to fail * [x] add cloud_storage.conf for during test runs * [x] rewrite mvc testing docs and move them to docs/ folder * [x] don't use `static::class` in a class that does not have a parent class, use `__CLASS__` instead. * [x] don't use `<ClassName>::class`, since we already know what class we want `"<ClassName>"` ist just fine. * [x] fix "can't use method in write context" errors on 5.4 (also helps the optimizer) * [x] add build status badge on main README.md Fixes https://github.com/LibreTime/libretime/issues/4 The PHP parts of https://github.com/LibreTime/libretime/pull/10 get obsoleted by this change and it will need rebasing. This also contains https://github.com/LibreTime/libretime/pull/8, the late static binding compat code was broken for no reason and until CentOS drops php 5.4 there is no reason I'm aware of not to support it. I inlined #8 since the test would be failing on php 5.4 without the change. If you want to run tests you need to run `composer install` in the root directory and then `cd airtime_mvc/tests && ../../vendor/bin/phpunit`. For the tests to run the user `libretime` needs to be allowed to create the `libretime_test` database. See `docs/TESTING.md` for more info on getting set up.
2017-02-20 21:47:53 +01:00
// Defaults
define('DEFAULT_LOGO_PLACEHOLDER', 1);
2015-06-10 22:01:16 +02:00
define('DEFAULT_LOGO_FILE', 'images/airtime_logo.png');
define('DEFAULT_TIMESTAMP_FORMAT', 'Y-m-d H:i:s');
define('DEFAULT_MICROTIME_FORMAT', 'Y-m-d H:i:s.u');
define('DEFAULT_ICECAST_PORT', 8000);
define('DEFAULT_ICECAST_PASS', 'hackme');
define('DEFAULT_SHOW_COLOR', '76aca5');
define('DEFAULT_INTERVAL_FORMAT', 'H:i:s.u');
// Metadata Keys for files
2021-10-11 16:10:47 +02:00
define('MDATA_KEY_FILEPATH', 'filepath');
define('MDATA_KEY_DIRECTORY', 'directory');
define('MDATA_KEY_MD5', 'md5');
define('MDATA_KEY_TITLE', 'track_title');
define('MDATA_KEY_CREATOR', 'artist_name');
define('MDATA_KEY_SOURCE', 'album_title');
define('MDATA_KEY_DURATION', 'length');
define('MDATA_KEY_MIME', 'mime');
define('MDATA_KEY_FTYPE', 'ftype');
define('MDATA_KEY_URL', 'info_url');
define('MDATA_KEY_GENRE', 'genre');
define('MDATA_KEY_MOOD', 'mood');
define('MDATA_KEY_LABEL', 'label');
define('MDATA_KEY_COMPOSER', 'composer');
define('MDATA_KEY_DESCRIPTION', 'description');
define('MDATA_KEY_SAMPLERATE', 'sample_rate');
define('MDATA_KEY_BITRATE', 'bit_rate');
define('MDATA_KEY_ENCODER', 'encoded_by');
define('MDATA_KEY_ISRC', 'isrc_number');
define('MDATA_KEY_COPYRIGHT', 'copyright');
define('MDATA_KEY_YEAR', 'year');
define('MDATA_KEY_BPM', 'bpm');
define('MDATA_KEY_TRACKNUMBER', 'track_number');
define('MDATA_KEY_CONDUCTOR', 'conductor');
define('MDATA_KEY_LANGUAGE', 'language');
define('MDATA_KEY_REPLAYGAIN', 'replay_gain');
define('MDATA_KEY_OWNER_ID', 'owner_id');
define('MDATA_KEY_CUE_IN', 'cuein');
define('MDATA_KEY_CUE_OUT', 'cueout');
define('MDATA_KEY_ARTWORK', 'artwork');
define('MDATA_KEY_ARTWORK_DATA', 'artwork_data');
2021-10-11 16:10:47 +02:00
define('MDATA_KEY_TRACK_TYPE', 'track_type');
2021-10-11 16:10:47 +02:00
define('UI_MDATA_VALUE_FORMAT_FILE', 'File');
define('UI_MDATA_VALUE_FORMAT_STREAM', 'live stream');
//User types
2021-10-11 16:10:47 +02:00
define('UTYPE_HOST', 'H');
define('UTYPE_ADMIN', 'A');
define('UTYPE_SUPERADMIN', 'S');
define('UTYPE_GUEST', 'G');
define('UTYPE_PROGRAM_MANAGER', 'P');
2013-07-23 00:11:44 +02:00
//Constants for playout history template fields
define('TEMPLATE_DATE', 'date');
define('TEMPLATE_TIME', 'time');
define('TEMPLATE_DATETIME', 'datetime');
define('TEMPLATE_STRING', 'string');
define('TEMPLATE_BOOLEAN', 'boolean');
define('TEMPLATE_INT', 'integer');
define('TEMPLATE_FLOAT', 'float');
// Session Keys
define('UI_PLAYLISTCONTROLLER_OBJ_SESSNAME', 'PLAYLISTCONTROLLER_OBJ');
/*define('UI_PLAYLIST_SESSNAME', 'PLAYLIST');
define('UI_BLOCK_SESSNAME', 'BLOCK');*/
//Sentry error logging
define('SENTRY_CONFIG_PATH', LIBRETIME_CONF_DIR . '/sentry.airtime_web.ini');
//TuneIn integration
2021-10-11 16:10:47 +02:00
define('TUNEIN_API_URL', 'http://air.radiotime.com/Playing.ashx');
// Celery
define('CELERY_PENDING_STATUS', 'PENDING');
define('CELERY_SUCCESS_STATUS', 'SUCCESS');
define('CELERY_FAILED_STATUS', 'FAILED');
// Celery Services
define('PODCAST_SERVICE_NAME', 'podcast');
// Publish Services
define('STATION_PODCAST_SERVICE_NAME', 'station_podcast');
// Podcast Types
2015-09-29 19:04:22 +02:00
//define('STATION_PODCAST', 0);
//define('IMPORTED_PODCAST', 1);
define('ITUNES_XML_NAMESPACE_URL', 'http://www.itunes.com/dtds/podcast-1.0.dtd');