Commit Graph

325 Commits

Author SHA1 Message Date
jo 577e581959 Explode datetime import statement 2021-08-18 17:05:29 +02:00
jo efd362eb62 Scheduler should prepare 1 day ahead, not 1 hour
The old API client v1 used to call the following action, and underlying schedule model:
d6093f7356/airtime_mvc/application/controllers/ApiController.php (L720-L730)
d6093f7356/airtime_mvc/application/models/Schedule.php (L1118-L1140)

The new API v2 prepared 1 hour of scheduled track instead
of 1 day in the old  API.
2021-08-18 16:19:58 +02:00
jo f5d1ffe27c Better failed request logging in api_client v1 2021-08-05 14:59:00 +02:00
jo d44317a28a Prevent falsy values obscur behavior in api call 2021-08-05 14:59:00 +02:00
jo a6e9f3109c Handle bad http requests in api clients
Previously unhandled, the http requests should either fail hard, or
errors should be logged with details of the failed request.
2021-08-01 14:14:36 +02:00
Kyle Robbertze 8d259aaf98 add missing fields to v2 get schedule api call
Fixes: #1258
2021-07-09 12:15:15 +02:00
Kyle Robbertze 27fb1e5076 require python-dateutil version 2.7 or higher 2021-06-22 17:14:24 +02:00
Kyle Robbertze a1bf8c8c44 allow times without microseconds 2021-06-11 09:19:09 +02:00
jo 8d9d1e43c5 Update CI to run api_clients pytest 2021-06-08 14:06:32 +02:00
jo f944eca0a7 Migrate api_clients tests to pytest 2021-06-08 00:08:32 +02:00
jo 01fbd1e8b9 Add isort pre-commit hook
Sort import statement in python files

See https://github.com/PyCQA/isort
2021-06-05 00:39:35 +02:00
jo b26de72704 Remove python encoding pragma 2021-06-05 00:39:23 +02:00
jo 571b1a25ca Rename test_* to *_test in api_clients 2021-06-04 17:06:05 +02:00
jo c27f020d73 Format code using black 2021-06-04 17:06:05 +02:00
jo ac17db97fc Fix missing encoding pragma on python files 2021-06-04 17:04:53 +02:00
Kyle Robbertze 027b3525b1 fix python 3.6 support in api_client v2
Closes: #1228
2021-06-04 10:55:54 +02:00
Kyle Robbertze e3564cc5e6 fix python format call 2021-06-02 09:02:37 +02:00
jo 391701f02f Fix unparsable python files 2021-05-27 15:23:34 +02:00
Kyle Robbertze 7db2777d63 drop f-format string for python 3.5 compatibility 2021-05-21 15:09:47 +02:00
Kyle Robbertze 2df0189a90 add API v2 2021-05-14 13:04:46 +02:00
Kyle Robbertze 6b37b3dbab fully test set protocol 2021-01-22 22:13:31 +02:00
Kyle Robbertze 7cb34df4fa Use force_ssl in python apps
Fixes: #957
2021-01-21 09:49:55 +02:00
Kyle Robbertze 9112f205e2 fix decode error 2020-05-04 22:42:42 +02:00
Kyle Robbertze e0e4d4c87f Ensure all json loads calls use strings 2020-05-04 13:25:36 +02:00
Kyle Robbertze 6ebb1fd555 more pypo fixes 2020-04-29 19:06:52 +02:00
Kyle Robbertze 5923dee839 Fix running apps 2020-04-29 19:06:52 +02:00
Kyle Robbertze e8a0783139 Fix tests 2020-04-29 19:06:52 +02:00
Kyle Robbertze ea54493c21 add chaudum fixes 2020-04-29 19:05:35 +02:00
Kyle Robbertze 8346e89e99 install successfully using py3 2020-04-29 19:05:35 +02:00
Kyle Robbertze 632ba9acfe convert print statements to py3 2020-04-29 19:05:35 +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 d20965131c Fix TLS support
Clearly, I have no python skills hence this bug :(
2017-03-20 21:31:46 +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
Albert Santoni 01ea6f27ae Merge branch 'saas-dev' into saas-installer-albert
Conflicts:
	python_apps/api_clients/api_clients/api_client.py
2015-06-02 15:40:57 -04:00
drigato 532bd1ea85 SAAS-772: Send metadata to Tunein
Made Improvement so Airtime always makes a request to TuneIn every 4
minutes so TuneIn does not turn metadata off
2015-05-25 15:37:45 -04:00
Duncan Sommerville 875a9dfd8b CC-5990, CC-5991 - Python cleanup, removed need for /usr/lib/airtime 2015-01-27 18:43:36 -05:00
Duncan Sommerville 5e22f929c7 Reverted commit mistakenly changing file modifiers to 755 2015-01-14 20:45:03 -05:00
Duncan Sommerville df2576e5a0 Updated installer to better accommodate running over existing installs 2015-01-14 16:11:49 -05:00
Duncan Sommerville f4c5cf1353 Added virtualenv back into install process 2015-01-05 16:41:03 -05:00
Duncan Sommerville 97805ad271 Removed many unnecessary files and started changing pypo to use setuptools 2014-12-17 16:22:40 -05:00
Duncan Sommerville eefe8910cf More work on monitless installer 2014-12-16 21:27:37 -05:00
Duncan Sommerville 8a2c155289 More work on monitless installer 2014-12-16 19:42:07 -05:00
Duncan Sommerville ad4b61e89f More work on monitless installer 2014-12-16 19:05:17 -05:00
Duncan Sommerville 4dfd49d12c Initial work on monitless installation 2014-12-16 12:24:41 -05:00
Albert Santoni 86dafaf61c SAAS-404: Separate the Airtime API version from the Airtime version
* Airtime PHP side can be version bumped without pypo freaking out now
2014-02-14 16:22:15 -05:00
Albert Santoni d53c81a410 Fix major pypo freeze
* Set a timeout for HTTP requests in api_client so that they don't
  hang forever if there's a network interruption.
* Prevents pypo from completely freezing up in the network gets jacked.
2014-02-04 17:09:00 -05:00
drigato 2032eefdde Update version number in airtime-constants.php
Update version number in api_client.py
Create upgrade folder
2013-12-09 15:30:30 -05:00
Daniel James 577bbf14b6 Remove swear words from source code 2013-09-23 16:16:51 +01:00
Naomi Aro 71ee72015b release version updates and changelog edits. 2013-09-01 00:56:47 -04:00
Naomi 186e438ccb adding upgrades to 2.4.1 for version. 2013-08-28 11:54:34 -04:00