Sync watched by media library itself?
#1
Hi,

If I need to install multiple XBMC in my home there will be problem with watched flags. There is a complex solution involving MySQl and the same version of XBMC on all clients.

Today its possible to for example use the subtitle add-in to download subtitles directly to the fileshare/medialibrary (if the proper rights is set). Why not simple store the watched flags on the fileshare as well? This would mean that there never is any risk of losing the watching flags when re-installing a XBMC BUT yes, there will also be more readings against the server but that should not be any problem in most cases.

The update library have becomse a lot faster so hopefully it would not take that long to read the watched flags as well, besides, this could be a on/off feature.

What do you think?
Reply
#2
you could manually export your library (settings->video->export database). That will create .nfo files alongside your media file. Those nfo files will hold all the meta-data, including watch state.
Now you could manually update your library on all other devices. I think, xbmc will not load the watched flag from your nfo files by defalt, but you can enable this via advanced settings.

Perhabs those steps could be automated via a service plugin.
Reply
#3
You can use the Trakt addon
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply
#4
It would take XBMC a long time to load data like that, because it would have to look for the files each time rather than looking in the database. If you just want to sync watched status you can use the Trakt.tv or ShareThe.TV add-ons, no MySQL required.
Reply
#5
Today, I'm using Ember to manage my library. Ember creates all the meta data(nfo, fanart, posters and so on). If I choose to export database, will this mean that all my data that is already in the library are overwritten by XBMC?
Reply
#6
snowjim, when you use Ember to create NFO's, then use XBMC to read those NFO's, then use XBMC to write the data it has to NFO's .... there will be the same info in it.


If you want to sync watched status do that with either MySQL, the Trakt.tv addon or the ShareThe.tv addon as said above.
If you do not want to sync watched status you are in the wrong thread.
Reply
#7
(2013-03-25, 13:19)Kibje Wrote: snowjim, when you use Ember to create NFO's, then use XBMC to read those NFO's, then use XBMC to write the data it has to NFO's .... there will be the same info in it.

I have no clue on what you are saying, Yes I am letting Ember creates the NFO, thats how I make sure that the right video is matched against the right movie/episode. XBMC reads thes NFO per default when updating library(I hope). This should mean that XBMC have the same data at this point as stated in the NFO file, you then say "use XBMC to write the data it has to NFO's", does it mean that it will update only the watched tag in the nfo file? How do I do this without working with other meta data(posters/fanart)?

(2013-03-25, 13:19)Kibje Wrote: If you want to sync watched status do that with either MySQL, the Trakt.tv addon or the ShareThe.tv addon as said above.
If you do not want to sync watched status you are in the wrong thread.

I am the op right? Then Im in the right thread for sure. I do not see the point in syncing my private local collection online not even if it would give my the watched flag working. The MySQL solution just seem to complicated (wounder how many that really uses this). It would however be great if XBMC could solve this with the library, either by storing it in the nfo file and read it on start up or if this is to much, include a master file(maby XML) that always is in the same place of the library and that states watched and maby played time. It should not be any problem to handle couple of 1000 rows in in a XML file.

But If I get it right the only solution today is the online sync or the MySql so I believe I will have to live with the unsynced flags.
Reply
#8
I agree with snowjim, while I understand the technical limitations of xbmc, it could be possible to extract the current watched status and export to an XML or such and reimport when we re do our library, if it takes a while, so be it, I'd do it over night while I slept Big Grin

Gets ready for the "code it yourself" remarks Smile

I see someone mentioned that this info is stored in the nfo upon export but isn't imported back in when we re import from those nfos unless set in the a----s---.xml

What's the correct tag for this feature?
Reply
#9
@snowjim:
yes if you export the xbmc database all the data in the NFOs will be overwritten. But I don't see the issue since the data will be the same as the data that was there - you imported it first ! However this is only good for a one time sync to a new device.

If you would sync the watched status by writing to and reading NFO's just imagine what XBMC would have to do EVERY time you open the movies view. It would have to read and parse all your movie NFOs from a remote fileshare. This could take several seconds ! This is just not a very viable option and that is why it has not been chosen to be implemented this way.
With a MySQL database (that loads of people use, it is not THAT hard) the request is done as one single SQL query that returns the entire array of movies and status in one time, very fast.

Also you would not be syncing your collection online, just the watched statuses to a private account. But I can see why you would not want that though.

