Skip to content

feat(favourites): allow migrating all favourites to another source - #145

Open
sang765 wants to merge 2 commits into
UsagiApp:develfrom
sang765:feat/migrate-favourites-source
Open

sang765 wants to merge 2 commits into
UsagiApp:develfrom
sang765:feat/migrate-favourites-source

Conversation

@sang765

@sang765 sang765 commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds a "Migrate sources" action to the Library (favourites) menu that migrates all favourites from one source to another in bulk:

  1. Pick the source from which to migrate (only sources present in favourites are listed)
  2. Pick the target source (all known sources except LOCAL/TEST/UNKNOWN and the source itself)
  3. Confirm dialog shows the manga count, then a foreground service migrates everything in the background with a progress notification and a final summary (migrated / no match / failed)

How it works

Reuses the existing per-manga migration pipeline:

  • MigrateToSourceUseCase (new) — looks up the manga in the DB, finds the best match on the target source via SearchV2Helper (title search, relevance-sorted, alt-title fallback), then delegates to MigrateUseCase (favourites + history + tracks + scrobblers are moved)
  • MigrateSourceService (new) — CoroutineIntentService modeled after AutoFixService; processes the batch sequentially (gentle on source servers), reports progress via notification
  • UI entry point: opt_favourites_container.xml + dialog flow in FavouritesContainerFragment

Known limitations

  • Page bookmarks and downloaded chapters are not migrated — same as the existing per-manga MigrateUseCase
  • Manga that cannot be found on the target source are left untouched (counted as "no match" in the summary)
  • New strings added for English and Vietnamese; other languages left to Weblate

Test plan

  • spotlessApply passes (ran locally)
  • Build + run on device: migrate a small source, verify favourites/history/reading progress moved and unmapped manga untouched
  • Verify cancellation via the notification action stops the batch

@sang765 sang765 self-assigned this Oct 16, 2026
@sang765 sang765 added the enhancement New feature or request label Oct 16, 2026
@sang765 sang765 added this to Usagi Oct 16, 2026
@sang765 sang765 moved this to Doing in Usagi Oct 16, 2026
@sang765
sang765 marked this pull request as ready for review October 17, 2026 00:11
@sang765
sang765 requested a review from dragonx943 as a code owner October 17, 2026 00:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Status: Doing

Development

Successfully merging this pull request may close these issues.

1 participant