•   
  • 1
  • 2
  • 3(current)
  • 4
  • 5
  • 7
  •   
[RELEASE] Export Watched Data - Backup your watched status
#31
Pardon my ignorance, but where does the file go when you export it? When you say your database folder, errr where is that in terms of c:\?
Image
Reply
#32
Should be in %appdata% \XBMC\userdata\Database
If you find any spelling mistakes you can keep them ;)
Reply
#33
Thanks!

____

Darn I guess it doesnt work with MySQL. My XML only shows this when I export


<?xml version="1.0"?>
<watched/>

Thanks again though!
Image
Reply
#34
Fox Wrote:I guess you changed the "import ElementTree as ET" line?

Weird that you get that error because it should be included in the resources folder.

I'll have a look at it for the next release.
Pretty sure his "version" doesn't work either, unless he changes the instances of the rename "ET" to ElementTree.

Code:
from elementtree import ElementTree

works fine for me (I replaced all instances of "ET" with the full name, ElementTree.) Also, the newest version of the database is MyVideos56.db, so people may want to make that change as well.


Code:
from elementtree import ElementTree as ET
Should work without any further changes, I guess. I just can't be bothered changing it back to test again since I already managed to import my watched data.

That being said, thanks a lot for this addon. Was a great help. My Movie-database was corrupted in the nightly build for some reason, so I had to rescrape everything.
Image
Reply
#35
azgul Wrote:Also, the newest version of the database is MyVideos56.db, so people may want to make that change as well.

Ya this problem with the db name change I have to look into, haven't found a way to ask xbmc for the name so it's a bit troublesome.
If you find any spelling mistakes you can keep them ;)
Reply
#36
azgul Wrote:Pretty sure his "version" doesn't work either, unless he changes the instances of the rename "ET" to ElementTree.

Code:
from elementtree import ElementTree

works fine for me (I replaced all instances of "ET" with the full name, ElementTree.) Also, the newest version of the database is MyVideos56.db, so people may want to make that change as well.


Code:
from elementtree import ElementTree as ET
Should work without any further changes, I guess. I just can't be bothered changing it back to test again since I already managed to import my watched data.

That being said, thanks a lot for this addon. Was a great help. My Movie-database was corrupted in the nightly build for some reason, so I had to rescrape everything.

Would you mind making your updated version available for download? I tried making the changes and not having any luck.

I'm trying to export watched data from both a XBMC 9.11 and 10.1 version to the latest Pre-Eden version.

Thanks.

- Mark
Reply
#37
Hi Mark.

There isn't that much to update, the most common problem seems to be the database name that will change if you install a clean new version of xbmc, so check that you are using the right one. Both for when you export and import.
I looked at a way to get this information from xbmc directly but had no luck so atm you have to change that manually. :-(
If you find any spelling mistakes you can keep them ;)
Reply
#38
Fox Wrote:Hi Mark.

