Skip to content

feat(downloader): Use async execution of ffmpeg - #2099

Merged
Secozzi merged 1 commit into
mainfrom
async-ffmpeg
Jul 12, 2025
Merged

feat(downloader): Use async execution of ffmpeg#2099
Secozzi merged 1 commit into
mainfrom
async-ffmpeg

Conversation

@Secozzi

@Secozzi Secozzi commented Jul 11, 2025

Copy link
Copy Markdown
Collaborator

Closes #2086

Use async execution of ffmpeg for easier handling of cancellations. Adds back pause/resume button, but with a changed name to better reflect what it actually does.

@abdallahmehiz
abdallahmehiz requested a review from Copilot July 11, 2025 23:53

@abdallahmehiz abdallahmehiz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Play void stranger

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request refactors the anime download flow to use FFmpegKit’s async APIs with coroutines and flow for better cancellation support, updates the pause/resume button to a stop/continue label, and adds corresponding string resources.

  • Migrates synchronous FFmpeg execution to suspendable, cancellable coroutines and a retryable flow.
  • Replaces pause/resume labels with stop/continue in UI and notifications.
  • Adds “Stop” and “Continue” to string resources and updates the changelog.

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
i18n-aniyomi/src/commonMain/moko-resources/base/strings.xml Added action_stop and action_continue string resources
app/src/main/java/eu/kanade/tachiyomi/ui/download/DownloadsTab.kt Adjusted FAB visibility and swapped anime pause/resume to stop/continue
app/src/main/java/eu/kanade/tachiyomi/data/download/anime/AnimeDownloader.kt Refactored FFmpeg download logic to async coroutines/flow
app/src/main/java/eu/kanade/tachiyomi/data/download/anime/AnimeDownloadNotifier.kt Changed notification action label from pause to stop
CHANGELOG.md Documented the stop/continue button change under Unreleased
Comments suppressed due to low confidence (2)

CHANGELOG.md:16

  • [nitpick] This change introduces a new feature (stop/continue labels) rather than fixing existing behavior; consider moving it under the 'Added' section for clarity.
- Fix stop/continue anime download button ([@Secozzi](https://github.com/Secozzi)) ([#2099](https://github.com/aniyomiorg/aniyomi/pull/2099))

app/src/main/java/eu/kanade/tachiyomi/data/download/anime/AnimeDownloader.kt:559

  • continuation.resume(it) resumes the coroutine with a session object, but this function returns Unit; either resume with Unit or update the signature to return the session to match the resumed type.
            )

Comment thread app/src/main/java/eu/kanade/tachiyomi/ui/download/DownloadsTab.kt
@Secozzi
Secozzi merged commit c66590c into main Jul 12, 2025
@Secozzi
Secozzi deleted the async-ffmpeg branch July 12, 2025 00:04
weblate pushed a commit to weblate/anikku that referenced this pull request Aug 27, 2026
) (komikku-app#57)

* feat(downloader): Use async execution of ffmpeg (aniyomiorg/aniyomi#2099)

(cherry picked from commit c66590c)

* Fix ".tmp" file checking/deleting

* Remove both kinds of temp files

---------

Co-authored-by: cuong-tran <cuongtran.tm@gmail.com>
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.

Can't resume downloads

3 participants