2009-08-19, 10:57
XBMC Syncer
http://dl.getdropbox.com/u/397935/XBMC%20Syncer.zip - Version 0.11
I have multiple XBMC installs and stream all of my videos from a NAS. I want stuff to stay in sync but want independent libraries. My first order of business was to keep watched status in sync. I wrote a script.
Requirements
Quick Instructions
I am actively developing this at the moment but wanted it out in the open for feedback. There are some functions other than simple syncing in the script but they will have to be polished and I don't have time to write a manual at the moment.
Overview:
Some of the features:
Note
The script is still in testing and under development. That being said it works fine in my environment with windows machines and mac os machines. I will test linux later.
Still, consider it beta
Changelog
0.11 - Fixed a bug where database view would not load if some computers had not performed a sync yet.
- Added handling to deal with shares having different case on local xbmc profile. Handling only can deal with ASCII cases, not unicode.
- Must delete xbmcsyncmaster.db and recreate from advanced menu (reset sync data, update with replace on one system, update without affecting on all others)
0.1 - Initial release
http://dl.getdropbox.com/u/397935/XBMC%20Syncer.zip - Version 0.11
I have multiple XBMC installs and stream all of my videos from a NAS. I want stuff to stay in sync but want independent libraries. My first order of business was to keep watched status in sync. I wrote a script.
Requirements
- Your libraries don't have to be the same, but they should point to the same files with the same path structure. All my machines have their media as: smb://user:password@server/share/etc. The sync will work with local files on different machines if their paths are the same.
- You have to set up an FTP server. The script keeps a "master database" to work across multiple computers. The script stores a file on the root level of the FTP server. If you're using multiple XBMC installs with a NAS, I assume you can set up FTP. I chose FTP because it's built in to python and so should work on all platforms.
- The web interface should be on for all the computers that you sync to. The port should be set to 80 and no password or username should be needed to access it. I can add support for different ports and user names/passwords later.
Quick Instructions
I am actively developing this at the moment but wanted it out in the open for feedback. There are some functions other than simple syncing in the script but they will have to be polished and I don't have time to write a manual at the moment.
Overview:
- Back up your video libraries (myvideos34.db in your user profile)
- Install the script on all the computers you wish to sync
- Launch the script on a machine and enter its ip address or hostname (whatever other computers can connect to) and then the ftp server settings
- Select Run Sync
- Enter an address or hostname for a computer running XBMC with the web interface running
- Run the script on the remaining machines, they will add themselves to the sync after supplying the necessary local address and ftp settings
Some of the features:
- Keeps a library on an FTP server to store sync data between computers
- Has utilities to reset the sync data if problems arise. A computer can replace the synced playcounts in the master database through a menu
- If a computer doesn't contain a file in the library the sync still works. Therefor your libraries don't have to be the same on all computers.
- Keeps track of xbmc database's playcounts correctly, and its lastplayed pretty correctly.
- You can set up "aliases" for computers if they have more than one ip address, one of my laptop's doesn't always work with the DNS in my house and so sometimes needs to be connected to with either of its two ip addresses (lan and wireless). I set up an alias and the script handles this fine
- You can set up links to video files whose playcounts you want to remain in sync. My faster machines have BluRay backups in their libraries, slower ones encoded versions. I setup a video link for each movie and the play counts remain the same between the two. So if I watch a movie's encoded version on one computer, the full rip will show up as watched on another computer
- There are some functions to look up information in the master library
- The script tries to keep writes to the XBMC database to a minimum to prevent issues.
- Failed syncs are handled gracefully. If I yank out the ethernet on a computer that I am syncing to, the sync finish early and syncs what it can.
- I found sometimes the XBMC web interface can return malformed information. The script skips the sync on a file whose information is malformed. Usually on the next sync the file will be picked up fine.
- There are functions to prevent more than one computer syncing at a time.
- Disconnection and file transfer errors are handled through the script, giving the user feedback instead of the script failing/crashing
- Has a function to see which computers that are set up to sync have xbmc running
Note
The script is still in testing and under development. That being said it works fine in my environment with windows machines and mac os machines. I will test linux later.
Still, consider it beta
Changelog
0.11 - Fixed a bug where database view would not load if some computers had not performed a sync yet.
- Added handling to deal with shares having different case on local xbmc profile. Handling only can deal with ASCII cases, not unicode.
- Must delete xbmcsyncmaster.db and recreate from advanced menu (reset sync data, update with replace on one system, update without affecting on all others)
0.1 - Initial release