Remove unnecessary changes

This commit is contained in:
Nicholas Wallace
2026-08-27 15:31:32 -07:00
parent 02e3f3541f
commit ba66869502
2 changed files with 2 additions and 6 deletions
@@ -5,7 +5,6 @@ import android.net.Uri
import android.os.StatFs import android.os.StatFs
import android.util.Log import android.util.Log
import androidx.documentfile.provider.DocumentFile import androidx.documentfile.provider.DocumentFile
import com.anggrayudi.storage.file.fullName
import com.audiobookshelf.app.device.DeviceManager import com.audiobookshelf.app.device.DeviceManager
import com.audiobookshelf.app.device.FolderScanner import com.audiobookshelf.app.device.FolderScanner
import com.audiobookshelf.app.models.DownloadItem import com.audiobookshelf.app.models.DownloadItem
@@ -629,11 +628,8 @@ class DownloadItemManager(
val expectedBaseName = part.filename.substringBeforeLast('.') val expectedBaseName = part.filename.substringBeforeLast('.')
return folder.listFiles().firstOrNull { document -> return folder.listFiles().firstOrNull { document ->
document.name == part.filename || document.name == part.filename ||
document.fullName == part.filename ||
(part.audioTrack != null && document.isFile && (part.audioTrack != null && document.isFile &&
(document.name ?: "").substringBeforeLast('.') == expectedBaseName) || (document.name ?: "").substringBeforeLast('.') == expectedBaseName)
(part.audioTrack != null && document.isFile &&
document.fullName.substringBeforeLast('.') == expectedBaseName)
} }
} }