@PAtrickBateman: if you want to import watched status from NFO's (this will take a long time) then use this flag in advancedsettings.xml: importwatchedstate
Reply
#10
(2013-03-25, 17:13)Kibje Wrote: @snowjim:
If you would sync the watched status by writing to and reading NFO's just imagine what XBMC would have to do EVERY time you open the movies view. It would have to read and parse all your movie NFOs from a remote fileshare. This could take several seconds ! This is just not a very viable option and that is why it has not been chosen to be implemented this way.
With a MySQL database (that loads of people use, it is not THAT hard) the request is done as one single SQL query that returns the entire array of movies and status in one time, very fast.

Also you would not be syncing your collection online, just the watched statuses to a private account. But I can see why you would not want that though.

I was more thinking of a update of the watched in the same way that you update your library, you hit the update library when you feel like it? But as I said, a far better idé would be to store a XML file somewhere in the library that XBMC checks and sets the watched. To me this data should be saved close to the library and not in a special database.

Yes both these solutions have drawbacks but MySQL do also have drawbacks, and the stated solution feels like a more stream line solution. BUT I understand that the only solutions I can choose from today is MySQL whitch is a no go for me even if I do work with MySQL databases.


(2013-03-25, 17:13)Kibje Wrote: @PAtrickBateman: if you want to import watched status from NFO's (this will take a long time) then use this flag in advancedsettings.xml: importwatchedstate

Why is this a advancedsetting? Is it to much data to handle a watched flag or why not include it always?
Reply
#11
@snowjim

You say MySql is complicated but it really isnt. The longest part of the entire things is installing SQL. Depending on your setup, if you have Local paths setup as your sources (ie: d:\Tvshows) then moving to MySql is a bit more of work but if you are already using SMB (ie: smb://Tvshows) then it makes the transition a lot easier. As for lot of people using it, there is because lots of people have multiple XBMCs. Until UPNP can support watched tag sharing MySQL is the way if you dont want to use Trakt.tv. The advantage of using Trakt or other online sources, is that you would have an up to date watched list all the time that can be used to restore your watched status any time or anywhere with very little hassle. I use it as my backup plan in case i lose my xbmc DB before i get a chance to export it with the latest watched status. I even setup a Windows schedule task that runs a script that exports my Library every monday early morning to make sure my nfo files are all up to date. Why would MySQL be a no go for you?

Ember is a external media scraper that uses TheTVDB to scrape your TVshows and TMDB or IMDB to scrape your movies. Within XBMC there are also scraper (Set content when you add your sources) which also creates NFO files, but the difference is that the nfo's are stored within the XBMC DB. When you export your library, what xbmc is doing, is creating nfo files and all releated artwork in your show directories (unless you choose the export option of make 1 master file) Same as Ember would do. The advantage of using External scraper software like Ember, is to better have control over your nfo creation and artwork but XBMC does a very good job on its own 95% of the time. Also during the export of your library, it will export the latest watched status (these will not change if you export and then watch something new...you would have to export again..). Then if you have the <importwatchedstate>true</importwatchedstate> set in your advancesettings.xml, it will import the watched state if ever you need to import your library. Also when exporting you can tell it not to overwrite if there is already a nfo or artwork present.

The reason to not include it as a main setting is because not everyone wants to import there watched status in certain situations. This happened to me just lately that my wife has her own XBMC on her personal PC with her own watched status but she is still using the same source as the main XBMC setup of the house which is Mysql. When migrating her over to Frodo from eden, i used trakt to first sync her watched online so i can then import it back in the fresh installation. My mistake at first, was that i forgot to comment out <importwatchedstate>true</importwatchedstate> and during XBMC scan it imported the house watched status instead. Now i couldnt use trakt just yet because it would have synced the watched status and mess up what i had already synced before migration. Now imagine if this was a automatic setting, how problematic it would be when dealing with separate watched status.
Image

If my replies help you, please click on my reputation Image below :) thanks :)
Reply
#12
(2013-03-25, 19:14)saitoh183 Wrote: @snowjim

