Commit Graph

55 Commits

Author SHA1 Message Date
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
Duncan Sommerville dcb30b3aa7 Move file extension check to before database object insertion 2015-09-24 12:57:19 -04:00
Duncan Sommerville ba38618235 Merge branch 'saas' into saas-dev 2015-07-15 18:54:38 -04:00
Albert Santoni 7ecabffbe8 Avoid double dot in extension for SAAS-922 2015-07-15 13:41:03 -04:00
Albert Santoni ffb55de566 SAAS-922 take 2 2015-07-15 13:12:56 -04:00
Duncan Sommerville 27fe32a3b4 Use mime-type array when checking for acceptable extensions 2015-07-15 12:58:05 -04:00
Duncan Sommerville 92c9fd30b5 SAAS-922 - expose mime-based file extensions from /rest/media 2015-07-07 13:54:19 -04:00
Duncan Sommerville 76a7aa9a24 Fix SoundCloud and TaskManager bugs, switch tasks to use acks_late, and provide feedback from SoundCloud context menu items 2015-06-18 18:18:48 -04:00
Albert Santoni d31de0937f Refactored file storage code slightly to allow multiple download URLs 2015-03-30 11:31:07 -04:00
Albert Santoni 99d16444d2 Squash unlink warning in CcFiles.php 2015-03-25 10:51:51 -04:00
drigato 55ed21a155 SAAS-606: Enable disk quota on Airtime Pro 2015-03-11 13:50:17 -04:00
Albert Santoni 6cecb7c239 Simplified the FTP upload hook 2015-03-06 11:06:17 -05:00
Albert Santoni 8a6ee8ad14 Fixed /rest/media endpoint DELETE 2015-03-03 12:52:41 -05:00
Albert Santoni f1a311dad6 Merge branch 'saas' into saas-media-refactor
Conflicts:
	airtime_mvc/application/modules/rest/controllers/MediaController.php
2015-02-26 14:26:33 -05:00
Albert Santoni 0b1af01822 Better exception logging and small pypo exception fix 2015-02-26 13:52:51 -05:00
Albert Santoni ab6d83f49d Merge branch 'saas' into saas-media-refactor
Conflicts:
	airtime_mvc/application/Bootstrap.php
	airtime_mvc/application/modules/rest/controllers/MediaController.php
2015-02-26 13:10:13 -05:00
Albert Santoni bfd6ef72b1 Fixed download URLs for non-cloud files 2015-02-26 11:29:08 -05:00
Albert Santoni 5acad059de Insert leading slash into basedir for station URL 2015-02-25 16:09:08 -05:00
Albert Santoni 3a1141d4c8 Merge branch 'saas' into saas-media-refactor
Conflicts:
	airtime_mvc/application/cloud_storage/ProxyStorageBackend.php
	airtime_mvc/application/controllers/ApiController.php
2015-02-25 13:02:11 -05:00
Albert Santoni 0c537194ec Merge branch 'cc-5709-airtime-analyzer-refactor' into saas-media-refactor 2015-02-20 17:36:15 -05:00
Albert Santoni 909cbae5f4 Added new parameter to CcFiles::createFromLocalFile() for flexibility 2015-02-20 17:34:58 -05:00
Duncan Sommerville ce36c1be18 Removed unnecessary call to BaseCcFiles->delete 2015-02-20 16:58:09 -05:00
Albert Santoni 903de66349 Merge branch 'cc-5709-airtime-analyzer-refactor' into saas-media-refactor
Conflicts:
	airtime_mvc/application/cloud_storage/ProxyStorageBackend.php
	airtime_mvc/application/configs/conf.php
	airtime_mvc/application/controllers/ApiController.php
	airtime_mvc/application/models/StoredFile.php
	airtime_mvc/application/models/airtime/CcFiles.php
	airtime_mvc/application/modules/rest/controllers/MediaController.php
	airtime_mvc/application/services/MediaService.php
2015-02-20 16:52:00 -05:00
Albert Santoni 84f0f135ef More refactoring: Allow files to be imported from disk directly 2015-02-20 16:36:36 -05:00
Albert Santoni 2e2c3d6276 Merge of cc-5709-airtime-analyzer-saas-refactor into saas 2015-02-20 14:27:16 -05:00
Albert Santoni 2a89e4d5a0 Massive refactor of the analyzer branch and sync it back up with the
cloud storage branch (for the last time)

