Balance some synchronized

master
jvoisin 6 years ago committed by GitHub
commit e3a4fe4603
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      airsonic-main/src/main/java/org/airsonic/player/domain/TransferStatus.java
  2. 6
      airsonic-main/src/main/java/org/airsonic/player/service/SettingsService.java

@ -230,7 +230,7 @@ public class TransferStatus {
* *
* @param active Whether this transfer is active. * @param active Whether this transfer is active.
*/ */
public void setActive(boolean active) { public synchronized void setActive(boolean active) {
this.active = active; this.active = active;
if (active) { if (active) {

@ -415,7 +415,7 @@ public class SettingsService {
setProperty(KEY_PLAYLIST_FOLDER, playlistFolder); setProperty(KEY_PLAYLIST_FOLDER, playlistFolder);
} }
public String getMusicFileTypes() { public synchronized String getMusicFileTypes() {
return getProperty(KEY_MUSIC_FILE_TYPES, DEFAULT_MUSIC_FILE_TYPES); return getProperty(KEY_MUSIC_FILE_TYPES, DEFAULT_MUSIC_FILE_TYPES);
} }
@ -431,7 +431,7 @@ public class SettingsService {
return cachedMusicFileTypesArray; return cachedMusicFileTypesArray;
} }
public String getVideoFileTypes() { public synchronized String getVideoFileTypes() {
return getProperty(KEY_VIDEO_FILE_TYPES, DEFAULT_VIDEO_FILE_TYPES); return getProperty(KEY_VIDEO_FILE_TYPES, DEFAULT_VIDEO_FILE_TYPES);
} }
@ -447,7 +447,7 @@ public class SettingsService {
return cachedVideoFileTypesArray; return cachedVideoFileTypesArray;
} }
public String getCoverArtFileTypes() { public synchronized String getCoverArtFileTypes() {
return getProperty(KEY_COVER_ART_FILE_TYPES, DEFAULT_COVER_ART_FILE_TYPES); return getProperty(KEY_COVER_ART_FILE_TYPES, DEFAULT_COVER_ART_FILE_TYPES);
} }

Loading…
Cancel
Save