Alpha -  Kodi Add-on Data Sync (for Dropbox)
#1
Kodi Add-on Setting Sync (for Dropbox)
This is a simple Kodi service add-on that sync (bi-directional) add-on settings. Currently only Dropbox is supported. It is still heavily in development.

Backups! Yes, you need them
This add-on could mess up your Kodi's add-on settings. Before you continue to use this add-on, please, please, please, backup the addon_data folders on all machines and Kodi profiles you are going to run the sync with.

Prerequisites
You will need to have the following in order to make this all work:
  1. Full backups of your addon_data folders (yes, again a reminder!)
  2. Kodi Krypton (or higher) installed on either Linux, Windows or Android.
  3. A Dropbox account with some storage available.
  4. A Dropbox Developer App API Key:
    • Currently this add-on does not (yet) provide OAuth authentication. So you will need to create your own app to make it work.
    • Head over to Dropbox.com's App Console.
    • Create a new app there with the Dropbox API.
    • Select the "App Folder" access option.
    • And give the app an appropriate name.
    • Then go into the app's settings and select "Generated access token".
    • Configure that token in the Kodi Add-on settings for the Dropbox.
  5. Think of a nice name for sync group
How it works

Sync Groups
Within the add-on settings for this add-on you specify a Sync Group. All Kodi Add-on Setting Sync (for Dropbox) add-ons with the same Sync Group configured will sync add-on settings with each other using Dropbox. You can create multiple Sync Groupsthat group different Kodi installs or even Kodi logins into different Sync Groups. However, you can only sync each instance of the add-on to a single Sync Group.

Supported add-ons only
Only the settings for add-ons that implement the option to Cloud Sync their settings will be synced. Enabling or disabling this syncing is done via that specific add-ons settings. Information for developers on how to enable your add-on can be found below.

How is stuff synced?
Depending on the situation, add-on settings will either be uploaded or downloaded. The following table describes what will happen with the add-on settings in what scenario:


What does an add-on developer need to do in order for their settings to be synced?
Syncing settings is a two step approach and includes two components:

  1. The Kodi Add-on Setting Sync (for Dropbox) service, running at the background. This add-on does the actual syncing of the add-on settings with the cloud back-end. This is done at a certain and configurable interval. It also has a simple Web API that is used to communicate with the add-ons that want to sync their settings.
  2. The communication is done using a new cloud-aware Addon class. The new class replaces the standard Kodi xbmcaddon.Addon class. The new class inherits from the xbmcaddon.Addon class and has the same method signatures, including the constructor signature. Whenever the class is instantiated, it will call the service's API and sends its settings and modified time stamp to the API. The API will return update settings if those are available. Those settings are then stored by the class as new add-on settings.
It is important to notice that it is the actual add-on that implements the new Addon class that does the storing of the new settings, not the service. An important consequence of this is that, although the service might have already retrieve updated settings, those settings will not be stored, until the first time the add-on runs, or calls the Addon.setSetting method.

As an add-on developer, implementing and enabling Cloud Sync is rather simple. There are actually three things that need to be done:
  1. Add a dependency to the addon.xml
  2. Add the Cloud Sync settings to the settings.xml
  3. Replace the xbmcaddon.Addon with the cloud-aware Addon class
Detailed information can be found in the GIT repository: https://bitbucket.org/basrieter/service.addondata.sync/
Reply
#2
Locked for changelogs
Reply
#3
Im interested. Will this sync addons?

I am currently trying to seup the MySQL method, but am having dificulty
Reply
#4
This only syncs add-on data, nothing more. So it won't sync any sources or libraries.
Reply
#5
(2017-08-12, 20:28)Basje Wrote: This only syncs add-on data, nothing more. So it won't sync any sources or libraries.

I think this is exactly what im looking for. How do I join the beta?

Edit: I see instructions, I will try it out this weekend and report back
Reply
#6
PM me your bitbucket account name and I will add you as a member. You can find the downloads there and post issues.
Reply
#7
(2017-08-16, 23:09)Basje Wrote: PM me your bitbucket account name and I will add you as a member. You can find the downloads there and post issues.

