Merge remote-tracking branch 'origin/pr/1310'

master
Andrew DeMaria 5 years ago
commit 89ea120a2f
No known key found for this signature in database
GPG Key ID: 0A3F5E91F8364EDF
  1. 4
      airsonic-main/src/main/java/org/airsonic/player/service/MediaFileService.java

@ -153,10 +153,10 @@ public class MediaFileService {
if (useFastCache || (mediaFile.getVersion() >= MediaFileDao.VERSION if (useFastCache || (mediaFile.getVersion() >= MediaFileDao.VERSION
&& !settingsService.isIgnoreFileTimestamps() && !settingsService.isIgnoreFileTimestamps()
&& mediaFile.getChanged().getTime() >= FileUtil.lastModified(mediaFile.getFile()))) { && mediaFile.getChanged().getTime() >= FileUtil.lastModified(mediaFile.getFile()))) {
LOG.debug("Detected unmodified file"); LOG.debug("Detected unmodified file (id {}, path {})", mediaFile.getId(), mediaFile.getPath());
return mediaFile; return mediaFile;
} }
LOG.debug("Updating database file from disk"); LOG.debug("Updating database file from disk (id {}, path {})", mediaFile.getId(), mediaFile.getPath());
mediaFile = createMediaFile(mediaFile.getFile()); mediaFile = createMediaFile(mediaFile.getFile());
mediaFileDao.createOrUpdateMediaFile(mediaFile); mediaFileDao.createOrUpdateMediaFile(mediaFile);
return mediaFile; return mediaFile;

Loading…
Cancel
Save