Commit Graph

195 Commits

Author SHA1 Message Date
jo c6a007e7ac fix(legacy): consistent with docs in outputs public_url generation
Fixes #2100
2022-09-08 11:05:47 +02:00
jo e874db24c5 fix(legacy): config default values are not sanitized 2022-09-06 20:44:21 +02:00
jo 37b8b17ed3 feat(playout): allow liquidsoap listen address configuration 2022-09-06 13:21:54 +02:00
jo f5a83dbabb feat(playout): allow updating message_offline value 2022-09-06 13:21:54 +02:00
jo 5bf62dd9cb feat(legacy): read stream config from file
- We don't delete the stream preferences from the database to prevent data loss. This will be handled in a future release.
2022-09-06 13:21:54 +02:00
jo 65d3552fc7 feat: remove cc_stream_setting models
- We don't drop the cc_stream_setting table from the database to prevent data loss. This will be handled in a future release.
2022-09-06 13:21:54 +02:00
jo 090a5c93ac fix(legacy): look in /legacy for a VERSION file 2022-09-04 17:49:28 +02:00
jo 252ab00a8e style(legacy): format config 2022-09-04 17:49:28 +02:00
Jonas L c28c048bf4
chore: use https links (#2075) 2022-08-25 16:25:54 +02:00
jo 0dd96345c9 chore(legacy): fix config validator name 2022-08-25 10:52:38 +02:00
jo 4d0cbe4d15 fix(legacy): 404 on listeners stats 2022-08-25 10:52:38 +02:00
jo 9001a18f2d fix(legacy): args comma syntax error 2022-08-24 12:18:40 +02:00
Jonas L 2edbf15bf4
feat(worker): rename service and package to libretime-worker (#2065)
BREAKING CHANGE: The `libretime-celery` python package and service was renamed to `libretime-worker`. Make sure to remove the old python package and service.
2022-08-20 08:13:30 +02:00
jo e8785124e0 feat(legacy): add config dot notation access 2022-08-11 13:17:39 +02:00
jo f483852ccd refactor(legacy): clean config
- sort imports
- improve indentation
- rename internal_values to legacy_values
- reorder functions
 remove unused isYesValue
2022-08-11 13:17:39 +02:00
jo 21254b048d feat(legacy): setup config schema validation
BREAKING CHANGE: Unrecognized values in the configuration file will
raise validation errors, please make sure to cleanup your configuration
file.
2022-08-11 11:26:16 +02:00
Jonas L 1550d44ac5
style(legacy): format (#2039) 2022-08-10 13:38:19 +02:00
Jonas L 45c283504e
fix(legacy): do not rely on undefined SERVER_NAME (#2031) 2022-08-09 20:24:09 +02:00
jo 406d42323a feat: move stream stats status to pref table 2022-08-07 08:50:06 +02:00
jo 2b533d4724 feat: move stream liquisoap status to pref table 2022-08-07 08:50:06 +02:00
Jonas L 6c59ff588b
feat: move off_air_meta stream setting to pref table (#2023) 2022-08-06 19:18:40 +02:00
Jonas L f137be09a1
fix(legacy): sanitize track_type_id when updating file (#2003)
Fixes #2000
2022-07-27 09:52:09 +02:00
Jonas L fc856c5667
fix(legacy): get local logo file (#1999)
Load logo content from the local file instead of the public location.
2022-07-27 09:51:14 +02:00
Jonas L 067b35e9bb
feat(analyzer): load callback details from config and file_id (#1993) 2022-07-26 14:19:22 +02:00
Jonas L d93731807c
feat(worker): load callback details from config (#1994) 2022-07-26 14:18:41 +02:00
jo 71b3f7f065 chore: remove schedule unused independent_event 2022-07-20 12:05:01 +02:00
jo a8cb62586e feat: remove unused cc_country table 2022-07-12 11:33:22 +02:00
jo f234aa7c42 fix(legacy): no invalid track type in smartblock criteria 2022-07-12 11:32:26 +02:00
jo c28fe32cdc style(legacy): php-cs-fixer upgrade 2022-07-11 17:30:52 +02:00
jo 829b9bcd5b chore(legacy): use Config::getPublicUrl helper
Replace Application_Common_HTTPHelper::getStationUrl with Config::getPublicUrl.
2022-07-08 11:03:10 +02:00
jo 72960593c7 chore(legacy): use Config::getBasePath helper
Replace Application_Common_OsPath::getBaseDir with Config::getBasePath.
2022-07-08 11:03:10 +02:00
jo 712ecd70b4 chore(legacy): remove exploded public_url config
Replace exploded public_url parts with validated url object.
2022-07-08 11:03:10 +02:00
jo db976881f0 fix: use constrained foreign key for files track_type 2022-07-07 21:07:41 +02:00
jo bcaea16c19 fix(legacy): check empty before iteration on files 2022-07-07 21:07:41 +02:00
jo 5e8f7d430f style(legacy): format files 2022-07-07 21:07:41 +02:00
Jonas L 4d393fa14e
style(legacy): format files (#1946) 2022-07-07 20:01:15 +02:00
Jonas L eb19283d96
fix(legacy): don't log 'could not obtain lock' exception (#1943)
Fixes #1490
2022-07-07 16:47:56 +02:00
jo c6bba21ef9 fix(legacy): station-metadata api endpoint
- Remove hardcoded http://
- Add missing $request variable
2022-07-07 16:44:27 +02:00
jo be7447b28f style(legacy): format ApiController.php 2022-07-07 16:44:27 +02:00
jo f1270fed6f feat(legacy): don't guess cors url from server 2022-07-07 10:51:07 +02:00
Jonas L 703a8e5856
chore: remove cloud storage remainings (#1934) 2022-07-04 22:09:14 +02:00
jo 0e6b0da142 feat(legacy): add Ukrainian language 2022-07-04 20:00:51 +02:00
jo fa136fad97 chore: explicit schedule file metadata dict values 2022-07-01 11:07:26 +02:00
jo 216ab62507 style(legacy): format Schedule.php 2022-07-01 11:07:26 +02:00
jo 523f646acc feat(legacy): compute md5 during early upload 2022-06-28 19:05:14 +02:00
jo df3b4fccd4 style(legacy): format CcFiles.php 2022-06-28 19:05:14 +02:00
Jonas L 9c042c881a
feat: remove unused cc_perms table (#1909) 2022-06-22 16:32:39 +02:00
Jonas L 4837a1885d
feat: remove unused cc_sess table (#1907) 2022-06-22 15:15:31 +02:00
jo 71cfab79ef feat: rename default stream mount point to main
This will not change the default mount point if you are upgrading.

BREAKING: The default stream mount point changed from `airtime_128` to `main`. Be sure to updates your clients accordingly.
2022-06-18 12:08:29 +02:00
jo f936ba39ed style(legacy): format stream settings model 2022-06-18 12:08:29 +02:00
Jonas L 8d2b340017
fix(legacy): remove file directory metadata (#1887) 2022-06-17 16:02:13 +02:00
jo 28b9343c77 fix(legacy): remove not null contraint when using default
This fixes the inital schema creation to match as if the old migrations
were always run.

The third_party_track_references.file_id field should not have a not
null constraint while have a default value to 0.
2022-06-08 23:23:08 +02:00
jo f7bb6e7592 feat: move storage path setting to configuration file
- change default storage path to /srv/libretime
- remove music dirs table
- use /tmp for testing storage
- storage dir should always have a trailing slash
2022-06-08 23:23:08 +02:00
jo 0d16960887 feat: remove php web installer 2022-06-08 23:23:08 +02:00
jo eb8e7b3415 feat: move allowed cors url to configuration file
- don't set cors origins form field as readonly and add deprecation notice.
2022-06-08 23:23:08 +02:00
jo 980f1acd0c fix: correct cc_file.artwork column size 2022-06-08 23:23:08 +02:00
jo 0e4bc4cacd feat: replace php migration with django migration
- keep latest legacy version in initial migration file
- move propel schema to api legacy app
- remove legacy upgrade tool
2022-06-08 23:23:08 +02:00
jo aed6d2f294 feat: change config dir path to /etc/libretime
BREAKING: The configuration directory changed from `/etc/airtime` to
`/etc/libretime`. Please rename your configuration directory accordingly.
2022-06-08 23:23:08 +02:00
jo 604ff20239 feat: change config filename to config.yml
BREAKING: The configuration file name changed from `airtime.conf` to
`config.yml`. Please rename your configuration file accordingly.
2022-06-08 23:23:08 +02:00
jo e4439390fe feat: change config file format to yaml
- docs: add link to yaml.org

BREAKING: The `ini` configuration file format changed to `yml`. Please
rewrite your configuration file using the yaml format.
2022-06-08 23:23:08 +02:00
Jonas L be5d732006
fix(legacy): station url always has a trailing slash (#1838) 2022-05-05 19:24:51 +02:00
jo 981ba4fe33 fix(legacy): the ini config parser requires a .conf ext
- rename installer config filepath
2022-04-25 16:45:01 +02:00
jo 241105f0a0 fix(legacy): load vendors during config init
Propel does not have the vendors loaded, even if they are loaded during 'preload.php'.
2022-04-25 16:45:01 +02:00
jo 751d430bcc feat: replace exploded base_* with public_url
Fixes #1574

BREAKING CHANGE: The `general` section in the config schema has changed: the `general.base_*`, `general.protocol` and `general.force_ssl` configuration fields have been replaced with a single `general.public_url` field. Be sure to use a valid url with the new configuration field.
2022-04-25 16:45:01 +02:00
Kyle Robbertze d698ace89f
chore: update code of conduct URLs (#1724)
* chore: update code of conduct URLs

* lowercase org name

Co-authored-by: Jonas L <jooola@users.noreply.github.com>
2022-04-01 13:02:13 +00:00
Jonas L 331df277b4
docs: fix and update links (#1714) 2022-03-29 13:07:38 +02:00
Jonas L 69d8eae845
style(legacy): fix code format with php-cs-fixer (#1674) 2022-03-14 12:15:04 +02:00
jo dc7560e1df feat(legacy): replace massivescale/celery-php with jooola/celery-php 2022-03-04 22:18:29 +02:00
jo f088cc2873 feat(legacy): clean config parsing and add defaults
BREAKING CHANGE: The configuration schema has changed:
- The `rabbitmq.*` configuration fields now have defaults.
- The `current_backend.storage_backend` configuration field
  now defaults to the only valid value `file`.
- The `general.cache_ahead_hours` configuration field now defaults to 1.
2022-02-23 13:18:05 +02:00
jo 4d868fac00 feat: remove unused web_server_user config entry
- remove InstallStorageDirectory function

BREAKING CHANGE: The configuration schema has changed:
- The `general.web_server_user` configuration field is
not used anymore.
2022-02-23 13:18:05 +02:00
Jonas L ae5746d26d
style: fix php-cs-fixer linting (#1575) 2022-02-08 11:14:59 +02:00
Jonas L 3245216869
feat(legacy): add db config defaults and allow custom port (#1559)
* feat(legacy): allow custom port for database connection

- fix heredoc for php72

* update test config db section

* update sample config db section

* update api db config

* use defaults for database config section

* update documentation

* more documentation for migration
2022-02-04 16:03:01 +02:00
Jonas L 173ec6b334
fix(legacy): revert default storage path (#1563)
The installer hasn't been updated to create the default storage path.
2022-02-04 15:57:09 +02:00
Jonas L 729a7b99e0
feat(legacy): consolidate constants (#1558)
* remove unused file

* fix paths leading slash

* remove useless imports

* refactor(legacy): use constants everywhere

* fix path leading slash

* remove useless import

* consolidate legacy contants

* format code

* reuse LIBRETIME_CONFIG_DIR

* fix test config path

* remove ci legacy log dir creation

* some logs improvements
2022-02-04 12:00:41 +02:00
Jonas L 0ce1634c9d
feat(legacy): rename log filepath (#1551)
BREAKING CHANGE: moved legacy log file from '/var/log/airtime/zendphp.log' to '/var/log/libretime/legacy.log'
2022-01-31 11:27:53 +02:00
Jonas L 74c8d20284
fix(legacy): only render if img creation succeed (#1540)
Fixes #1489
2022-01-28 07:04:58 +02:00
jo 86948e7b93 fix(legacy): add more null check in api live info 2022-01-27 16:01:09 +02:00
jo ace167fe10 fix(legacy): do not catch too broad exceptions 2022-01-27 16:01:09 +02:00
jo 3f67d36909 fix(legacy): default values when array is null 2022-01-27 16:01:09 +02:00
Jonas L 8569af9328
style(legacy): force semicolon on same line (#1534) 2022-01-23 20:15:55 +02:00
Kyle Robbertze 8b4260d74b fix(legacy): correct linting issues 2022-01-15 00:51:01 +01:00
Jonas L c2cd1c28b8
chore: rename master branch to main (#1508) 2022-01-13 16:03:31 +00:00
Jonas L fd580d689f
fix(legacy): validate id param in show image controller (#1510) 2022-01-13 07:10:32 +02:00
dependabot[bot] ccde6039e7
Bump php-amqplib/php-amqplib from 2.12.3 to 3.0.0 in /legacy (#1418)
* Bump php-amqplib/php-amqplib from 2.12.3 to 3.0.0 in /legacy

Bumps [php-amqplib/php-amqplib](https://github.com/php-amqplib/php-amqplib) from 2.12.3 to 3.0.0.
- [Release notes](https://github.com/php-amqplib/php-amqplib/releases)
- [Changelog](https://github.com/php-amqplib/php-amqplib/blob/master/CHANGELOG.md)
- [Commits](https://github.com/php-amqplib/php-amqplib/compare/v2.12.3...v3.0.0)

---
updated-dependencies:
- dependency-name: php-amqplib/php-amqplib
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Replace deprecated AMQPConnection with AMQPStreamConnection

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: jo <ljonas@riseup.net>
2021-10-17 21:55:12 +02:00
Jonas L 5e8d8db6e9
Feature: Support php7.4 (#1354)
* Run CI tests against php 7.4

* Sort composer dependencies

* Remove unused Aws S3 php library

* Pin simplepie dependency to ^1.5

* Pin getid3 dependency to ^1.9

* Pin composer semver to ^3.2

* Pin php-amqplib to ^2.12

* Drop sentry logging support

* Update composer dependencies

* Move propel regenerate to Makefile

* Regenerate propel files with v1.7.0

* Pin propel orm to ^1.7

* Regenerate propel files with v1.7.2

* fix: generator_version in airtime-conf-production.php

* Replace propel/propel1 with jooola/propel1

* Regenerate propel files with v1.7.3-dev

* Fix php7.4 compatibility

Using php-cs-fixer:

    '@PhpCsFixer' => true,
    'concat_space' => ['spacing' => 'one'],
    'ordered_class_elements' => false,
    'yoda_style' => false,
    '@PHP74Migration' => true,
    'assign_null_coalescing_to_coalesce_equal' => false,
    'ternary_to_null_coalescing' => false,
    'heredoc_indentation' => false,
    '@PHP74Migration:risky' => true,
    'declare_strict_types' => false,
    'void_return' => false,
    'use_arrow_functions' => false,

* Fix pre-commit
2021-10-17 17:19:53 +02:00
Jonas L 1efa0742c9
Clean and update locales (#1402)
* Remove untranslated languages

* Add country prefix to some locales

* Remove locale template file

* Prepare nl_NL and tr_TR locale for future use

* Sort locales list and put en_Us at the top

* Enhance locale Makefile

Add clean target for locales

Set locale all target to clean and build

Ensure we keep issue tracker on po updates

* Update locales headers

* Scan sources files and update locales
2021-10-17 00:20:03 +02:00
jo a070e4a4c3 Rename locale text domain to libretime 2021-10-15 14:12:27 +02:00
jo a7e6cb4ed8 Remove 'pro' locales domain 2021-10-15 14:12:27 +02:00
jo 69d85c4236 Fix legacy services check names 2021-10-14 16:03:35 +02:00
jo 83b7e4162e Run pre-commit on legacy code 2021-10-12 11:17:57 +02:00
jo f05c228f1d Put regex rules between single quotes 2021-10-12 11:09:46 +02:00
jo d52c6184b9 Format code using php-cs-fixer 2021-10-12 11:07:56 +02:00
jo ab0f3d04b8 Fix complex string interpolation 2021-10-12 11:07:56 +02:00
jo c4c89eae19 Fix paths after legacy rename 2021-10-11 13:43:39 +02:00
jo 3e18d42c8b Rename airtime_mvc/ to legacy/ 2021-10-11 13:43:25 +02:00