[RELEASE] Export Watched Data - Backup your watched status

  Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
Fox Offline
Senior Member
Posts: 129
Joined: Oct 2003
Reputation: 1
Post: #11
@master.lincoln
Now olympia already made it easy for you but the only thing you actually need to make is the addon.xml file, so if you are interested in doing it yourself then have a look at that on the wiki page.

@ubuntuf4n
The file should be in the database folder.
find quote
thica Offline
Member
Posts: 83
Joined: Jan 2011
Reputation: 1
Location: Germany
Post: #12
Hello,

you said, the script will not work properly, in case you have the same filename for different movies. How about DVD copies, where every Filename in the DB is "VIDEO_TS.IFO" or for BD, where every Filename is "index.bdmv"? Should it be better, first try to match the full path and only if that fails to match the filename only?
find quote
castortray Offline
Fan
Posts: 503
Joined: May 2009
Reputation: 0
Post: #13
It's working !!

But I use also MySQL (to share and synchronize XBMC userdata profiles between multiple machines) with configuration in advancedsettings.xml

Code:
<advancedsettings>
    <videodatabase>
        <type>mysql</type>
        <host>IP_address</host>
        <port>3306</port>
        <user>xbmc</user>
        <pass>xbmc</pass>
        <name>xbmc_video</name>
    </videodatabase>
</advancedsettings>

how to modify default.py file to export watched data.

Many thanks for any tips.
find quote
Fox Offline
Senior Member
Posts: 129
Joined: Oct 2003
Reputation: 1
Post: #14
@castortray
Can't really help you that much other then to try to point you in the right direction, I don't know how much python you know but if you know a little programming it shouldn't be that hard.
Maybe you can have a look at some other addons for xbmc that handles mysql databases and see how they do it.

But the things in the default.py file you probably are interested in are these...
Code:
#this one enables connections to sqlite
from pysqlite2 import dbapi2 as sqlite

#this is the path to the file (db-server in the mysql case)
videoDB =  xbmc.translatePath("special://profile/Database/MyVideos34.db")

#this creates the actual connection
dbCon = sqlite.connect(videoDB)

If you figure out the equivalent ones for mysql then I think you should be done.

If you find any spelling mistakes you can keep them ;)
find quote
bigbear77 Offline
Member
Posts: 69
Joined: Oct 2010
Reputation: 0
Post: #15
is this still working for you guys? i can install it but when i execute it theres just an error message Sad
find quote
Fox Offline
Senior Member
Posts: 129
Joined: Oct 2003
Reputation: 1
Post: #16
Just tried it here on a Win 7 64bit with xbmc 10.1 running, no problem to export at least.
What message do you get?

If you find any spelling mistakes you can keep them ;)
find quote
bigbear77 Offline
Member
Posts: 69
Joined: Oct 2010
Reputation: 0
Post: #17
im also on xbmc 10.1

the message is:

error script failed: script.watched.flag

which doesnt say to much Sad
find quote
Fox Offline
Senior Member
Posts: 129
Joined: Oct 2003
Reputation: 1
Post: #18
Ah ok, ya that wasn't very helpful. Confused
But I guess it has trouble getting the watched flag from the db...
Maybe you could turn on debugging and see if it give something more helpful in the log.

If you find any spelling mistakes you can keep them ;)
find quote
Shinu Online
Posting Freak
Posts: 769
Joined: Jul 2010
Reputation: 3
Location: Trinidad &amp; Tobago
Post: #19
Any word on getting this script working on recent builds? Namely the nighties?

[Image: sigpic_71695_ea6badd43f8af70382024c3e138d01b9.jpg]
[Image: watched-fanart.jpg]
[Image: widget]
find quote
Fox Offline
Senior Member
Posts: 129
Joined: Oct 2003
Reputation: 1
Post: #20
I tried to fix it for the nightly, but ran into a problem I can't figure out.
The old version (1.0.1) I can install without problem, but it gives you errors when you run it.
I rewrote it to work with the nightly (20110731), worked like a charm. But when I zip it and try to install from scratch I get the error "Addon does not have the correct structure." and it don't get installed.

Maybe someone know what the problem is.
Here is my new version (1.1.0) http://dl.dropbox.com/u/3317056/script.watched.flag.zip

If you want to try it, install the old one and replace the default.py from my zip.

If you find any spelling mistakes you can keep them ;)
find quote
Post Reply