Commit Graph

2422 Commits

Author SHA1 Message Date
Robbt b12d132aab removed hardcoded include of pervasives.liq 2017-04-03 19:54:18 -04:00
Lucas Bickel acdc529139 Do not bundle liquidsoap library
I think the code was bundled into legacy upstream before it was
readily available in liquidsoap proper. These snippets are now
maintained at https://github.com/savonet/liquidsoap/tree/master/scripts.

On all distros I checked these scripts are installed to /usr/bin/liquidsoap
by the corresponding package. Liquidsoap loads them from there by
default.

By not bundling this we will be ready to profit from new features and
bugfixes in liquidsoap that is expected to land on opam soon. We'll
need to figure out how to get debian and others updated when that
happens.
2017-03-28 12:26:11 +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
Lucas Bickel 5f04dbb8a8 Get base_recorder_file config from proper subsection in conf
It took me way too long to figure this one out it wasn't logging nicely. With this ecasound actually gets called again. It's still failing on my install but I'm not yet sure why exactly.
2017-03-23 13:18:52 +01:00
Hans-Joachim aa64b8eab8 get rid of SaaS definitions 2017-03-21 22:56:43 +01:00
Lucas Bickel d20965131c Fix TLS support
Clearly, I have no python skills hence this bug :(
2017-03-20 21:31:46 +01:00
Lucas Bickel 81d3c3e2b8 Merge pull request #84 from Robbt/fix/live-stream-source
[WIP] Making show and master source ports and mount points editable.
2017-03-20 02:06:58 +01:00
Lucas Bickel c6225f9db5 Reverse pypo changes
The TODO seems to have been wrong due to the fact that everything works as advertised w/0 the change.
2017-03-19 13:15:59 +01:00
Lucas Bickel 4527b63c7b General fixes for TLS
This was tested in airtime web and with integration of media-monitor and silan up and running. It might work for pypo but that needs testing.
2017-03-18 15:47:50 +01:00
Lucas Bickel ae4c9203e6 Refactor override preference
Properly defaults the preference to be true and always return a boolean value since that is what celery will be expecting.
2017-03-17 02:10:04 +01:00
Robb Ebright fefc53c000 basic podcast album override option in preferences 2017-03-16 16:48:31 -04:00
Robb Ebright 1b90dbd4ca working python liquidsoap reconfigure script, might need further refinement 2017-03-14 04:02:51 +00:00
Robb Ebright 67ffd2d34a Making show and master source ports and mount points editable. 2017-03-14 01:15:14 +00:00
Robb 479bdb1c80 Merge pull request #76 from radiorabe/feature/no-more-std_err_override-for-pypo
Problem: std_err_override is a hack for python < 2.7
2017-03-13 14:44:01 -04:00
Lucas Bickel dfe3f077fd Replace std_err_override with logging.captureWarnings(True) in pypo
The quite ugly hack with std_err_override seems to have been made for python < 2.7. Since all major distros
have al least python 2.7 installed we can stop using the std_err_override hack.

This removes it from pypo, media-monitor still uses the module and we can completely delete it when we have
remove media-monitor after having maybe backported the watched folders feature to analyzer.
2017-03-13 16:28:07 +01:00
Lucas Bickel 99a0ce37cc Fix fix_cue_in to work with liquidsoap 1.2
The previous syntax only worked with 1.1, this one should work on both.
2017-03-13 14:30:51 +01:00
Robb a583d8fa1e Merge pull request #64 from radiorabe/feature/debian-and-experimental-centos
Vagrant Debian support (and experimental CentOS)
2017-03-12 21:42:37 -04:00
Lucas Bickel ac5f608bd8 Refactor into def check_version
Make the code more readable :)
2017-03-12 14:18:06 +01:00
Lucas Bickel 80373ca7bc cue_cut workaround
This is the workaround for <https://github.com/savonet/liquidsoap/issues/390>.

