diff options
-rw-r--r-- | res/values-de/strings.xml | 2 | ||||
-rw-r--r-- | src/github/daneren2005/dsub/fragments/EqualizerFragment.java | 32 |
2 files changed, 26 insertions, 8 deletions
diff --git a/res/values-de/strings.xml b/res/values-de/strings.xml index b2a5ab64..ccaf936e 100644 --- a/res/values-de/strings.xml +++ b/res/values-de/strings.xml @@ -382,6 +382,8 @@ <string name="settings.drawer_items_title">Seitenmenü</string>
<string name="settings.play_now_after">Jetzt wiedergeben bis zum Listenende</string>
<string name="settings.play_now_after_summary">\"Jetzt wiedergeben\" im Kontextmenü spielt das ausgewählte Lied und alle in der Liste nachfolgenden Lieder ab (wie in der Web-Schnittstelle des Subsonic-Server)</string>
+ <string name="settings.large_album_art">Große Cover anzeigen</string>
+ <string name="settings.large_album_art_summary">Verwende große Cover zur Anzeige der Alben anstatt einer Liste</string>
<string name="shuffle.title">Mischen von</string>
<string name="shuffle.startYear">Startjahr:</string>
diff --git a/src/github/daneren2005/dsub/fragments/EqualizerFragment.java b/src/github/daneren2005/dsub/fragments/EqualizerFragment.java index 4bdb1716..de6b5e0a 100644 --- a/src/github/daneren2005/dsub/fragments/EqualizerFragment.java +++ b/src/github/daneren2005/dsub/fragments/EqualizerFragment.java @@ -146,7 +146,17 @@ public class EqualizerFragment extends SubsonicFragment { @Override
public boolean onContextItemSelected(MenuItem menuItem) {
short preset = (short) menuItem.getItemId();
- equalizer.usePreset(preset);
+ for(int i = 0; i < 10; i++) {
+ try {
+ equalizer.usePreset(preset);
+ i = 10;
+ } catch (UnsupportedOperationException e) {
+ equalizerController.release();
+ equalizer = equalizerController.getEqualizer();
+ bass = equalizerController.getBassBoost();
+ loudnessEnhancer = equalizerController.getLoudnessEnhancerController();
+ }
+ }
updateBars(false);
return true;
}
@@ -156,8 +166,18 @@ public class EqualizerFragment extends SubsonicFragment { SharedPreferences.Editor editor = prefs.edit();
editor.putBoolean(Constants.PREFERENCES_EQUALIZER_ON, enabled);
editor.commit();
- equalizer.setEnabled(enabled);
- updateBars(true);
+ for(int i = 0; i < 10; i++) {
+ try {
+ equalizer.setEnabled(enabled);
+ updateBars(true);
+ i = 10;
+ } catch (UnsupportedOperationException e) {
+ equalizerController.release();
+ equalizer = equalizerController.getEqualizer();
+ bass = equalizerController.getBassBoost();
+ loudnessEnhancer = equalizerController.getLoudnessEnhancerController();
+ }
+ }
}
private void updateBars(boolean changedEnabled) {
@@ -186,11 +206,7 @@ public class EqualizerFragment extends SubsonicFragment { } else if(setLevel > maxEQLevel) {
setLevel = maxEQLevel;
}
- try {
- equalizer.setBandLevel(band, setLevel);
- } catch(Exception e) {
- Log.w(TAG, "Failed to set band level");
- }
+ equalizer.setBandLevel(band, setLevel);
} else if(!isEnabled) {
bar.setProgress(-minEQLevel);
}
|