![]() |
XBMCSync - Sync Watched Flag Across Multiple Boxes - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33) +--- Forum: Supplementary Tools for Kodi (https://forum.kodi.tv/forumdisplay.php?fid=116) +--- Thread: XBMCSync - Sync Watched Flag Across Multiple Boxes (/showthread.php?tid=65824) |
- tim- - 2010-02-01 paul.hugill Wrote:I'm just installing this and it looks pretty good so far. Paul, Glad you are finding it useful. Currently the filename and scraped name have to match. Originally I just had it based on filename and that was causing some issues. It would be trivial to add that as an option again if needed. Thanks Tim - tim- - 2010-02-01 robweber Wrote:Great script - I really like being able to keep all my frontends in sync with the library as much as possible. Hmm.. that doesnt seem like it would be hard to do... i'll try to take a look at it tonight - isthisadagger - 2010-02-03 hi, just stumbled upon this script. this looks very promising! i have a few basic questions on how it all works though. my setup is 2 xbmcs running on 9.11 live and 1 nas running some mini linux. There are a lot of files on the nas but all are avi/mkv not mixed with video_ts. so i expect no problems there. how do the xbmcs sync? do they both need to be on at the same time at some point to sync or is there a way to set it up so the db to be synced is placed on the nas by xbmc1 and read by xbmc2 later from the nas? i usually have only one xbmc powered on. all media files are on the nas. same paths for both xbmcs. do i set up the cronjob on the xbmcs or on the nas? if i may i would suggest to update the first post with some sort of current version info, the link to your page and some basic info on how the syncing works. if u can get the auto resume info synced as well, yay ![]() thank you for your work so far! - RockDawg - 2010-02-03 isthisadagger Wrote:i usually have only one xbmc powered on. I faced the same dilemma. The NAS was the answer. Assuming you leave your NAS on 24/7, then install the xbmcsync script to the server. That way, it will create and update xbmcsync.db on the server. A "normal" xbmcsync scan will scan all XBMC machines and look for new (since the last time it ran) watched videos. It then puts them in it's own db and marks them as new. It will keep them marked as new until each machine entered in the config.ini file updates successfully. So let's say you just got done watching the movie 300. If you have 3 machines and one is off when the xbmcsync runs, it will update the 2 that are on, but it will know that the other machine didn't update successfully and keep 300 marked as new in it's database until such time as the other machine is able to update successfully. So eventually, the other machine will be updated automatically whenever it is on and the script runs. If you happen to be running unRAID NAS, let me know as that's what I have and I can help you get it set up if you need help. - tim- - 2010-02-04 isthisadagger Wrote:hi, Rockdawg beat me to the answer =) I am planning to do some documentation around things and get the main post updated soon. Time just hasnt been on my side lately... I personally run it on my mythtv server, but a NAS would work great as well, any box that is on all the time. As Rockdawg stated, it will eventually sync even if the machines arent all on at once. I believe all of the video_ts issues are all resolved as well now. - isthisadagger - 2010-02-04 ok tried it and it does something ![]() Code: python xbmcsync.py what i did was mark 1 episode on blackbox as watched. the script correctly identified this episode but the episode is still unwatched on whitebox. it is the same the other way around. also tried a "full" update. all watched were correctly identified but just some were updated. will the debug param offer more insight? i will try narrowing down the logic behind this on the weekend, so i can offer more info. what happens if the xbmc is still scraping for new movies/episodes? does that have any influence on the script? - tim- - 2010-02-04 isthisadagger: I think that is actually related to the & in the filename. mtehonica notes there was a problem with that as well and I just havent had the free time these last two weeks to look at it and fix it. I am hoping to have some time tonight or tomorrow. Thanks tim- - isthisadagger - 2010-02-05 great out of all the 100th of episodes i chose one with a special char. awesome me. one question still remains though. does the scraping of new content on one of the xbmcs interfere with xbmcsync? should i make sure none of the boxes is scraping when running the script? currently both xbmcs scan for new content after booting up. if the script is run via crontab it might start ar around the same time. - tim- - 2010-02-05 Yes, it could cause an issue if it is scraping or hasnt yet scraped a file that it is trying to synch. The reason for that is we synch the watched flag based on the filename and the scraped name. But if they are both booting up and scraping new files that havent been watched its no issue at all no module named pysqlie2 - 8301 - 2010-02-06 Ive have tried to get Xbmc syncer to work but failed. My setup is Htpc with win7 and filezilla server Laptop with Ubuntu 9.10 XBMC Camelot on both. First question I have is witch folder should filezilla server share to get Xbmc syncer to work properly? Right now is it pin pointed at C:\user\younerverknow\appdata\roaming\xbmc\userdata\database\ And when Iam trying to start Syncer on the Ubuntu machine I get importerror:no module named pysqlite2 In the debug file. Any thoughts or solutions - isthisadagger - 2010-02-06 tim plz correct me if i am wrong ![]() 8301: the script connects to the xbmc db, so a share is not needed for the script to run. Let me try to explain. Assuming you want to run the script from your laptop. You edit the config.ini and put in the ip adress of your win7 and 127.0.0.1 for your laptop and delete the third one. You enable the http access in both xbmcs (can be done in the xbmx dashboard). Now when you run the script it tries to connect to the xbmc dbs on both machines. If both machines are on the script will write a local db file with the "watched" flags. So if you start it in /root you will find a xbmcsync.db file in /root afterwards. The same should go for your win7 machine, except there you enter the laptops ip in the config.ini and put 127.0.01 in for the win7 machine. I have no experience with running it on win though. importerror:no module named pysqlite2 Just guessing here. The python sqlite module is missing. Use apt-get install to install it. - isthisadagger - 2010-02-06 Tim: The script runs perfectly with incremental updates. (except for the known & issue). Thank you so much! Currently i am trying to get it to run from crontab. But i seem to be missing something. With my limited (aka non existing scripting knowledge) i wrote a small script that starts up the python script. I did that because on the mini linur running on my nas i can not crontab -e but have to edit /etc/crontab and reboot for the changes to take effect (maybe there is another way that i do not know) Code: #!/bin/sh Running the script manually works just fine but from crontab no luck. Adding Code: 5 * * * * root /root/xbmcsync.py to the crontab did not work either. I guess because i need to add something like Code: #!/usr/bin/python to the .py script pointing it to the interpreter. Tried that with no success. Any ideas? How did you do it? - RockDawg - 2010-02-06 I don't know much about Linux so this may not be relevant to your situation, but this is what I had to make my crontab line look like: Code: 0 * * * * python /boot/packages/xbmcsync/xbmcsync.py Where /boot/packages/xbmcsync/ is the location of the xbmcsync script. - isthisadagger - 2010-02-06 Tried that without luck. No change. It is like the crontab entry is being ignored or something. I have an auto shutdown script in crontab which is working just fine though. - 8301 - 2010-02-07 isthisadagger Wrote:tim plz correct me if i am wrong Call me stupid or what ever but I cant find the config.ini file! Do I create one or is it somewhere in the filesys |