There isn't that much to update, the most common problem seems to be the database name that will change if you install a clean new version of xbmc, so check that you are using the right one. Both for when you export and import.
I looked at a way to get this information from xbmc directly but had no luck so atm you have to change that manually. :-(

What I tried, was exporting from the 10.1 XBMC using the "unmodified" export - which did create the *.XML file and looked to have worked.

I then made the modifications to the script on the new XBMC box to use the new DB name and changed the ET statements to ElementTree. When I try to run the import, it doesn't work.

In my opinion, the watched list is more important than any of the other import/export that is built into XBMC. I can always re-scan everything. I only care about the watched list and have been fighting with trying to figure a way to move that data over.

I'll double check things again so see if I can find out the exact error or issue that is happening. Not that it should matter, but I'm also going to XBMC Live 9.11 and 10.1 to XBMC on Windows (pre-Eden).

Thanks.

- Mark
Reply
#39
XBMC exports and can import watched flag. Why do you need an addon for that?

http://wiki.xbmc.org/index.php?title=Adv...library.3E

<importwatchedstate>true</importwatchedstate>
Reply
#40
Olympia, thats if you use the nfo way, I myself don't like having loads of nfo files lying around thats why I use this method.

Mark if you can find the error I'll have a look at it and see what I can do to help you out.
If you find any spelling mistakes you can keep them ;)
Reply
#41
So there's the <importwatchedstate>true</importwatchedstate> flag then for importing watched state; how do you export watched state? I'd rather not do the full nfo export from XBMC, because that overwrites everything; is there a way to add just the watched status to the nfo files of all watched movies?
Kodi: Kodi 17.4, with Transparency!
50 TB Unraid Server: Docker Apps: SABnzbd, Sickrage, mariaDB
HTPC: Win10 (cause Steam), i7, GTX 1080
Watching on: Panasonic TC65-PS64 with lowend Sony 5.1 HTIB
Other devices: rMBP 15", MBA 13", nvidia shield
Reply
#42
clock2113 Wrote:So there's the <importwatchedstate>true</importwatchedstate> flag then for importing watched state; how do you export watched state? I'd rather not do the full nfo export from XBMC, because that overwrites everything; is there a way to add just the watched status to the nfo files of all watched movies?

No, but what's the problem with overwriting everything?
Reply
#43
olympia Wrote:No, but what's the problem with overwriting everything?

I have tried using the advanced settings method - and have had no luck getting that option to work.

The most I was able to see is the watched status displayed in library mode, but not in file mode. The same Movie or TV Show that displayed as watched in library mode - doesn't show the same status in file mode.

I'm basically just trying to find the best and easiest way to export the watched status from XBMC Live 9.11 and 10.1 and move to (2) Pre-Eden versions running on Windows.

- Mark
Reply
#44
olympia Wrote:XBMC exports and can import watched flag. Why do you need an addon for that?

http://wiki.xbmc.org/index.php?title=Adv...library.3E

<importwatchedstate>true</importwatchedstate>

Because that way, each user (be it at different profiles or different machines) that shares a media storage can have its own "watched" list mantained when files are moved. If you export your "watched" status each time you use xbmc (the best time would be right before going to sleep mode), whenever files are moved around, each user can get their watched status back. I think that is not possible with the export/import function of XBMC. Also, exporting everything (not just watched status) I think takes a much longer time.
- If you export to just one file, watched status cannot be got back when you move files (unless you somehow update paths in the exported file)
- If you export to different nfo files and move them to the new location, only the watched status from the user that exported it are mantained.

An even better solution would be to link the watched status not to the file itself but to the IMDB/TVDB id, so, if you get a different version for a given movie/episode (for example, better quality or in a different language), it will still be marked as watched when appropriate. I usually have, for some tvshows/movies, one version in original language and one in spanish, and sometime (whenever I can, to save space) I substitute both for a dual version. Unfortunately, then the watched status is lost (in my installation, 5 different people watches media with his/her own profile and/or machine)
Reply
#45
Lightbulb 
Ok, time for an update.

I've redone quite a lot now, biggest change is that I use the httpAPI to query the database.
What that means is that I don't have to care what database type you are using.

Tried it on the Eden beta with mysql and it seems fine also.
The downside is that it's slower then a direct access to the db, but it's not like you do this every day... but I added a progress bar for the import part so at least there is something to look at. Wink

I did a test with a file that had ~3000 watched statuses and it took about 5minutes. Later on I might have a look and see if I can speed it up but I'm not too worried about it atm.

The export is as quick as always (~1sec) since it's only one sql query, so if you like to make regular backups of your watched data thats no problem.

Here's the new version (1.2.1) --> http://dl.dropbox.com/u/3317056/script.watched.flag.zip
If you find any spelling mistakes you can keep them ;)
Reply
  •   
  • 1
  • 2
  • 3(current)
  • 4
  • 5
  • 7
  •   



Logout Mark Read Team Forum Stats Members Help
[RELEASE] Export Watched Data - Backup your watched status1
This forum uses Lukasz Tkacz MyBB addons.