Commit Graph

253 Commits

Author SHA1 Message Date
Robb 8f372f5610 Merge pull request #136 from radiorabe/feature/freeipa-auth
FreeIPA Auth Adaptor for LibreTime
2017-04-03 11:50:23 -04:00
Robb Ebright 8a92c80bcb Fixed autoplaylist repeat to fill show 2017-04-01 01:00:00 -04:00
Lucas Bickel aa5bc06d74 FreeIPA Auth Adaptor for LibreTime
Allow delegating user authentication to FreeIPA rather than having it be checked against the database.
2017-03-31 14:16:31 +02:00
Robb Ebright 7a944ac9ce code change to repeat autoplaylists lacking UI option to enable/disable 2017-03-30 23:01:31 -04:00
Lucas Bickel ee81a73817 Run more unstranslated Strings through _() 2017-03-24 13:32:15 +01:00
Lucas Bickel 1fc1e6a199 Get rid of session use in auto playlist
The user object was triggering the creation of a user context that tried to grab something from the session. The later code never tried to use this due to the checkPerm flag.

I'm assuming the user model used to have a sane constructor w/o side effects in the times where this code had it's heyday.
2017-03-22 12:26:18 +01:00
Robb Ebright 934cad44b5 Fixing dependence upon hard-coded password by modifying playlist build to not require authentication 2017-03-21 15:02:31 -04:00
Lucas Bickel 38d4fdcdda Disable all google tracking per default 2017-03-13 17:30:05 +01:00
Robb 2be8ef0f2b Merge pull request #55 from radiorabe/feature/autodj
Robbs AutoDJ
2017-03-11 18:41:08 -05:00
Lucas Bickel 1c1f7587a3 Fix _isTask method in taskmanager
The is_a fix from 09aea8b747 was not quite the way to go, with array_key_exists and class_implements implements the TaskManager finds all tasks again.
2017-03-11 22:49:05 +01:00
Lucas Bickel 2a53241ba3 Whitespace and deadcode nitpick 2017-03-10 16:27:46 +01:00
Robb Ebright 32a1a66378 Added AutoPlaylist Functionality to Show Scheduler enabling shows to have tracks added automatically. 2017-03-10 15:33:32 +01:00
Lucas Bickel baa0f9ba77 Make CORS great again
This fixes CORS to work properly with most 2.5 api endpoints while keeping the JSONP format available.

* [x] return JSONP or JSON with proper CORS headers from API
* [x] Field in Genereal Preferences Form to configure CORS enabled URLs

See #17 for what triggered this refactor. I beleive this should make integrating the APIs on the client side trivial without mandating the use of JSONP.
2017-03-10 15:10:56 +01:00
Robb 0abfa7f018 Merge pull request #23 from radiorabe/feature/stop-using-reflection-inproduction-code
stop using reflection in production code
2017-03-04 22:25:34 -05:00
Lucas Bickel 09aea8b747 stop using reflection in prooduction code
Problem: Reflection is a debugging tool and not really meant for use on production. There are easier ways to check if a class implements an interface with `is_a()`.

Solution: Get rid of reflection use and switch to `is_a()` in TaskManager, refactor the Enum thing that does not make sense since it is not being used.

The `is_a()` solution is really straightforward and has been supported in php for ages.

The Enum thing was a copy paste hack from stackoverflow and ignored the simple solution mentioned there while not using the features of the advanced one.
2017-03-03 22:48:19 +01:00
Lucas Bickel 6e03863fa1 Problem: Billing is always on
Solution: Make billing configurable through LIBRETIME_ENABLE_BILLING and deactivate it

This should catch all the changes needed to deactive billing in LibreTime.

* [x] only call billing when it is enabled
* [x] let super admins edit their info
* [x] dont link to billing if it is disabled
2017-03-03 15:34:54 +01:00
Lucas Bickel 625f92fe44 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-27 17:59:01 +01:00
Albert Santoni 09316041c6 Fix unnecessary HTTPS redirect to reduce traffic 2015-12-08 17:47:07 -05:00
Duncan Sommerville 27df10cb5d Mute 'Waiting for Celery task' logging 2015-11-27 17:22:05 -05:00
Duncan Sommerville eff7cd2f07 Fix bug in podcast download 2015-11-27 16:48:44 -05:00
Duncan Sommerville 786b357ed5 Add bandwidth limit for trial plan 2015-11-26 12:37:09 -05:00
Duncan Sommerville e68f6cadd6 Add bandwidth limits for awesome august plan levels 2015-11-26 12:31:59 -05:00
Duncan Sommerville 3f241b2f25 SAAS-1229 - add default bandwidth limit values 2015-11-25 15:04:45 -05:00
Duncan Sommerville 82544f34d9 SAAS-1229, SAAS-1230 - initial implementation of station suspend when over bandwidth limit 2015-11-24 13:36:54 -05:00
Duncan Sommerville 6c2d1f008b SAAS-1229 - initial work on bandwidth limit within Airtime; overhaul TaskFactory to get tasks reflectively 2015-11-19 16:08:25 -05:00
Albert Santoni 965a78c54a Merge branch 'saas-dev' into saas-dev-publishing
Conflicts:
	airtime_mvc/application/controllers/ApiController.php
