Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion obplayer/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -753,6 +753,11 @@ def save_settings(self, settings):
def list_settings(self, hidepasswords=False):
result = {}
for name, value in self.settings_cache.items():
if not hidepasswords or not name.endswith("_password"):
if (
not hidepasswords
or not name.endswith("_password")
and not name.endswith("_access_key")
and not name.endswith("_access_key_id")
):
result[name] = value
return result
2 changes: 1 addition & 1 deletion obplayer/httpadmin/http/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

<h1><img src="/oblogo.svg" width="150" /><%= obplayer.HTTPAdmin.title %></h1>
<% if obplayer.SUPPORTED == False: %>
<div class="error">This system isn't a ML350/Raspberry Pi. This is a unsupported system, so your results may very.</div>
<div class="error">This system isn't a ML350/Raspberry Pi. This is an unsupported system, so your results may vary.</div>
<% end %>

<% if obplayer.Config.setting('http_admin_password',True) == 'admin': %>
Expand Down
6 changes: 6 additions & 0 deletions obplayer/httpadmin/httpadmin.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,12 @@ def req_save(self, request):
del request.args["http_admin_password_retype"]
self.password = request.args["http_admin_password"][0]

if "http_admin_username" in request.args:
if request.args["http_admin_username"][0] == "":
del request.args["http_admin_username"]
else:
self.username = request.args["http_admin_username"][0]

# run through each setting and make sure it's valid. if not, complain.
for key in request.args:
setting_name = key
Expand Down
17 changes: 14 additions & 3 deletions obplayer/scheduler/scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -358,15 +358,26 @@ def play_media(self, media, offset, present_time):
fadeout = False

# fade out if media is the last track or media ends at/after the show end time
if(fadeout_mode == "always" and self.end_time() and (self.playlist.is_last() or self.media_start_time + media["duration"] >= self.end_time())):
if (
fadeout_mode == "always"
and self.end_time()
and (
self.playlist.is_last()
or self.media_start_time + media["duration"] >= self.end_time()
)
):
fadeout = True

# fade out if media ends after the show end time
if(fadeout_mode == "auto" and self.end_time() and self.media_start_time + media["duration"] > self.end_time()):
if (
fadeout_mode == "auto"
and self.end_time()
and self.media_start_time + media["duration"] > self.end_time()
):
fadeout = True

# if track does not end in time, use show end_time instead of track duration
if (fadeout):
if fadeout:
self.fadeout = True
self.ctrl.add_request(
start_time=self.media_start_time,
Expand Down