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


- mtehonica - 2010-01-11

mtehonica Wrote:Appears to be another little bug.... If the filename contains an apostrophe then it will find the new file as watched but won't update the other machines. Log is below. I've replicated it on a couple different files. I assume the special characters just need to be escaped.

2010-01-11 10:10:01,246 INFO Run using version 0.7.4
2010-01-11 10:10:01,246 INFO Processing frontend: Office-iMac
2010-01-11 10:10:01,339 INFO 0 new files watched
2010-01-11 10:10:01,339 INFO Processing frontend: AppleTV-Bedroom
2010-01-11 10:10:01,447 INFO House.M.D.S01E03.Occam's.Razor.720p.WEB-DL.h.264-LP.mkv appears to be new
2010-01-11 10:10:01,501 INFO 1 new files watched
2010-01-11 10:10:01,501 INFO Processing frontend: Matt-MBP
2010-01-11 10:10:01,613 INFO 0 new files watched
2010-01-11 10:10:01,613 INFO Processing frontend: Mac-Mini
2010-01-11 10:10:01,713 INFO 0 new files watched
2010-01-11 10:10:01,714 INFO Total of 1 new files watched
2010-01-11 10:10:01,855 INFO Updating frontend: Office-iMac
2010-01-11 10:10:01,867 INFO Updating frontend: AppleTV-Bedroom
2010-01-11 10:10:01,921 INFO Updating frontend: Matt-MBP
2010-01-11 10:10:01,937 INFO Updating frontend: Mac-Mini
2010-01-11 10:10:01,966 INFO Marking all files as updated

Did a little more testing and appears it's the same result for an apostrophe in the folder structure too. e.g. /raid/media/TV Shows/It's Always Sunny in Philadelpia (only if using the path argument obviously but even without the path argument you still don't get correct updates when filenames have an apostrophe)


- tim- - 2010-01-12

mtehonica: I think all of your ideas are in place in version 0.8. Some notes:

- There is no need for for newdb longer.
- The log will now include a line item with which flags were used to run
- I think the issue with ' has been fixed.. let me know on that one

I think once the current users test it for a bit I'll make everything publicly available and start doing some documentation and try to make a presentable website =)


- tim- - 2010-01-12

Bueller, herg:

As soon as a little testing gets done on the current version I'll post a link to get you guys and anyone else access.

Thanks
tim-


- mtehonica - 2010-01-12

tim- Wrote:mtehonica: I think all of your ideas are in place in version 0.8. Some notes:

- There is no need for for newdb longer.
- The log will now include a line item with which flags were used to run
- I think the issue with ' has been fixed.. let me know on that one

I think once the current users test it for a bit I'll make everything publicly available and start doing some documentation and try to make a presentable website =)

Sounds good! I'll give it a shot in the morning and report how it works. Good work!


- herg - 2010-01-12

tim- Wrote:Bueller, herg:

As soon as a little testing gets done on the current version I'll post a link to get you guys and anyone else access.

Thanks
tim-

Thanks for your work on this. After I set up my second XBMC machine, the lack of "Watched" synchronization between the two was the first drawback that I noticed.


- mtehonica - 2010-01-12

tim- Wrote:Bueller, herg:

As soon as a little testing gets done on the current version I'll post a link to get you guys and anyone else access.

Thanks
tim-

0.8 is working perfectly! Great work!


- mtehonica - 2010-01-12

mtehonica Wrote:0.8 is working perfectly! Great work!

Check that....

If I run "python xbmcsync.py silent path" it is not pushing the updates out still but still finds the newly watched shows and puts them in the database.

If I run "python xbmcsync.py silent full" then it pushes everything out correctly.

If I run "python xbmcsync.py silent path full" throws the error:

Traceback (most recent call last):
File "xbmcsync.py", line 175, in <module>
strPath = strPath.replace(' ','%20')
AttributeError: 'NoneType' object has no attribute 'replace'

So it looks like the common problem is the path argument.


- tim- - 2010-01-12

can you send me a copy of your MyVideos34.db from two different machines? If you have different OS machines, one from each OS would be ideal. Thanks

tim-


- mtehonica - 2010-01-12

tim- Wrote:can you send me a copy of your MyVideos34.db from two different machines? If you have different OS machines, one from each OS would be ideal. Thanks

tim-

Here you go... one from 10.5 and one from 10.6. Renamed them to keep them separate.

http://www.mediafire.com/file/jzjxznkmjjj/MyVideos34-(10.5).db
http://www.mediafire.com/file/dmjnz4zzzyi/MyVideos34-(10.6).db

FYI: There is only 1 file out of sync right now and it is its.always.sunny.in.philadelphia.s03e06.dvdrip.xvid-orpheus.avi


- tim- - 2010-01-13

mtehonica:

I just added an 0.8.1 that adds the "debug" argument. Can you run "xbmcsync.py path debug" and send me the log? I am having the same problem on my box when running path but I am curious if there is some similarity in the file it is erroring on.

Thanks
tim-


- tim- - 2010-01-13

Okay, so I think I have this one figured out....

The problem seems to be that you (and I) mixed running without path and with path... thats a bad thing.. then some files have path info and some dont.. two ways pop into my head to fix it

1) Just ignore any file with no path info when you are running with the path argument
2) Write a flag into the config file to say "ran without path" and then if someone runs with path (or this could be the other way around) throw up a warning to ask the user not to do this and exit

Thoughts?


- mtehonica - 2010-01-13

tim- Wrote:mtehonica:

I just added an 0.8.1 that adds the "debug" argument. Can you run "xbmcsync.py path debug" and send me the log? I am having the same problem on my box when running path but I am curious if there is some similarity in the file it is erroring on.

Thanks
tim-

Here is my output from the debug... http://pastebin.com/f6a86f136 ... I didn't have any "new" files to update though, only the ones that failed to update before.


- mtehonica - 2010-01-13

tim- Wrote:Okay, so I think I have this one figured out....

The problem seems to be that you (and I) mixed running without path and with path... thats a bad thing.. then some files have path info and some dont.. two ways pop into my head to fix it

1) Just ignore any file with no path info when you are running with the path argument
2) Write a flag into the config file to say "ran without path" and then if someone runs with path (or this could be the other way around) throw up a warning to ask the user not to do this and exit

Thoughts?

Yeah, I have definitely done that Sad Is there a downfall to using path and not having an option? That would probably be a negative for people not sharing media off a single location, where paths could be different but filenames the same. I think path really should be the way it works because I'm sure almost everyone has at least 1 movie in VIDEO_TS format and then that screws up everything.

The other option would be to find out how to extract the name as used in XBMC and then it wouldn't matter what the path is.

I guess the easiest is to just put an option in the config.ini path=yes or path=no and just use that (to keep the db consistent) and not make it argument that you can pass.


- tim- - 2010-01-13

I can assure you not EVERYONE has a VIDEO_TS folder as I dont =) Its possible I am alone in that one, but I dont really see a reason to have them in folders instead of a single file container.

I think I have matching based on filename + title figured out for the most part. The logic is just a touch different since I need to determine if I am dealing with a movie or a tvshow, and then execute a query based on that for each file.

Sounds like a fun project for tomorrow some time


- mtehonica - 2010-01-13

Sounds good! Let me know when I can test! :-D