Kodi Community Forum

Full Version: Sources lose content type
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi all,

I'm having some problems with setting the sources content types. After adding a source and answer yes to the update library question, everything gets added in nicely.

However, after a while (i was unable to determine what triggers it), the content gets set to "none" and therefore I lose many features like the media information screen and trailers.

I am using MySql backed library and all my sources are smb links. I have another kodi instance pointing to the same MySql database.

Has anybody else experienced this problem?

Thanks
What version of Kodi/XBMC are you using?
Could be a broken upgrade. Full debug log will tell.
Hi,

Instance A - The "brain" (instance where the MySql server is): NOTICE: Starting Kodi (14.2 Git:7cc53a9). Platform: Linux x86 64-bit
Instance B - The client: NOTICE: Starting Kodi (14.2 Git:7cc53a9). Platform: Linux ARM 32-bit

I *think* I kind of understand what's going on.

If I setup everything in A and don't do anything in B, all is fine.
Furthermore, if I point B to the Mysql instance in A, everything is fine as well.
However, if I setup a source pointing to the same share A is pointing to feed the library, there's where the problems start.

It seems like the settings of the *source* (even though there's no path substitution going on) are shared. In instance B I don't want anything fancy to happen with the sources: I just want them to be browsable via the Files route. As soon as I set the scraper to "none" in B (so I don't fiddle with the library), the same thing happens in A. An annoying side effect of this is that the media information screen ('i' key) stops working because Kodi doesn't have the slightest idea what the file is about, in either instance.
Note: just setting the sources in A does not make them appear in B automatically; it is only when I manually create them in B that the settings seem to connect.

Now, a no-brainer fix seem to be, in B, setting the sources with the same scrapper than A but reply now to the refresh question. As I use watchdog on A, the library will be updated when something is added or removed from the share (to which both instances point to, coincidentally - or not). However, I worry a bit that by doing this both instances will try to update the library and create some kind of duplication and/or race condition. Also, it makes it very error prone to user error because it's very easy to hit "rescan" or answer "yes" to a rescan question.

I am willing to provide the full logs, but I don't believe this is a bug but rather lack of knowledge (of myself) on how to setup this properly.

Any help is highly appreciated.

Gonçalo
just copy your sources.xml from Client A to B, or use path substitution.
(2015-05-14, 16:51)helta Wrote: [ -> ]just copy your sources.xml from Client A to B, or use path substitution.

Thanks for the reply.

Those are indeed two ways of setting B sources the same way as A's.

What about this question:

gedl Wrote:Now, a no-brainer fix seem to be, in B, setting the sources with the same scrapper than A but reply now to the refresh question. As I use watchdog on A, the library will be updated when something is added or removed from the share (to which both instances point to, coincidentally - or not). However, I worry a bit that by doing this both instances will try to update the library and create some kind of duplication and/or race condition. Also, it makes it very error prone to user error because it's very easy to hit "rescan" or answer "yes" to a rescan question.

Are my worries unfounded ?
why are you even setting content on B? you don't need to if A already has scrapped that path into the mysql database.
(2015-05-14, 16:57)helta Wrote: [ -> ]why are you even setting content on B? you don't need to if A already has scrapped that path into the mysql database.

As I said before:

gedl Wrote:I just want them to be browsable via the Files route

(this is because some content will *not* match any database, by the very nature of it, but I'd like to still be able to browse it and I would like to avoid putting them in a separate directory as I don't know beforehand which those are going to be)

... and to let Kodi know what the files are so I can use the "Media Information Screen" (particularly handy for trailers)

Thanks for your reply, very much appreciated.
Ok. Lets walk through this together:

You setup client A with a source of:
smb://192.168.2.1/Movies <-- you set content as Movies, pick your scraper, and it scrapes the movies in that folder to the mySQL database.

copy your sources.xml from client A to B.

Open up client B, now go to Videos -> Files. You should see "Movies" there.
(2015-05-14, 17:13)helta Wrote: [ -> ]Ok. Lets walk through this together:

You setup client A with a source of:
smb://192.168.2.1/Movies <-- you set content as Movies, pick your scrapper, and it scrapes the movies in that folder to the mySQL database.

copy your sources.xml from client A to B.

Open up client B, now go to Videos -> Files. You should see "Movies" there.

I do indeed. My worry (maybe unfounded) is the following:

gedl Wrote:However, I worry a bit that by doing this both instances will try to update the library and create some kind of duplication and/or race condition. Also, it makes it very error prone to user error because it's very easy to hit "rescan" or answer "yes" to a rescan question.
When do you ever see a "re-scan" question?
(2015-05-14, 17:16)helta Wrote: [ -> ]When do you ever see a "re-scan" question?

Can't really answer that question but I've got them a couple of times while fiddling Kodi. The question is more that the option is even available in the source configuration. Might be a bit of an academic concern but I'd prefer to know what the implications might be and potentially even disable the option to touch the library in any way from B (if that is even possible).

Thanks a lot.

G.
gedl Wrote:Now, a no-brainer fix seem to be, in B, setting the sources with the same scrapper than A but reply now to the refresh question. As I use watchdog on A, the library will be updated when something is added or removed from the share (to which both instances point to, coincidentally - or not). However, I worry a bit that by doing this both instances will try to update the library and create some kind of duplication and/or race condition. Also, it makes it very error prone to user error because it's very easy to hit "rescan" or answer "yes" to a rescan question.

It shouldn't cause any duplicates or issue to have both pointed to the same source and with content set. You could even tell both to update the library at the same time and MySQL should prevent any issues.

When I last set up MySQL I would add a source for a whole hard drive, and not the "movies" or "TV shows" folders directly. So I would add "video hard drive" and it wouldn't matter if it was set to none. Then when I navigated to the "movies" folder it would show that content was set, because it matched that path from the MySQL DB as a path that contains movie content.

However, in your situation you are probably adding the "movies" and "tv shows" folders directly, so "none" is being seen as a new change for those paths. Hmm, I hadn't thought about that before. I'll try updating the wiki MySQL (wiki) guide to warn people about that kind of situation. It should still work just fine, but they'll need to make sure and not use "none".
(2015-05-15, 00:52)Ned Scott Wrote: [ -> ]
gedl Wrote:Now, a no-brainer fix seem to be, in B, setting the sources with the same scrapper than A but reply now to the refresh question. As I use watchdog on A, the library will be updated when something is added or removed from the share (to which both instances point to, coincidentally - or not). However, I worry a bit that by doing this both instances will try to update the library and create some kind of duplication and/or race condition. Also, it makes it very error prone to user error because it's very easy to hit "rescan" or answer "yes" to a rescan question.

It shouldn't cause any duplicates or issue to have both pointed to the same source and with content set. You could even tell both to update the library at the same time and MySQL should prevent any issues.

When I last set up MySQL I would add a source for a whole hard drive, and not the "movies" or "TV shows" folders directly. So I would add "video hard drive" and it wouldn't matter if it was set to none. Then when I navigated to the "movies" folder it would show that content was set, because it matched that path from the MySQL DB as a path that contains movie content.

However, in your situation you are probably adding the "movies" and "tv shows" folders directly, so "none" is being seen as a new change for those paths. Hmm, I hadn't thought about that before. I'll try updating the wiki MySQL (wiki) guide to warn people about that kind of situation. It should still work just fine, but they'll need to make sure and not use "none".

Yes updating the wiki would be nice. Took me a few days to understand that changing the content of the source in B was also changing it in A: was driving me nuts.

On a similar note: is there any way to "lock" all settings? I don't mean locking the sources as the master lock allows you to; what I'm looking for is for a way of disabling settings of any kind through the interface. Very nice for kids.

G.