* Backported all the bugfixes from cc-5709-airtime-analyzer-cloud-storage
* Backported missing FileStorageBackend.php
* Fixed CC-6001: Track titles and artist names with slashes break audio preview
* Refactored all the MediaController code, pulling out the logic into MediaService
* Fixed an API key leak to guests in the Media API
* Made this branch work without cloud_storage.conf (defaults to file storage)
* Made ApiController's getMediaAction use the MediaService code
2015-02-20 14:01:06 -05:00
Albert Santoni 6d00da89db Merge branch 'cc-5709-airtime-analyzer-cloud-storage' into cc-5709-airtime-analyzer
Conflicts:
	airtime_mvc/application/models/airtime/CcFiles.php
	airtime_mvc/application/modules/rest/controllers/MediaController.php
2015-02-20 11:14:11 -05:00
Albert Santoni 0177e40083 Pull the logic for Media REST API out of the controller 2015-02-19 15:10:01 -05:00
drigato 6ccc634782 SAAS-596: Store file size and hash in database
Updated schema and added filesize and md5_hash columns.
Changed getFileSize functions to return the value stored in the
database.
Removed getFileSize from the cloud storage classes.
2015-02-17 14:51:51 -05:00
drigato 2185fc9ca4 SAAS-536: Check for future scheduled files uses cloud_file id instead of cc_files id 2015-01-13 15:49:57 -05:00
drigato c132cac43d Code cleanup 2014-11-12 14:42:34 -05:00
drigato b304e2fa34 Bug fix 2014-11-11 13:56:17 -05:00
drigato e23649173d Added comments to CcFiles and CloudFile classes. 2014-10-30 12:12:47 -04:00
drigato 9726fb80d2 Removed amazon s3 signature from pypo cache file name.
Stopped pyppo from downloading amazon s3 files if it already exists in the pypo cache dir.
2014-10-22 14:17:44 -04:00
drigato f775bedb49 Stopped returning filesize in delete functions.
Created an Amazon S3 wrapper class around Zend_Service_Amazon_S3 to add more functionality.
2014-10-21 16:05:50 -04:00
drigato 879e776c8d CC-5888: Handle file deletion if the file is stored in the cloud 2014-08-12 12:32:49 -04:00
drigato dd37ffbdd7 CC-5888: Handle file deletion if the file is stored in the cloud
Execute a python script that deletes a file from the cloud
2014-07-31 23:11:49 -04:00
drigato 8c2754972e CC-5896: Store cloud files in separate table, inherited from cc_files
Refactored storedfile->delete()
Added a deletePhysicalFile function to CcFile and CloudFile
Cleaned up schedule events that get passed to Pypo
2014-07-29 15:07:51 -04:00
drigato f6aa2e5a3b CC-5896: Store cloud files in separate table, inherited from cc_files
For cloud files, return the original filename when downloading a file instead of the cloud object name
2014-07-28 16:02:06 -04:00
drigato f1ea100411 CC-5896: Store cloud files in separate table, inherited from cc_files 2014-07-24 16:56:15 -04:00
Albert Santoni 7438ecd2b4 Use track metadata from Airtime in playout engine
* Resolves CC-5893: Metadata not updated on Airtime Pro
* Report track metadata in the schedule API, and make pypo pass that
  along to Liquidsoap via annotations.
* Move HTTP response sanitization for file metadata out of the REST module and into CcFiles
* Slightly improved the terrible exception handling in pypo
2014-07-15 16:41:55 -04:00
Naomi 02dbde82ec CC-5429 : importing file > 24 hours doesn't work 2013-10-16 17:27:40 -04:00
Martin Konecny 362eba60d5 CC-5181
Library -> Edit Metadata:Exception in zendphp.log if trying to set a really large number as track number

-fixed
2013-05-29 13:47:55 -04:00
Naomi a18fc87d97 CC-5065 : Playlist length is not built on actual cue in/out value 2013-05-08 14:19:22 -04:00
Martin Konecny 479e69de12 CC-5009:
Use Silan to silently update track length in the background

-done
2013-04-18 15:40:33 -04:00
Rudi Grinberg 1c628bd831 renamed displayable to visible 2012-11-05 10:57:18 -05:00
Rudi Grinberg aa9a6691f2 added a single test for checking if a file should be shown or not 2012-11-05 10:08:29 -05:00
Rudi Grinberg 58620203cf line wrap 2012-09-19 10:24:45 -04:00
Rudi Grinberg fb4f7c1cb5 psr 2012-09-19 10:23:54 -04:00
Rudi Grinberg a9eefe21fa cc-4304: Add call to save after each file reassignment 2012-09-18 18:20:33 -04:00