├── .gitattributes ├── README.md └── script.service.rclone ├── addon.xml ├── main.py └── rclone-android-16-arm /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # rclone-addon 2 | Rclone addon for Kodi Matrix v19 3 | 4 | To be used with Android boxes and phones. 5 | 6 | 1. Install from zip 7 | 2. edit main.py with your remote name under kodi installation dir/addons/script.service.rclone 8 | 3. place rclone.conf in profile directory 9 | 10 | To access your files 11 | 12 | 1. Add a webdav source 13 | 2. address localhost 14 | 3. port 23457 15 | 16 | -------------------------------------------------------------------------------- /script.service.rclone/addon.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Run rclone when Kodi starts 10 | This script creates a webdav server from your remote using rclone. Add your rclone.conf file to the profile directory 11 | android 12 | GNU GENERAL PUBLIC LICENSE Version 2 13 | 14 | 15 | -------------------------------------------------------------------------------- /script.service.rclone/main.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python3.4 2 | import os, sys, xbmc, time, stat, xbmcvfs, xbmcaddon 3 | 4 | src = os.path.join(xbmcaddon.Addon().getAddonInfo('path'), 'rclone-android-16-arm') 5 | loc = xbmcvfs.translatePath("special://xbmcbin/../../../cache/lib/rclone-android-16-arm") 6 | 7 | if not xbmcvfs.exists(loc): 8 | xbmcvfs.copy(src, loc) 9 | st = os.stat(loc) 10 | os.chmod(loc, st.st_mode | stat.S_IEXEC) 11 | 12 | loc2 = xbmcvfs.translatePath("special://masterprofile/rclone.conf") 13 | pidfile = xbmcvfs.translatePath("special://temp/librclone.pid") 14 | logfile = xbmcvfs.translatePath("special://temp/librclone.log") 15 | cachepath = xbmcvfs.translatePath("special://temp") 16 | 17 | while True: 18 | os.popen(loc + " serve webdav : --addr :23457 --config " + loc2 + " --log-file=" + logfile + " --dir-cache-time 2400h --poll-interval 10m") 19 | break 20 | -------------------------------------------------------------------------------- /script.service.rclone/rclone-android-16-arm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fandangos/rclone-addon/32756dc763a7f4a39134ed4005fd1f6b87370f31/script.service.rclone/rclone-android-16-arm --------------------------------------------------------------------------------