Skip to main content
栞Docs
Contents

Sync and conflicts

How library sync keeps the website and your computers in step, what syncs and what stays local, how conflicts, removals and offline changes are handled, and how galbd sync differs.

  • Desktop appAvailable in 0.2.8
  • WebsiteAvailable
On this page
  1. How it works
  2. Turn on library sync
  3. What syncs
  4. What stays on your computer
  5. The upload button
  6. Conflicts
  7. Removals and restoring
  8. Offline and retries
  9. One library, one account
  10. galbd QQ sync
  11. Cloud providers

Library sync keeps one set of personal records per GalShelf account, shared by the website and the desktop app on each of your computers. It is live sync, not a backup: an edit or a removal in one place appears in the other after it syncs. To keep a copy of your shelf at one moment, use export and local backups; game saves are handled separately by cloud saves.

How it works#

  • Desktop appAvailable in 0.2.8
  • WebsiteAvailable
  • The account holds your records: works, your state for each work, play-session summaries and the preferences meant to follow you. Every change gets a new revision number from the GalShelf service.
  • Each change is sent with a random operation id and the revision it was based on. Sending the same change twice (after a lost answer, a retry or a reload) is recognised by its operation id and applied only once.
  • The service compares each field with the revision you based your change on. It never uses a device's clock to decide which change wins.
  • Library sync runs through your GalShelf account on galshelf.com. It doesn't use Google Drive or OneDrive.

The galbd QQ bridge has its own, older sync (see below).

Turn on library sync#

  • Website: nothing to turn on. When you're signed in, edits, additions and removals on your shelf go through sync.
  • Desktop app (new interface): Settings → 账号与同步 / Accounts & Sync → 书架同步(网页与客户端) / Library sync (web and desktop) → 开启同步 / Turn on sync. You confirm which account this library will sync with. The first sync reads what is already in the account and merges it; where both sides changed the same thing, you are asked instead of one side being overwritten.
  • 立即同步 / Sync now runs it at once. 自动同步 / Sync automatically is off by default; when it's on, the app syncs shortly after a change and checks every 10 minutes while you are signed in. With it off, changes still queue and are sent the next time you sync.
  • The panel shows the state (synced, syncing, offline, conflicts waiting, paused), the last success and how many local changes are waiting.

What syncs#

DataLibrary syncgalbd QQ sync
Works: VNDB / NextMoe ids, title, cover and similar detailsYes (details only fill in what a record lacks; they never overwrite or conflict)Matched by VNDB id
Status, score (not rated ≠ 0), finished, all endings, full CGYesYes
Story progress, tags, short reviewYesYes
NotesYesNo
Play history (date and duration of each session)YesNo
Preferences marked "follows your account"YesNo

What stays on your computer#

Never synced: install and save folders, executables, launch and locale options, process rules, local Steam data, this device's preferences (interface profile, language, background media), sign-in credentials and keys. Media files don't travel with the library; records carry cover addresses only. For galbd, long notes, Steam totals and the On hold status also stay local.

The upload button#

  • Desktop appAvailable in 0.2.8
  • WebsiteAvailable

The classic interface still has 把本机书架上传到这个账号 / Upload this computer's shelf to this account. Since library sync, the website merges an upload field by field against what the same computer uploaded last time:

  • a field you didn't change on the computer never overwrites the website;
  • a field only the computer changed is applied;
  • when both changed the same field, the website keeps its value;
  • new works are added, but works you removed on the website are not brought back.

A local library belongs to the first account it was uploaded or synced to.

Conflicts#

A conflict happens when the same field was changed in two places after the version each side started from. Other fields of the same change are still applied; only the conflicting field waits.

  • On the website a dialog shows both values of each field and you choose what to keep; until then the other value isn't overwritten.
  • In the desktop app conflicts are kept in a list and neither side is overwritten. For each one choose 全部保留本机 / Keep all from this device, 全部采用另一处 / Use all from the other side, or pick per field and 按所选保存 / Save selection.
  • Different fields changed in different places merge automatically. A change you queued earlier on the same device never conflicts with itself.

Removals and restoring#

  • Removing a work leaves a tombstone in the account for 180 days; adding the work again within that time restores it.
  • If you edit a work that was removed elsewhere, you choose: restore it with your change, or keep it removed. If you remove a work that was just edited elsewhere, you choose: remove it anyway, or keep it.
  • The desktop app never removes a work automatically because it was removed elsewhere when the work is installed on this computer or its game is running; it asks. Removing it only affects the shelf record, never game files.
  • If one sync would remove a large number of works at once (more than 25 works and more than half of the shelf), those removals are held until you confirm them (确认同步这些移除 / Sync these removals).

Offline and retries#

  • Website: every change is kept in this browser's queue until the site confirms it, so a lost connection or a reload doesn't lose it, and a retry is never applied twice.
  • Desktop app: changes are queued even while offline or signed out, and sent when you are signed in to the right account again. Errors back off and retry automatically.

One library, one account#

A local library syncs with exactly one GalShelf account: the first one it was uploaded or synced to. Signing in to another account pauses sync (已暂停:账号不一致 / Paused: different account): nothing is sent to that account and nothing from it is written into this library, and the queued changes wait for the right account. Different accounts never see each other's records.

galbd QQ sync#

  • Desktop appAvailable in 0.2.8
  • WebsiteAvailable

If you linked QQ, the desktop app also keeps your records in step with your own record in the galbd QQ plugin (see galbd / AstrBot):

  • It runs 3 seconds after you save a change and then every 60 seconds; while the bot is unreachable, changes stay local and are sent later. A local backup is made before syncing.
  • Fields are compared with the last synced version: different fields merge, the same field changed on both sides is shown for you to choose.
  • Local removals are not pushed to galbd. If a work disappears on the galbd side, you choose to recreate it there, keep it locally only, or remove it locally (its play log is kept).
  • Each verified QQ identity has its own local database.

Cloud providers#

Google Drive, OneDrive and a sync folder are used by game cloud saves, not by library sync. See Cloud storage for how to connect them.