2015-11-18 12:38:18 -05:00
Duncan Sommerville e75d614537 Merge branch 'saas-dev-publishing' of github.com:sourcefabric/airtime into saas-dev-publishing 2015-11-17 17:50:20 -05:00
Duncan Sommerville bdddd6f6ce Try to fix iTunes RSS compatibility 2015-11-17 17:50:16 -05:00
Albert Santoni 4fd61cb088 Merge branch 'saas-dev-publishing' of github.com:sourcefabric/Airtime into saas-dev-publishing 2015-11-17 17:34:33 -05:00
Albert Santoni c5d9dfd93d Restrict podcast hosting for some plans. Fixed error page colours. 2015-11-17 17:34:13 -05:00
Duncan Sommerville 30c9c730be Bugfixes and itunes compatibility fix 2015-11-17 17:23:21 -05:00
Duncan Sommerville c12848b2de * SAAS-1212 - fix validation errors in station podcast rss
* Append podcast title to heading in episodes view
2015-11-17 12:26:21 -05:00
Duncan Sommerville 7707378c2b Improve the publish service implementation 2015-11-16 16:18:29 -05:00
Duncan Sommerville 74f7c454b5 * SAAS-1184 - more polish for publishing/podcasting
* Fix some issues with the station podcast feed
* Various small fixes
2015-11-11 16:47:07 -05:00
Duncan Sommerville bb7f8c1ed3 SAAS-1184 - bugfixes and polish 2015-11-10 15:10:36 -05:00
Duncan Sommerville 0360b5e460 * SAAS-1182 - added sanity checks and additional logic to rss import and episode generation
* SAAS-1184 - started work on podcast UI polishing
* Fixed pull request issues
2015-11-09 18:17:49 -05:00
Duncan Sommerville 0be26d621b SAAS-1165 - implement most functionality for left-hand podcast episodes view 2015-11-05 18:15:58 -05:00
Albert Santoni 685134d8bb Better trial suspension notice 2015-11-05 12:45:09 -05:00
Duncan Sommerville def8e7280b * SAAS-1161 - refactor backend so episodes are loaded separately from podcast data to speed up loading and improve API readability
* Decouple imported and station podcast behaviour on the frontend
2015-11-02 18:07:16 -05:00
Duncan Sommerville 4f281a30ed Add SoundCloud update and download tasks to Celery backend; requires airtime-celery reinstall 2015-10-30 16:10:16 -04:00
Duncan Sommerville 9af7f6dcdd Fix tabs bugs and podcast auto-ingest error 2015-10-30 10:29:22 -04:00
Duncan Sommerville d08e19a93a More small TaskManager and auto-ingest fixes 2015-10-29 18:26:20 -04:00
Duncan Sommerville e3feb17f0c * Change the Celery timeout to 15 minutes (from 10) to better accommodate automatic ingest
* Fix various small bugs in auto ingestion and tab implementation
* Update TaskManager run conditions to piggyback on API calls - guarantees a certain frequency of requests and greatly reduces chances of lock contention
2015-10-29 17:53:45 -04:00
Duncan Sommerville 95aae317c6 Merge branch 'saas-dev' into saas-dev-publishing
Conflicts:
	airtime_mvc/application/controllers/plugins/PageLayoutInitPlugin.php
	airtime_mvc/public/css/dashboard.css
	airtime_mvc/public/js/airtime/library/spl.js
2015-10-29 11:21:24 -04:00
Duncan Sommerville ada7212823 Add TaskManager task to fail pending imports over an hour old 2015-10-29 11:03:28 -04:00
Duncan Sommerville cd17a23d13 Fix download counter reset timer 2015-10-29 09:23:41 -04:00
Duncan Sommerville cc9f1ea6d0 * Wrap station podcast feed contents on radio page in displayRssTab check
* Test fix for automatic ingest bug
* Move disable layout code in feeds controller to avoid error case
2015-10-28 10:58:22 -04:00
Duncan Sommerville e8980e7a79 Bugfixes and more work on station podcast frontend 2015-10-22 18:03:38 -04:00
Duncan Sommerville f94e462fe0 Revert polling interval for podcast ingest 2015-10-22 12:22:56 -04:00
Duncan Sommerville 9302027a2b Fix issue with automatic ingest; shift episode ingest to PodcastEpisodesController 2015-10-22 12:12:41 -04:00