username: DragonHouseLF
Reply
#8
(2017-08-24, 08:39)room7 Wrote:
(2017-08-16, 23:09)Basje Wrote: PM me your bitbucket account name and I will add you as a member. You can find the downloads there and post issues.

username: DragonHouseLF

I added you to the bitbucket repo at: https://bitbucket.org/basrieter/kodi-set...c/overview

It has the most recent version as download (0.0.4). Please give it a spin, but make sure to read the readme.md and to create a backup!
Reply
#9
(2017-08-24, 23:17)Basje Wrote:
(2017-08-24, 08:39)room7 Wrote:
(2017-08-16, 23:09)Basje Wrote: PM me your bitbucket account name and I will add you as a member. You can find the downloads there and post issues.

username: DragonHouseLF

I added you to the bitbucket repo at: https://bitbucket.org/basrieter/kodi-set...c/overview

It has the most recent version as download (0.0.4). Please give it a spin, but make sure to read the readme.md and to create a backup!

I keep getting a error when I Force Sync

Do I use the Generated access token as the Dropbox API Key?
Reply
#10
(2017-08-25, 09:45)room7 Wrote:
(2017-08-24, 23:17)Basje Wrote:
(2017-08-24, 08:39)room7 Wrote: username: DragonHouseLF

I added you to the bitbucket repo at: https://bitbucket.org/basrieter/kodi-set...c/overview

It has the most recent version as download (0.0.4). Please give it a spin, but make sure to read the readme.md and to create a backup!

I keep getting a error when I Force Sync

Do I use the Generated access token as the Dropbox API Key?
Yes, you need that token as api key. If it still fails please:
- enable debug logging in the addon setting
- try syncing again
- then upload the log via the build in upload functionality I the addon settings
- share the generated link here.
Reply
#11
I moved the BitBucket repo here: https://bitbucket.org/basrieter/service.addondata.sync
Reply
#12
(2017-08-25, 21:01)Basje Wrote: I moved the BitBucket repo here: https://bitbucket.org/basrieter/service.addondata.sync

Here is my log:

20170829 00:21:19 - [INFO ] - service.py - 50 - Kodi Add-on Settings Sync for Dropbox :: Log file opened at C:\Users\xxxxx\AppData\Roaming\Kodi\userdata\addon_data\service.dropbox.sync\dropboxsync.log.
20170829 00:21:19 - [INFO ] - remote.py - 21 - Starting remote control on xxx.x.x.x:xxxx
20170829 00:21:20 - [INFO ] - dropbox_client.py - 43 - Created Dropbox Client for d***********@***.com and group 'D**********'
20170829 00:21:20 - [INFO ] - dropbox_client.py - 54 - Syncing Dropbox Client for d***********@***.com and group 'D**********'.
20170829 00:21:20 - [INFO ] - dropbox_client.py - 562 - Storing new file map with:
20170829 00:21:20 - [INFO ] - dropbox_client.py - 562 - | Local files : 0
20170829 00:21:20 - [INFO ] - dropbox_client.py - 562 - | Local folders : 0
20170829 00:21:20 - [INFO ] - dropbox_client.py - 562 - | Remote files : 0
20170829 00:21:20 - [INFO ] - dropbox_client.py - 562 - + Remote folders: -1
20170829 00:21:20 - [INFO ] - dropbox_client.py - 588 - File map saved to 'C:\Users\xxxxx\AppData\Roaming\Kodi\userdata\addon_data\service.dropbox.sync\filemap.json'
20170829 00:21:20 - [WARNING ] - dropbox_client.py - 68 - First time sync, keeping remote files
20170829 00:21:20 - [INFO ] - dropbox_client.py - 126 - Syncing path: C:\Users\xxxxx\AppData\Roaming\Kodi\userdata\addon_data\
20170829 00:21:20 - [DEBUG ] - dropbox_client.py - 462 - Listing remote folder: /D**********
20170829 00:21:20 - [DEBUG ] - dropbox_client.py - 147 - Skipping file syncing for root folder
20170829 00:21:20 - [INFO ] - dropbox_client.py - 388 - Downloading file /DragonHouse/addonlist.json to C:\Users\xxxxx\AppData\Roaming\Kodi\userdata\addon_data\service.dropbox.sync\addonlist.json
20170829 00:21:22 - [WARNING ] - dropbox_client.py - 94 - Missing /D**********/addonlist.json. Creating a new add-on list
20170829 00:21:22 - [INFO ] - dropbox_client.py - 103 - Found add-ons to sync:
Reply
#13
(2017-08-29, 09:44)room7 Wrote:
(2017-08-25, 21:01)Basje Wrote: I moved the BitBucket repo here: https://bitbucket.org/basrieter/service.addondata.sync