You say MySql is complicated but it really isnt. The longest part of the entire things is installing SQL. Depending on your setup, if you have Local paths setup as your sources (ie: d:\Tvshows) then moving to MySql is a bit more of work but if you are already using SMB (ie: smb://Tvshows) then it makes the transition a lot easier. As for lot of people using it, there is because lots of people have multiple XBMCs. Until UPNP can support watched tag sharing MySQL is the way if you dont want to use Trakt.tv. The advantage of using Trakt or other online sources, is that you would have an up to date watched list all the time that can be used to restore your watched status any time or anywhere with very little hassle. I use it as my backup plan in case i lose my xbmc DB before i get a chance to export it with the latest watched status. I even setup a Windows schedule task that runs a script that exports my Library every monday early morning to make sure my nfo files are all up to date. Why would MySQL be a no go for you?

Its not about install time, its about the steps that you need to take to get it working properly. For me MySQL is a full blown database, to use it for storing watched data just seems overkill. To have MySQL running as a service on my computer does not feel right and the question is how you do If you are using a NAS where no MySQL can be installed? Besides, Im reinstalling my computer a couple of times per year and MySQL will only mean yet another thing to keep track off and setup.

As I said a couple of time, a more suited solution would be a simple XML file located in the medialibrary that explains watched. The key is always to not make things more complicated then they need to be. Yes I see that there might be update problems if multiple XBMC try to update a watched at the same time but that should not be that hard to solve.

Anyway, I do understand that there will not be any changes and that MySQL will remain the "best" way to solve the synchronization problem.

(2013-03-25, 19:14)saitoh183 Wrote: Ember is a external media scraper that uses TheTVDB to scrape your TVshows and TMDB or IMDB to scrape your movies. Within XBMC there are also scraper (Set content when you add your sources) which also creates NFO files, but the difference is that the nfo's are stored within the XBMC DB. When you export your library, what xbmc is doing, is creating nfo files and all releated artwork in your show directories (unless you choose the export option of make 1 master file) Same as Ember would do. The advantage of using External scraper software like Ember, is to better have control over your nfo creation and artwork but XBMC does a very good job on its own 95% of the time. Also during the export of your library, it will export the latest watched status (these will not change if you export and then watch something new...you would have to export again..). Then if you have the <importwatchedstate>true</importwatchedstate> set in your advancesettings.xml, it will import the watched state if ever you need to import your library. Also when exporting you can tell it not to overwrite if there is already a nfo or artwork present.

Last time I asked how this workes the commuity said that if there is a nfo and media files for a movie, then XBMC will take it and ignore to do a online search? This have been the case for previous version of XBMC but Im not so sure with FRODO, I have seen that it sometimes uses other posters then I have stated in the share. I went with Ember because XBMC did not match my library correctly, besides, I want to choose my posters myself.

(2013-03-25, 19:14)saitoh183 Wrote: The reason to not include it as a main setting is because not everyone wants to import there watched status in certain situations. This happened to me just lately that my wife has her own XBMC on her personal PC with her own watched status but she is still using the same source as the main XBMC setup of the house which is Mysql. When migrating her over to Frodo from eden, i used trakt to first sync her watched online so i can then import it back in the fresh installation. My mistake at first, was that i forgot to comment out <importwatchedstate>true</importwatchedstate> and during XBMC scan it imported the house watched status instead. Now i couldnt use trakt just yet because it would have synced the watched status and mess up what i had already synced before migration. Now imagine if this was a automatic setting, how problematic it would be when dealing with separate watched status.

Okay I get the problem but a setting like this needs to be in the GUI and not in a config file. If I was running for example openelec this would not be vary fun to setup manually since I don't know anything at all about how Linux works.
Reply
#13
(2013-03-25, 20:48)snowjim Wrote:
(2013-03-25, 19:14)saitoh183 Wrote: @snowjim

You say MySql is complicated but it really isnt. The longest part of the entire things is installing SQL. Depending on your setup, if you have Local paths setup as your sources (ie: d:\Tvshows) then moving to MySql is a bit more of work but if you are already using SMB (ie: smb://Tvshows) then it makes the transition a lot easier. As for lot of people using it, there is because lots of people have multiple XBMCs. Until UPNP can support watched tag sharing MySQL is the way if you dont want to use Trakt.tv. The advantage of using Trakt or other online sources, is that you would have an up to date watched list all the time that can be used to restore your watched status any time or anywhere with very little hassle. I use it as my backup plan in case i lose my xbmc DB before i get a chance to export it with the latest watched status. I even setup a Windows schedule task that runs a script that exports my Library every monday early morning to make sure my nfo files are all up to date. Why would MySQL be a no go for you?

Its not about install time, its about the steps that you need to take to get it working properly. For me MySQL is a full blown database, to use it for storing watched data just seems overkill. To have MySQL running as a service on my computer does not feel right and the question is how you do If you are using a NAS where no MySQL can be installed? Besides, Im reinstalling my computer a couple of times per year and MySQL will only mean yet another thing to keep track off and setup.

As I said a couple of time, a more suited solution would be a simple XML file located in the medialibrary that explains watched. The key is always to not make things more complicated then they need to be. Yes I see that there might be update problems if multiple XBMC try to update a watched at the same time but that should not be that hard to solve.

Anyway, I do understand that there will not be any changes and that MySQL will remain the "best" way to solve the synchronization problem.

Your only option then if you dont want to use MySQL is to wait for Advance UPNP to support Watched status or use Trakt to keep it sync. In my case i dont use a NAS, i run a WHS2011. I understand your point of having MySQL on your main pc would be a pain. Your solution seems easy when you say it, but is a hole other challenge to code it without breaking other stuff in the process. If Advanced UPNP supported Watched status in Frodo, all our problems would be solved Smile...lets hope it makes it to v13.

(2013-03-25, 20:48)snowjim Wrote:
(2013-03-25, 19:14)saitoh183 Wrote: Ember is a external media scraper that uses TheTVDB to scrape your TVshows and TMDB or IMDB to scrape your movies. Within XBMC there are also scraper (Set content when you add your sources) which also creates NFO files, but the difference is that the nfo's are stored within the XBMC DB. When you export your library, what xbmc is doing, is creating nfo files and all releated artwork in your show directories (unless you choose the export option of make 1 master file) Same as Ember would do. The advantage of using External scraper software like Ember, is to better have control over your nfo creation and artwork but XBMC does a very good job on its own 95% of the time. Also during the export of your library, it will export the latest watched status (these will not change if you export and then watch something new...you would have to export again..). Then if you have the <importwatchedstate>true</importwatchedstate> set in your advancesettings.xml, it will import the watched state if ever you need to import your library. Also when exporting you can tell it not to overwrite if there is already a nfo or artwork present.

Last time I asked how this workes the commuity said that if there is a nfo and media files for a movie, then XBMC will take it and ignore to do a online search? This have been the case for previous version of XBMC but Im not so sure with FRODO, I have seen that it sometimes uses other posters then I have stated in the share. I went with Ember because XBMC did not match my library correctly, besides, I want to choose my posters myself.

You are right that XBMC will favor locally stored nfo and artwork before going to scrape them online. You can still manage your artwork via Ember and let it scan online to get the nfo information. It will use your posters and scan for the rest. If it uses other artwork then you can always go and change it after by getting it via Ember and then doing a refresh and just waiting for the cache to update it eventually.

(2013-03-25, 20:48)snowjim Wrote:
(2013-03-25, 19:14)saitoh183 Wrote: The reason to not include it as a main setting is because not everyone wants to import there watched status in certain situations. This happened to me just lately that my wife has her own XBMC on her personal PC with her own watched status but she is still using the same source as the main XBMC setup of the house which is Mysql. When migrating her over to Frodo from eden, i used trakt to first sync her watched online so i can then import it back in the fresh installation. My mistake at first, was that i forgot to comment out <importwatchedstate>true</importwatchedstate> and during XBMC scan it imported the house watched status instead. Now i couldnt use trakt just yet because it would have synced the watched status and mess up what i had already synced before migration. Now imagine if this was a automatic setting, how problematic it would be when dealing with separate watched status.

Okay I get the problem but a setting like this needs to be in the GUI and not in a config file. If I was running for example openelec this would not be vary fun to setup manually since I don't know anything at all about how Linux works.

Advancedsettings is there so that you can tweak the behavior of the default GUI settings of XBMC. The fact of it "needs" to be GUI can be said for tones of other options that are in the Advset.xml. If the devs did that for everyone that stated that a particular option needs to be in the GUI by default, The settings GUI would be blotted. You dont need to know Linux to modify a xml file and save it. You just need to know how to get to it.
Image

If my replies help you, please click on my reputation Image below :) thanks :)
Reply
#14
I haven't read the whole thread, but IMO if one doesn't want MySQL nor any of those tracking sites the easiest workaround would be to write an addon that basically does the same as trakt etc but only writes this either to the nfo or a custom file. Same plugin could do a import/sync periodically on another machine. So basically it would just be a copy of trakt.tv addon and have it read/write to a file instead of online stuff.
Reply
#15
Is there a timeline or approved enhancement that will allow you to start watching something in on one TV and then resume it on another TV? Instead of using mySQL? I am trying to get mySQL setup right now and it has been a bit of a headache. Just wondering if there is a time frame for this feature or not?

Thanks
Reply

Logout Mark Read Team Forum Stats Members Help
Sync watched by media library itself?2