Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve logging for deleteMatchingSubtitles #1259

Closed

Conversation

Luna712
Copy link
Contributor

@Luna712 Luna712 commented Aug 8, 2024

This works on debug but not prerelease so I am adding more logging to try and figure out why here

This works on debug but not prerelease so I am adding more logging to try and figure out why here
@Luna712
Copy link
Contributor Author

Luna712 commented Aug 8, 2024

Never mind, I think this has to do with scoped storage, as I managed to reproduce this in debug using default downloads path:

java.io.IOException: Unable to delete file
2024-08-08 15:17:34.158 11747-11829 System.err              com...cloudstream3.prerelease.debug  W  	at com.lagradost.safefile.SafeFile$DefaultImpls.deleteOrThrow(SafeFile.kt:147)
2024-08-08 15:17:34.158 11747-11829 System.err              com...cloudstream3.prerelease.debug  W  	at com.lagradost.safefile.UniFileWrapper.deleteOrThrow(UniFileWrapper.kt:21)
2024-08-08 15:17:34.158 11747-11829 System.err              com...cloudstream3.prerelease.debug  W  	at com.lagradost.cloudstream3.utils.SubtitleUtils.deleteMatchingSubtitles(SubtitleUtils.kt:27)
2024-08-08 15:17:34.158 11747-11829 System.err              com...cloudstream3.prerelease.debug  W  	at com.lagradost.cloudstream3.utils.VideoDownloadManager.deleteFile(VideoDownloadManager.kt:1805)
2024-08-08 15:17:34.158 11747-11829 System.err              com...cloudstream3.prerelease.debug  W  	at com.lagradost.cloudstream3.utils.VideoDownloadManager.deleteFileAndUpdateSettings(VideoDownloadManager.kt:1772)
2024-08-08 15:17:34.158 11747-11829 System.err              com...cloudstream3.prerelease.debug  W  	at com.lagradost.cloudstream3.utils.VideoDownloadManager.access$deleteFileAndUpdateSettings(VideoDownloadManager.kt:69)
2024-08-08 15:17:34.158 11747-11829 System.err              com...cloudstream3.prerelease.debug  W  	at com.lagradost.cloudstream3.utils.VideoDownloadManager$deleteFilesAndUpdateSettings$2$deleteJobs$1$1.invokeSuspend(VideoDownloadManager.kt:1750)
2024-08-08 15:17:34.158 11747-11829 System.err              com...cloudstream3.prerelease.debug  W  	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
2024-08-08 15:17:34.158 11747-11829 System.err              com...cloudstream3.prerelease.debug  W  	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
2024-08-08 15:17:34.158 11747-11829 System.err              com...cloudstream3.prerelease.debug  W  	at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:111)
2024-08-08 15:17:34.158 11747-11829 System.err              com...cloudstream3.prerelease.debug  W  	at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:99)
2024-08-08 15:17:34.158 11747-11829 System.err              com...cloudstream3.prerelease.debug  W  	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:585)
2024-08-08 15:17:34.158 11747-11829 System.err              com...cloudstream3.prerelease.debug  W  	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:802)
2024-08-08 15:17:34.158 11747-11829 System.err              com...cloudstream3.prerelease.debug  W  	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:706)
2024-08-08 15:17:34.158 11747-11829 System.err              com...cloudstream3.prerelease.debug  W  	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:693)

However, I am still leaving this open, as I still think more logging is better here, but if you don't want it, feel free to close. But really storage has so many problems it is very annoying...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants