File tree Expand file tree Collapse file tree
core/src/main/java/xyz/gianlu/librespot Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -42,4 +42,6 @@ player.mixerSearchKeywords=
4242# Use CDN to download tracks
4343player.tracks.useCdn =true
4444# Use CDN to download episodes
45- player.episodes.useCdn =false
45+ player.episodes.useCdn =false
46+ # Enable loading state (useful for slow connections)
47+ player.enableLoadingState =true
Original file line number Diff line number Diff line change @@ -63,6 +63,11 @@ public boolean useCdnForEpisodes() {
6363 return false ;
6464 }
6565
66+ @ Override
67+ public boolean enableLoadingState () {
68+ return true ;
69+ }
70+
6671 @ Override
6772 public boolean preloadEnabled () {
6873 return true ;
Original file line number Diff line number Diff line change @@ -164,6 +164,11 @@ public boolean useCdnForEpisodes() {
164164 return getBoolean ("player.episodes.useCdn" , defaults .useCdnForTracks ());
165165 }
166166
167+ @ Override
168+ public boolean enableLoadingState () {
169+ return getBoolean ("player.enableLoadingState" , defaults .enableLoadingState ());
170+ }
171+
167172 @ Override
168173 public @ Nullable String deviceName () {
169174 return properties .getProperty ("deviceName" , null );
Original file line number Diff line number Diff line change @@ -306,8 +306,10 @@ else if (context.startsWith("spotify:show:") || context.startsWith("spotify:epis
306306 @ Override
307307 public void startedLoading (@ NotNull TrackHandler handler ) {
308308 if (handler == trackHandler ) {
309- state .setStatus (Spirc .PlayStatus .kPlayStatusLoading );
310- stateUpdated ();
309+ if (conf .enableLoadingState ()) {
310+ state .setStatus (Spirc .PlayStatus .kPlayStatusLoading );
311+ stateUpdated ();
312+ }
311313 }
312314 }
313315
@@ -576,6 +578,8 @@ public interface Configuration {
576578 boolean useCdnForTracks ();
577579
578580 boolean useCdnForEpisodes ();
581+
582+ boolean enableLoadingState ();
579583 }
580584
581585 private class StateWrapper {
You can’t perform that action at this time.
0 commit comments