Kodi Community Forum
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)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14


- RockDawg - 2010-01-05

I have no idea. Whatever comes with XBMC Live. How can I tell the version?


- tim- - 2010-01-05

RockDawg Wrote:OK, I tried it with sudo and here's what I get:

Code:
kevin@XBMCLive:/home$ sudo python xbmcsync.py newdb
[sudo] password for kevin:
Processing frontend: HTPC1
HTTPError = 401
Processing frontend: HTPC2
VIDEO_TS.IFO appears to be new
American History X.M2TS appears to be new
Bolt.m2ts appears to be new
Fast and Furious.M2TS appears to be new
Identity.M2TS appears to be new
The Dark Knight.m2ts appears to be new
The Shawshank Redemption.m2ts appears to be new
Traceback (most recent call last):
  File "xbmcsync.py", line 85, in <module>
    except httplib.HTTPException, e:
NameError: name 'httplib' is not defined

Okay, your first error is HTTPError = 401. That is unauthorized so I am guessing your username and password arent good. Try double checking all of the settings in the Network section on that box.

I would guess that the last part is some bad error checking on my part. can you try adding "import httplib" at the begining of the xbmcsync.py file?


- RockDawg - 2010-01-05

OK. Let me check.


- RockDawg - 2010-01-05

I double checked my network settings under XBMC and it is indeed set to 8080, xbmc, xbmc and the HTTP server is enabled. Of course 127.0.0.1 is not it's IP address, but I assume you knew that.

I added that line to the beginning of xbmcsync.py, deleted the xbmcsync.db and ran it again:

Code:
kevin@XBMCLive:/home$ sudo python xbmcsync.py newdb
Processing frontend: HTPC1
HTTPError = 401
Processing frontend: HTPC2
VIDEO_TS.IFO appears to be new
American History X.M2TS appears to be new
Bolt.m2ts appears to be new
Fast and Furious.M2TS appears to be new
Identity.M2TS appears to be new
The Dark Knight.m2ts appears to be new
The Shawshank Redemption.m2ts appears to be new
Traceback (most recent call last):
  File "xbmcsync.py", line 73, in <module>
    curs.execute("SELECT strFilename FROM SyncFiles WHERE strFilename = '" + strFilename + "'")
sqlite3.OperationalError: near "s": syntax error



- tim- - 2010-01-05

RockDawg: Try using its actually IP address. I havent played with the live version any so it may be treating things differently than a standard linux install.


- RockDawg - 2010-01-05

Well that fixed the 401 error:

Code:
kevin@XBMCLive:/home$ sudo python xbmcsync.py newdb
[sudo] password for kevin:
Processing frontend: HTPC1
VIDEO_TS.IFO appears to be new
American History X.M2TS appears to be new
Bolt.m2ts appears to be new
Fast and Furious.M2TS appears to be new
Identity.M2TS appears to be new
The Dark Knight.m2ts appears to be new
The Shawshank Redemption.m2ts appears to be new
Traceback (most recent call last):
  File "xbmcsync.py", line 73, in <module>
    curs.execute("SELECT strFilename FROM SyncFiles WHERE strFilename = '" + strFilename + "'")
sqlite3.OperationalError: near "s": syntax error



- tim- - 2010-01-05

RockDawg Wrote:Well that fixed the 401 error:

Code:
kevin@XBMCLive:/home$ sudo python xbmcsync.py newdb
[sudo] password for kevin:
Processing frontend: HTPC1
VIDEO_TS.IFO appears to be new
American History X.M2TS appears to be new
Bolt.m2ts appears to be new
Fast and Furious.M2TS appears to be new
Identity.M2TS appears to be new
The Dark Knight.m2ts appears to be new
The Shawshank Redemption.m2ts appears to be new
Traceback (most recent call last):
  File "xbmcsync.py", line 73, in <module>
    curs.execute("SELECT strFilename FROM SyncFiles WHERE strFilename = '" + strFilename + "'")
sqlite3.OperationalError: near "s": syntax error


RockDawg: thanks for helping out.. you seem to be finding all the issues so far =) I'll have to load up live on a box to do some testing at some point...

I just updated an updated version that cleaned up that SQL. Can you download the new version and try it out?


- RockDawg - 2010-01-05

No, thank YOU for YOUR help. I really appreciate it.

OK. I downloaded, installed and ran the latest version. This time it found tons of listings. All I could see is the last of some TV episodes and then an error. Like this:

Code:
Lost - s03e11 - Enter 77.iso appears to be new
Lost - s03e12 - Par Avion.iso appears to be new
Lost - s03e13 - The Man From Tallahassee.iso appears to be new
Traceback (most recent call last):
  File "xbmcsync.py", line 75, in <module>
    curs.execute('SELECT strFilename FROM SyncFiles WHERE strFilename = ?', (strFilename,))
sqlite3.ProgrammingError: You must not use 8-bit bytestrings unless you use a text_factory that can interpret 8-bit bytestrings (like text_factory = str). It is                                                
highly recommended that you instead just switch your application to Unicode strings.

I just grabbed the tail end of it. Everything above this was just more TV episodes listed.


- tim- - 2010-01-05

RockDawg Wrote:No, thank YOU for YOUR help. I really appreciate it.

OK. I downloaded, installed and ran the latest version. This time it found tons of listings. All I could see is the last of some TV episodes and then an error. Like this:

Code:
Lost - s03e11 - Enter 77.iso appears to be new
Lost - s03e12 - Par Avion.iso appears to be new
Lost - s03e13 - The Man From Tallahassee.iso appears to be new
Traceback (most recent call last):
  File "xbmcsync.py", line 75, in <module>
    curs.execute('SELECT strFilename FROM SyncFiles WHERE strFilename = ?', (strFilename,))
sqlite3.ProgrammingError: You must not use 8-bit bytestrings unless you use a text_factory that can interpret 8-bit bytestrings (like text_factory = str). It is                                                
highly recommended that you instead just switch your application to Unicode strings.

I just grabbed the tail end of it. Everything above this was just more TV episodes listed.

Anytime..

Curious, what is the name of the next episode of Lost?

I just uploaded another version that I think will fix that issue.. let me know


- RockDawg - 2010-01-05

Lost - s03e14 - Exposé


- tim- - 2010-01-05

RockDawg Wrote:Lost - s03e14 - Exposé

Ahh.. that explains it.. The fancy e at the end would have caused that error. Have you had a chance to try the updated one?


- RockDawg - 2010-01-05

OK the new version ended like this:

Code:
2794 new files watched
Processing frontend: HTPC2
0 new files watched
Total of 2794 new files watched
Updating frontend: HTPC1

I take it that is the way it should go?


- tim- - 2010-01-05

RockDawg Wrote:OK the new version ended like this:

Code:
2794 new files watched
Processing frontend: HTPC2
0 new files watched
Total of 2794 new files watched
Updating frontend: HTPC1

I take it that is the way it should go?

I am guessing that it is still running. It will take it a bit to update that many files on each frontend


- RockDawg - 2010-01-05

Yah, it does seem to be still running. I noticed though that on HTPC every movie is now showing as watched. Is that just because it isn't finished yet?


- RockDawg - 2010-01-05

It finished, but both boxes have all my movies set as watched. I think I had ~58 that were unwathced. The TV shows are fine and both boxes show the same unwatched episodes.