Merge pull request #3845 from ByteHamster/set-file-size-after-download
Set file size after downlaod
This commit is contained in:
commit
d5c6b8a218
|
@ -6,6 +6,7 @@ import android.util.Log;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
import java.util.concurrent.ExecutionException;
|
import java.util.concurrent.ExecutionException;
|
||||||
|
|
||||||
import de.danoeh.antennapod.core.event.UnreadItemsUpdateEvent;
|
import de.danoeh.antennapod.core.event.UnreadItemsUpdateEvent;
|
||||||
|
@ -50,6 +51,7 @@ public class MediaDownloadedHandler implements Runnable {
|
||||||
boolean broadcastUnreadStateUpdate = media.getItem() != null && media.getItem().isNew();
|
boolean broadcastUnreadStateUpdate = media.getItem() != null && media.getItem().isNew();
|
||||||
media.setDownloaded(true);
|
media.setDownloaded(true);
|
||||||
media.setFile_url(request.getDestination());
|
media.setFile_url(request.getDestination());
|
||||||
|
media.setSize(new File(request.getDestination()).length());
|
||||||
media.checkEmbeddedPicture(); // enforce check
|
media.checkEmbeddedPicture(); // enforce check
|
||||||
|
|
||||||
// check if file has chapters
|
// check if file has chapters
|
||||||
|
|
Loading…
Reference in New Issue