Created Sync (markdown)
parent
b54174b3da
commit
fd4b2e18d5
1 changed files with 98 additions and 0 deletions
98
Sync.md
Normal file
98
Sync.md
Normal file
|
@ -0,0 +1,98 @@
|
|||
An example wallet sync preference state:
|
||||
|
||||
```
|
||||
"shared": {
|
||||
"type": "object",
|
||||
"value": {
|
||||
"app_welcome_version": 1,
|
||||
"blocked": [
|
||||
"lbry://@CHAN#12345..."
|
||||
],
|
||||
"builtinCollections": {
|
||||
"favorites": {
|
||||
"id": "favorites",
|
||||
"items": [
|
||||
"lbry://claimname#123456..."
|
||||
],
|
||||
"name": "Favorites",
|
||||
"type": "playlist",
|
||||
"updatedAt": 1626974735
|
||||
},
|
||||
"watchlater": {
|
||||
"id": "watchlater",
|
||||
"items": [
|
||||
"lbry://someclaim#123455...",
|
||||
],
|
||||
"name": "Watch Later",
|
||||
"type": "playlist",
|
||||
"updatedAt": 1626974735
|
||||
}
|
||||
},
|
||||
"coin_swap_codes": [],
|
||||
"editedCollections": {},
|
||||
"following": [
|
||||
{
|
||||
"uri": "lbry://@OdyseeHelp#b58dfaeab6c70754d792cdd9b56ff59b90aea334"
|
||||
},
|
||||
{
|
||||
"uri": "lbry://@Odysee#80d2590ad04e36fb1d077a9b9e3a8bba76defdf8"
|
||||
}
|
||||
],
|
||||
"settings": {
|
||||
"automatic_dark_mode_enabled": false,
|
||||
"autoplay": false,
|
||||
"autoplay_next": false,
|
||||
"dark_mode_times": {
|
||||
"from": {
|
||||
"formattedTime": "21:00",
|
||||
"hour": "21",
|
||||
"min": "00"
|
||||
},
|
||||
"to": {
|
||||
"formattedTime": "8:00",
|
||||
"hour": "8",
|
||||
"min": "00"
|
||||
}
|
||||
},
|
||||
"floating_player": true,
|
||||
"hide_balance": false,
|
||||
"hide_reposts": false,
|
||||
"hide_scheduled_livestreams": false,
|
||||
"hide_splash_animation": false,
|
||||
"instant_purchase_enabled": false,
|
||||
"instant_purchase_max": {
|
||||
"amount": 0.1,
|
||||
"currency": "LBC"
|
||||
},
|
||||
"language": null,
|
||||
"show_mature": false,
|
||||
"theme": "dark"
|
||||
},
|
||||
"sharing_3P": true,
|
||||
"subscriptions": [
|
||||
"lbry://@lbry#3fda836a92faaceedfe398225fb9b2ee2ed1f01a",
|
||||
"lbry://@Odysee#80d2590ad04e36fb1d077a9b9e3a8bba76defdf8",
|
||||
"lbry://@OdyseeHelp#b58dfaeab6c70754d792cdd9b56ff59b90aea334",
|
||||
],
|
||||
"tags": [
|
||||
"game"
|
||||
],
|
||||
"unpublishedCollections": {}
|
||||
},
|
||||
"version": "0.1"
|
||||
},
|
||||
```
|
||||
|
||||
Above is the general state of sync at this time.
|
||||
|
||||
The subkeys under "shared" include:
|
||||
- several for collections: builtin, edited, unpublished
|
||||
- blocked
|
||||
- tags (followed)
|
||||
- subscriptions (sorta deprecated) and follows
|
||||
- settings - a subset of app settings
|
||||
- some other nearly-top level housekeeping values
|
||||
|
||||
The odysee and lbryapp generally do `lbrynet preference set "shared" { ...[everything] }`, filtering and copying their internal app state to preferences. We have also implemented a local key next to shared for people who do not want to mix up their local state with their synced, logged in, 'shared' state.
|
||||
|
||||
The sdk `sync apply` method, without any data supplied, returns the sync data and hash to be pushed to a sync server.
|
Loading…
Reference in a new issue