Here is my log:

20170829 00:21:19 - [INFO ] - service.py - 50 - Kodi Add-on Settings Sync for Dropbox :: Log file opened at C:\Users\xxxxx\AppData\Roaming\Kodi\userdata\addon_data\service.dropbox.sync\dropboxsync.log.
20170829 00:21:19 - [INFO ] - remote.py - 21 - Starting remote control on xxx.x.x.x:xxxx
20170829 00:21:20 - [INFO ] - dropbox_client.py - 43 - Created Dropbox Client for d***********@***.com and group 'D**********'
20170829 00:21:20 - [INFO ] - dropbox_client.py - 54 - Syncing Dropbox Client for d***********@***.com and group 'D**********'.
20170829 00:21:20 - [INFO ] - dropbox_client.py - 562 - Storing new file map with:
20170829 00:21:20 - [INFO ] - dropbox_client.py - 562 - | Local files : 0
20170829 00:21:20 - [INFO ] - dropbox_client.py - 562 - | Local folders : 0
20170829 00:21:20 - [INFO ] - dropbox_client.py - 562 - | Remote files : 0
20170829 00:21:20 - [INFO ] - dropbox_client.py - 562 - + Remote folders: -1
20170829 00:21:20 - [INFO ] - dropbox_client.py - 588 - File map saved to 'C:\Users\xxxxx\AppData\Roaming\Kodi\userdata\addon_data\service.dropbox.sync\filemap.json'
20170829 00:21:20 - [WARNING ] - dropbox_client.py - 68 - First time sync, keeping remote files
20170829 00:21:20 - [INFO ] - dropbox_client.py - 126 - Syncing path: C:\Users\xxxxx\AppData\Roaming\Kodi\userdata\addon_data\
20170829 00:21:20 - [DEBUG ] - dropbox_client.py - 462 - Listing remote folder: /D**********
20170829 00:21:20 - [DEBUG ] - dropbox_client.py - 147 - Skipping file syncing for root folder
20170829 00:21:20 - [INFO ] - dropbox_client.py - 388 - Downloading file /DragonHouse/addonlist.json to C:\Users\xxxxx\AppData\Roaming\Kodi\userdata\addon_data\service.dropbox.sync\addonlist.json
20170829 00:21:22 - [WARNING ] - dropbox_client.py - 94 - Missing /D**********/addonlist.json. Creating a new add-on list
20170829 00:21:22 - [INFO ] - dropbox_client.py - 103 - Found add-ons to sync:
Is that the full log? Seems like much is missing. Could you verify and paste the full log in pastebin.com?

You can also see if I am online on my site (https://www.rieter.net/content/
Reply
#14
Very interested in trying this my bitbucket username is slack8181

Thanks
Reply
#15
(2017-08-30, 04:50)Slack8182 Wrote: Very interested in trying this my bitbucket username is slack8181

Thanks

I added you to the repository at https://bitbucket.org/basrieter/service.addondata.sync. You can download the 0.0.7 version there or do a GIT pull to get the latest version. Make sure to follow the setup steps in the readme.md.
Reply
 
Thread Rating:
  • 0 Vote(s) - 0 Average



Logout Mark Read Team Forum Stats Members Help
Kodi Add-on Data Sync (for Dropbox)00