Skip to content

Commit 30c940f

Browse files
authored
Merge pull request #143 from TroyWarez/5.3-develop
5.3 develop bug fixes
2 parents 475ac48 + 7d32db5 commit 30c940f

File tree

4 files changed

+27
-5
lines changed

4 files changed

+27
-5
lines changed

obplayer/data.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -753,6 +753,11 @@ def save_settings(self, settings):
753753
def list_settings(self, hidepasswords=False):
754754
result = {}
755755
for name, value in self.settings_cache.items():
756-
if not hidepasswords or not name.endswith("_password"):
756+
if (
757+
not hidepasswords
758+
or not name.endswith("_password")
759+
and not name.endswith("_access_key")
760+
and not name.endswith("_access_key_id")
761+
):
757762
result[name] = value
758763
return result

obplayer/httpadmin/http/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

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

3535
<% if obplayer.Config.setting('http_admin_password',True) == 'admin': %>

obplayer/httpadmin/httpadmin.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,12 @@ def req_save(self, request):
337337
del request.args["http_admin_password_retype"]
338338
self.password = request.args["http_admin_password"][0]
339339

340+
if "http_admin_username" in request.args:
341+
if request.args["http_admin_username"][0] == "":
342+
del request.args["http_admin_username"]
343+
else:
344+
self.username = request.args["http_admin_username"][0]
345+
340346
# run through each setting and make sure it's valid. if not, complain.
341347
for key in request.args:
342348
setting_name = key

obplayer/scheduler/scheduler.py

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -358,15 +358,26 @@ def play_media(self, media, offset, present_time):
358358
fadeout = False
359359

360360
# fade out if media is the last track or media ends at/after the show end time
361-
if(fadeout_mode == "always" and self.end_time() and (self.playlist.is_last() or self.media_start_time + media["duration"] >= self.end_time())):
361+
if (
362+
fadeout_mode == "always"
363+
and self.end_time()
364+
and (
365+
self.playlist.is_last()
366+
or self.media_start_time + media["duration"] >= self.end_time()
367+
)
368+
):
362369
fadeout = True
363370

364371
# fade out if media ends after the show end time
365-
if(fadeout_mode == "auto" and self.end_time() and self.media_start_time + media["duration"] > self.end_time()):
372+
if (
373+
fadeout_mode == "auto"
374+
and self.end_time()
375+
and self.media_start_time + media["duration"] > self.end_time()
376+
):
366377
fadeout = True
367378

368379
# if track does not end in time, use show end_time instead of track duration
369-
if (fadeout):
380+
if fadeout:
370381
self.fadeout = True
371382
self.ctrl.add_request(
372383
start_time=self.media_start_time,

0 commit comments

Comments
 (0)