I still need to do proper testing on it and maybe we should figure out the proper "formula" for getting to the 0.04 value.
2017-03-12 14:18:06 +01:00
Lucas Bickel c29285ae48 Vagrant Debian support (and experimental CentOS)
This changes the Vagrant setup to support multiple installations as multiple
boxes. In addition to Ubuntu Vagrant can now be used to install on Debian
as well as on CentOS.

I took the chance to clean up the .deb install a bit and backported analyzer
and celery to SysV proper so it runs there. Some of the distro specfics were
moved to the install script from the python setup scripts to acheive this.

For the CentOS support I added a rather involved OS prepare script. In the
long term this will be added to the preparing-the-server docs we already have.

I had to switch the default port to http-alt (8080). On CentOS 9080 is registered
for ocsp and getting it to work for apache without hacking SELinux is hard. I
think 8080 is the RFC way to go anyhow. If anyone want to override this it
should be rather easy using the --web-port arg and by hacking Vagrantfile.

The PyOpenSSL code has been refactored for all the distros that the Vagrantfile
now supports.

As far as my checks go, I tried this code with all the distros, uploaded a track
and downloaded a unicode and a ssl podcast and was able to listen to them
in each case.

In the experimental CentOS case, the UI is not up to spec since services
need to get scheduled through systemctl and the status overview (ie. on the /?config page)
do not work properly. They need to be as follows:

```
sudo systemctl start airtime-playout
sudo systemctl start airtime-liquidsoap
sudo systemctl start airtime_analyzer.service
sudo systemctl start airtime-celery.service
```
2017-03-12 13:42:22 +01:00
Lucas Bickel 0cb5e2665e Fix unicode issues in podcast downloader
The podcast downloader fails pretty badly when the podcast name contains non ascii chars. The main fail happens during logging; I have learnt way to much about pythons stupid unicode implementation.

This adds addtional debug logging and also outputs the real reason a download fails properly. The content of the tags should be written as UTF-8 or whater is input into it, this commit mainly touches (and fixes) logging.
2017-03-11 21:01:52 +01:00
Lucas Bickel 0e8d0868e8 Make pypo media downloader port aware
This is needed if the base port is not 80 like in the vagrant setup.
2017-03-10 19:10:15 +01:00
Robb d86e223c45 Merge pull request #28 from radiorabe/feature/robbt/podcast-naming
Podcast naming feature as per #26
2017-03-06 18:12:57 -05:00
Lucas Bickel 188c127057 Merge branch 'master' into feature/analyzer-on-travis
# Conflicts:
#	.travis.yml
2017-03-04 16:35:11 +01:00
Lucas Bickel 2e9fc432b1 Only override album it is empty 2017-03-04 13:38:37 +01:00
Robb Ebright 2cebb7dfa2 first part of the adding album tags to podcast downloads 2017-03-04 13:38:36 +01:00
Lucas Bickel 9b3d0c90da mostly run analyzer tests on travis
* [x] regonfigured the build matrix with more php jobs and a separate python job (we can add more python jobs later)
* [x] run tests on travis' trusty beta container (it's closer to what we need anyway)
* [x] install packages needed for analyzer tests in build env
* [x] added docs on how to run nosetests locally
* [x] don't run initctl in analyzer setup so setup can also be used on travis (and add it to the install script directly)
* [x] ignore replaygain checks on travis (it has proven quite impossible to get the needed python-gi module to work in the provided virtualenv)

I tried a lot of solutions to get the replaygain checks to run. I needed to decide that this has gone far enough, maybe someone who is more of a pythonista than me can take a crack at it and get it solved. Even without running those tests on CI/CD there are still plenty others.

