Эх сурвалжийг харах

Add media title to mediaStore if necessary

Signed-off-by: Abdourahamane BOINAIDI <abdourahamane.boinaidi@infomaniak.com>
Abdourahamane BOINAIDI 5 жил өмнө
parent
commit
c059aa605e

+ 1 - 1
src/main/java/com/owncloud/android/datamodel/FileDataStorageManager.java

@@ -381,7 +381,7 @@ public class FileDataStorageManager {
                     if (file.isDown()) {
                     if (file.isDown()) {
                         String path = file.getStoragePath();
                         String path = file.getStoragePath();
                         if (new File(path).delete() && MimeTypeUtil.isMedia(file.getMimeType())) {
                         if (new File(path).delete() && MimeTypeUtil.isMedia(file.getMimeType())) {
-                            triggerMediaScan(path); // notify MediaScanner about removed file
+                            triggerMediaScan(path, file); // notify MediaScanner about removed file
                         }
                         }
                     }
                     }
                 }
                 }

+ 1 - 1
src/main/java/com/owncloud/android/operations/RenameFileOperation.java

@@ -131,7 +131,7 @@ public class RenameFileOperation extends SyncOperation {
                 getStorageManager().deleteFileInMediaScan(oldPath);
                 getStorageManager().deleteFileInMediaScan(oldPath);
                 // notify to scan about new file, if it is a media file
                 // notify to scan about new file, if it is a media file
                 if (MimeTypeUtil.isMedia(file.getMimeType())) {
                 if (MimeTypeUtil.isMedia(file.getMimeType())) {
-                    FileDataStorageManager.triggerMediaScan(newPath);
+                    FileDataStorageManager.triggerMediaScan(newPath, file);
                 }
                 }
             }
             }
             // else - NOTHING: the link to the local file is kept although the local name
             // else - NOTHING: the link to the local file is kept although the local name