CC-2044: remove hardcoded settings from application/configs/conf.php
-refactored some code to begin work on this...
This commit is contained in:
parent
54f378049d
commit
161505a6df
6 changed files with 40 additions and 32 deletions
|
@ -18,7 +18,8 @@ file_dir = '/opt/pypo/files/'
|
|||
tmp_dir = '/opt/pypo/tmp/'
|
||||
|
||||
# Hostname
|
||||
base_url = 'http://localhost/'
|
||||
base_url = 'localhost'
|
||||
base_port = 80
|
||||
|
||||
############################################
|
||||
# Liquidsoap settings #
|
||||
|
@ -77,7 +78,7 @@ cue_style = 'pre'
|
|||
api_key = 'AAA'
|
||||
|
||||
# Path to the base of the API
|
||||
api_base = 'api/'
|
||||
api_base = 'api'
|
||||
|
||||
# URL to get the version number of the server API
|
||||
version_url = 'version/api_key/%%api_key%%'
|
||||
|
@ -85,7 +86,9 @@ version_url = 'version/api_key/%%api_key%%'
|
|||
# Schedule export path.
|
||||
# %%from%% - starting date/time in the form YYYY-MM-DD-hh-mm
|
||||
# %%to%% - starting date/time in the form YYYY-MM-DD-hh-mm
|
||||
export_url = 'schedule/api_key/%%api_key%%'
|
||||
export_url = 'schedule/api_key/%%api_key%%'
|
||||
|
||||
get_media_url = 'get-media/file/%%file%%/api_key/%%api_key%%'
|
||||
|
||||
# Update whether a schedule group has begun playing.
|
||||
update_item_url = 'notify-schedule-group-play/api_key/%%api_key%%/schedule_id/%%schedule_id%%'
|
||||
|
|
|
@ -208,12 +208,8 @@ class PypoFetch(Thread):
|
|||
(self.cache_dir, str(pkey), str(media['id']), str(float(media['cue_in']) / 1000), str(float(media['cue_out']) / 1000), str(fileExt))
|
||||
do_cue = True
|
||||
|
||||
# check if it is a remote file, if yes download
|
||||
if media['uri'][0:4] == 'http':
|
||||
self.handle_remote_file(media, dst, do_cue)
|
||||
else:
|
||||
logger.debug("invalid media uri: %s", media['uri'])
|
||||
|
||||
# download media file
|
||||
self.handle_remote_file(media, dst, do_cue)
|
||||
|
||||
if True == os.access(dst, os.R_OK):
|
||||
# check filesize (avoid zero-byte files)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue