Skip to content

Commit

Permalink
Avoid exceptions parsing playlist writer configuration.
Browse files Browse the repository at this point in the history
These may have been caused by overzealous avoidance of reflection.
  • Loading branch information
brunchboy committed Oct 8, 2024
1 parent e70ceda commit 29bdef1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/beat_link_trigger/playlist_writer.clj
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@
"Retrieve the preferred minimum time, in seconds, a track must be
playing in order to get written to the playlist."
[]
(or (when-let [^String pref (min-time-pref-key (prefs/get-preferences))]
(or (when-let [pref (min-time-pref-key (prefs/get-preferences))]
(try
(Long/valueOf pref)
(catch Exception e
Expand All @@ -312,7 +312,7 @@
"Retrieve the preference setting for filtering out players that are
not On-Air."
[]
(or (when-let [^String pref (on-air-pref-key (prefs/get-preferences))]
(or (when-let [pref (on-air-pref-key (prefs/get-preferences))]
(try
(Boolean/valueOf pref)
(catch Exception e
Expand All @@ -324,7 +324,7 @@
playlist file when all players have been stopped for a threshold
interval."
[]
(or (when-let [^String pref (split-pref-key (prefs/get-preferences))]
(or (when-let [pref (split-pref-key (prefs/get-preferences))]
(try
(Boolean/valueOf pref)
(catch Exception e
Expand All @@ -336,7 +336,7 @@
before forcing the start of a new playlist when a new track starts
playing."
[]
(or (when-let [^String pref (new-playlist-threshold-pref-key (prefs/get-preferences))]
(or (when-let [pref (new-playlist-threshold-pref-key (prefs/get-preferences))]
(try
(Long/valueOf pref)
(catch Exception e
Expand Down

0 comments on commit 29bdef1

Please sign in to comment.