This PR only has parts of what are needed for getting python tests running on travis as per #15. I only took a quick shot at anything not analyzer and figured I would not be able to "fix" them without digging a bit deeper (ie. also getting rid of std_err_override).
2017-03-03 20:38:27 +01:00
Lucas Bickel e28ad471f9 Rewrite config from /etc/airtime-saas to plain /etc/airtime
This is the results of sed -i -e 's|/etc/airtime-saas/|/etc/airtime/|' `grep -irl 'airtime-saas' airtime_mvc/ python_apps/` :P

It might need more testing, the airtime-saas part never really made sense, zf1 has environments for that, ie you would create a saas env based on production for instance.

I beleive legacy upstream was using this to share configuration between customers (ie. analyser runs only once and writes to a shared S3 bucket). I assume they mount the airtime-saas folder onto individual customers instances with a global config. Like I said, I don't feel that this makes sense since all it does is make hacking at the configs in airtime-saas a bit easier. A serious SaaS operation should be using something like puppet or ansible to achieve this.
2017-03-03 15:57:41 +01:00
Albert Santoni a26f1a70e3 Respawn liquidsoap and pypo indefinitely if they fail to launch. Throttled it though. 2015-12-04 15:56:06 -05:00
Albert Santoni 91e1252b86 SAAS-1239: Listener stats with Shoutcast not working 2015-12-04 15:05:17 -05:00
Albert Santoni 2eea558dfd SAAS-1267: AAC streams stuck at 64 kbps, even at higher bitrates 2015-12-04 10:51:07 -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 071de55329 Add some additional error handling and prevent disabled buttons from being triggered 2015-11-11 19:26:51 -05:00
Albert Santoni bb05fa996a SAAS-1132: Improve safety of XML parsing for listener stats 2015-11-09 19:32:56 -05:00
Albert Santoni c85944785b Comments 2015-10-30 18:09:56 -04:00
Albert Santoni b49bb2e262 Loosen up Mutagen vs. Silan cue out length threshold a bit 2015-10-30 17:54:24 -04:00
Albert Santoni 7be548f30e Fixed the airtime_analyzer unit tests 2015-10-30 17:15:33 -04:00
Albert Santoni fc51e63214 Fix typo in airtime_analyzer setup.py 2015-10-30 17:13:12 -04:00
Albert Santoni 76f202106b Defensive coding against Silan bugs and bump to Mutagen 1.31 2015-10-30 17:12:13 -04: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 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 0b1df6baf3 * SAAS-1084 - initial work on publishing API backend
* More work on automatic ingest
* Add automatic_ingest_timestamp column to ImportedPodcast
2015-10-20 19:03:34 -04:00
Duncan Sommerville bcbd8a8050 Fix bug in auto ingest, immediately retry on failure 2015-10-19 15:36:34 -04:00
Duncan Sommerville 43e9fb59ce SAAS-1071 - more work on celery backend for podcasts; add upgrade to make file_id field in third_party_track_references nullable 2015-09-24 15:57:38 -04:00
Duncan Sommerville ca51dcf3ae SAAS-1071 - more work on backend podcast implementation 2015-09-24 12:58:02 -04:00
Duncan Sommerville cf1de5fb66 SAAS-1071 - initial work on podcast celery backend; tweak SoundCloud service 2015-09-22 15:26:08 -04:00
Duncan Sommerville a78a0d0cc8 * Fix track number bug in analyzer
* Move library search bar out of header
2015-09-16 17:50:21 -04:00
Duncan Sommerville c8baa6e4b3 Merge branch 'saas-dev-publishing' into soundcloud
Conflicts:
	airtime_mvc/application/views/scripts/playlist/playlist.phtml
	airtime_mvc/application/views/scripts/playlist/smart-block.phtml
	airtime_mvc/public/js/airtime/library/spl.js
2015-09-15 14:03:11 -04:00
Duncan Sommerville dd09676f88 Hide celery user 2015-09-15 13:59:48 -04:00
Duncan Sommerville 63784d4e6b Fix some behaviour with playlist/smartblock fade button 2015-09-08 16:39:33 -04:00