Commit Graph

504 Commits

Author SHA1 Message Date
jo 512c67b1a6 Auth to API v1 using Authorization: Api-Key header 2021-09-15 14:56:14 +02:00
jo 719f6b5c6a Handle bad payload in some airtime_mvc api calls
Added a basic JSON decode error safe guard for the following actions:
- pushStreamStatsAction
- updateStreamSettingTableAction
2021-08-05 15:06:01 +02:00
Thomas Göttgens b15166ecbe
Prevent 500 errors when no content is available 2020-07-11 18:48:58 +02:00
Robb 96f33f6250
Merge pull request #892 from codenift/media_type
Track Types Feature
2020-03-16 14:05:29 -04:00
Codenift dc2250c212 live info api fix 2020-02-27 18:59:14 -05:00
Codenift 1d7d937a7f track type management 2020-01-25 12:09:19 -05:00
Codenift 251ecf1ff7 Fix causing API to fail. 2019-10-17 00:23:19 -04:00
Codenift 45dbf84750 Generate artwork images for audio using ID3. 2019-09-19 20:07:50 -04:00
Lucas Bickel 0f5cb8b1f8 🔥 remove remaining legacy saas code 2019-08-18 16:34:29 +02:00
Richard Patterson f9d810eb94 Expose source status via live-info-v2 endpoint. 2019-04-22 14:58:42 +01:00
Robb f3b1133c3b
Merge pull request #742 from mikeopensauce/apistatus
Apistatus
2019-02-18 12:22:17 -05:00
Mike Cox 9e36dda855 Add new features to API on air call which shows the status of the two streams and whether they are switched to live output 2019-02-18 12:19:41 +00:00
Your Name 7f69b1adf1 Bugfix for #726. Fixes onAirLightAction returning 500 error 2019-02-10 09:58:10 +00:00
Lucas Bickel afa67eb96d 🔥 remove dead code 2018-10-06 21:18:44 +02:00
comiconomenclaturist f42401a6ad modified: airtime_mvc/application/controllers/ApiController.php 2017-03-27 16:04:20 +02:00
Lucas Bickel b267036483 Fix recording through ecasound
This is part 2 of fixing ecasound recordings from line-in. Part 1 restored the User-Interface, part 2 takes care of getting to the point where ecasound gets started, records something and uploads it through rest when done. Part 3 will take care of making sure that the recorded file is mapped to the show and not just stored as a new track.

I refactored api_clients to not use urllib2 for posting multipart data since I was loosing my sanity over it and requests seems to have a modern approach to doing this compared to what api_clients was previously doing.
2017-03-24 15:15:37 +01:00
Robb ff83784864 Merge pull request #56 from radiorabe/feature/version-reporting
Harmonize version reporting in ui and api
2017-03-11 19:06:28 -05:00
Lucas Bickel bd18caf69d Harmonize version reporting in ui and api
Everything should use the version from the VERSION file created by the installer like this.
2017-03-10 20:38:43 +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
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 e3b0a93ebb Only suspend over bandwidth when station is active 2015-12-09 13:03:41 -05:00
Duncan Sommerville a67ae0a5e4 Fix for Airtime bandwidth limit suspension code 2015-11-25 18:18:24 -05:00
Duncan Sommerville 0fc4f6c26f Fix Airtime bandwidth limit suspension code 2015-11-25 17:56:09 -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
drigato 04167c103b Fix parameter name in api/bandwidth-usage 2015-11-23 11:37:08 -05:00
Duncan Sommerville bac1e553d9 SAAS-1229 - add comments in Preference and set update timer 2015-11-23 10:53:25 -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 ba832ffe3a Merge branch 'saas-dev-publishing' of github.com:sourcefabric/Airtime into saas-dev-publishing 2015-11-18 12:38:22 -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 eae8c7b638 Temporary fix to make enclosure urls iTunes compatible 2015-11-17 21:06:51 -05:00
Duncan Sommerville 1571887928 Change how station logo default is returned 2015-11-17 18:58:58 -05:00
Duncan Sommerville 8a5c25291e Lower poll interval for checking import status of podcast episodes 2015-11-11 18:52:12 -05:00
Albert Santoni 0e6e82a0c6 Fixed session start issue with new API 2015-11-06 13:04:33 -05:00
Albert Santoni e8a0ace018 Fixed up syntax error introduced by last commit 2015-11-06 12:57:35 -05:00
Albert Santoni 713a158bb3 Disable layout in recalculate-schedule API - XXXX-260 2015-11-06 12:50:47 -05:00
Albert Santoni ee99a7304f XXXX-260 - Recalculate schedule API as part of bugfix
Conflicts:
	airtime_mvc/application/configs/constants.php
	airtime_mvc/application/controllers/ApiController.php
	airtime_mvc/application/models/Scheduler.php
2015-11-06 12:49:53 -05:00
Albert Santoni a4b42344dd CC-6140: Switch to Windows linebreaks for stream M3U 2015-10-21 16:25:59 -04:00
Albert Santoni 4d1d96c8f7 CC-6140: M3U streaming link 2015-10-21 16:14:06 -04:00
Albert Santoni c03e9cbe9a SAAS-1085: Optimization - Don't start sessions unless we actually need them. 2015-09-25 10:41:51 -04:00
Albert Santoni c77749a096 SAAS: Show logo is deleted on disk when a show instance is deleted
* Default to returning the station logo in response if we can't find the
  show logo on disk (but it's in our DB).
2015-09-09 18:59:00 -04:00
drigato 25ef70767b SAAS-940: Provide usability hints to user
Customized hints depending on what page the user is on and what action
they just completed.
2015-07-13 17:02:31 -04:00
Duncan Sommerville 5cc8774e56 Merge branch 'saas-dev' into soundcloud
Conflicts:
	airtime_mvc/application/configs/constants.php
2015-06-29 10:02:58 -04:00
Duncan Sommerville 5fe70754bd Replace all timestamp strings with constant 2015-06-26 14:42:52 -04:00
Duncan Sommerville 8fcaf7fc74 Merge branch 'saas-dev' into soundcloud
Conflicts:
	airtime_mvc/application/configs/constants.php
2015-06-24 16:35:06 -04:00
Duncan Sommerville 7645f67515 SAAS-877 - Update live-info-v2 api 2015-06-24 12:18:52 -04:00
Duncan Sommerville 02e0537be9 Merge branch 'saas-dev' into soundcloud 2015-06-18 13:29:59 -04:00
Albert Santoni b4c9a77e7c CC-6055: Improved escaping 2015-06-12 13:48:54 -04:00
Duncan Sommerville 459f9494c3 Merge saas-dev into soundcloud 2015-06-10 16:08:52 -04:00
Albert Santoni c18e728583 Merge branch 'saas-installer-albert' into saas-dev 2015-06-10 15:03:11 -04:00
Albert Santoni 3996e757b7 Merge branch 'saas-dev' into saas-installer-albert 2015-06-10 12:02:08 -04:00