Kodi Community Forum

Full Version: Kodi 20, using MySQL (MariaDb)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
So, I decided to "network" my Kodi systems (two, front room and bedroom), so I can achieve "Sling" feature of "stop in one room, pickup in another". I'm using MariaDB on a Linux server running MariaDB in a Docker container. And it works grand.

HOWEVER, since then, I can no longer use the "update info" features. This is CRITICAL to me, as I use one machine to add videos/update MariaDB. I'm now missing episodes from items that I've updated (new seasons). Other than using the "master" update feature, is there any workaround, or am I (basically) hosed, due to Kodi's limitations? Before, I could update the "local"DB, using Kodi's "I" menu and then get Info again.  (I'm a keyboard man, not a mouser). It would ask if I wanted to use the current info, or download new (from the internet). Now, the options are simply missing. Am I missing something?
I use a MySQL setup too but don't have any problems with not being able to update/refresh media items though.  Can you be more specific about exactly what you're missing?  Are you talking about scanning new movies/shows into the library or just refreshing the metadata for existing items?  What are you missing?  Can you provide some screenshots showing the problem?
First, thanks for your response. The problem is in refreshing metadata for an existing item. There USED to be a button on either the specific item, or (in TV shows), the episode, where you could get Info. It asks "Local info found, refresh from Internet?". That button is now missing from ALL items, since I went to the MariaDB setup. I use tinyMediaManager to "pre-scrape" new items, as Kodi tends to fumble on them quite a bit. When I use tMM first, Kodi then gets a clue when updating the entire library and 99% of the new items scan in with no issues.

There is ALWAYS a hiccup somewhere and updating the info in Kodi was the final 1% for adding new items. Now, it looks like I have to update the ENTIRE library, just to update a single movie or TV show. I have WAAAY too many videos to refresh EVERY time I need to update a single piece of information.

Image
Hm, ok I see what you mean now.  I use the same skin as you too so it's no a problem with that.  Only a few things I can think to check at this late hour:

- Is Aeon Nox Silvo on the latest version?
- Have you tried resetting your skin settings (rename \userdata\addon_data\skin.aeon.nox.silvo\settings.xml to something else while Kodi is not running)?  If it doesn't help you can just rename it back.
- Permissions ok on your MySQL db?  Try using HeidiSQL or similar to connect to the db, using the same creds as specified in your advancedsettings.xml and make sure you can change data in files table.
- Failing that, I would completely uninstall the Aeon Nox skin, make sure all addondata for it is gone and reinstall (preferably from master on Github if you're on a recent enough version of Kodi)
The missing Refresh button means that the Source settings have been reset to None.
On your Source, call up the Context Menu and select Set Content.

Though I am not a MySQL user, so no idea if it should be set to none or movies/tv shows.
Great idea! That would make sense BUT:

    a) it happens on both machines, one Mac and one Windows
    b) the Mac install was a completely fresh install, from the OS up

It's a common thread betwixt all versions of Kodi 20. And yes, both versions are the same revision on each machine. Just for kicks, I installed Kodi on a "service" computer running Windows, with the same resultant.

Cheers!
Thanks for the feedback! However, the source is already set. If it weren't I wouldn't have the items in my Movies or TV Shows, yes? I've been using Kodi since it was XBMC, so I'm really familiar with how it handles things. Everything is setup fine, the option is simply not displayed by Kodi when I use the MariaDB setup, on both Mac and Windows versions.


Cheers!
(2023-10-23, 06:28)ac0mputerguru Wrote: [ -> ]If it weren't I wouldn't have the items in my Movies or TV Shows, yes?
You could. Add the movies to your library, then change the content back to "None", but answer NO when asked if you want to clean the library.
Your library remains, but you can't add new items, or refresh existing.
Not sure why anybody would want that. Maybe an oversight when the feature was first added? But I suppose it can be used to prevent accidental or intentional changes to your data. Won't stop deletions though.
Ok, it's possible, but not probable, in this case. I could also unplug my computers several times while Kodi is updating the library and corrupt the .xml files, but that isn't what's happened.

Like I said before, I've been using Kodi for almost 20 years now. So, I haven't done anything "stupid" with BOTH of the Kodi installs. This occurs on both my Windows Kodi and my Mac Kodi, with the Mac Kodi being a COMPLETELY clean install, from wiping the drive, installing a clean version of MacOS, and straight into the standard install of Kodi. Besides, that wouldn't make the update info button go AWOL.

Thanks for trying.
I think Karellen is right, I knew this felt familiar somehow.  I've been using a MySQL setup for many years and I do recall on more than one occasion, my sources would revert to 'None', I never did figure out why.  I believe that although your source paths are all in sources.xml, their library type, and other data, are stored in the local Kodi db or if you use it, MySQL.  I think when you made the switch from local to MySQL, Kodi just didn't write the library types into the MySQL db.  Do as Karellen has suggested (go into every source and set back to Movies/TV.  If already set, change to None, says no, then change back to correct library type) and I think you'll find it works again.  Great catch K!

Also, as you re-jig each source, make sure a valid, modern version of a scraper is set!
First, thanks folks, for the input. However, I gave up on putzing around with this and blew the entire library away, even manually deleting it from MariaDB. Although I'd love to know the why, I don't have the time to find out, honestly.

My solution, for posterity's sake:
  1. Opened both copies of Kodi.
  2. Using the Windows Kodi (WKodi), I went into Videos->Files and removed both sources. Told Kodi to remove the files from the Library.
  3. Did the same on MacOS Kodi (MKodi). * NOTE *: when I went into MKodi, all videos were already missing from the MariaDB, as the library was "clean", reflected by Kodi showing nothing in Movies or TV Shows. I removed the sources and told MKodi to remove from Library, just to be sure.
  4. Shut down MKodi, leaving the advancedsettings.xml intact.
  5. Shut down WKodi, leaving the .xml intact.
  6. Went into MariaDB and blew away ALL databases, as I'm using using it for Kodi functionality.
  7. Powered off and re-started all machines, to ensure disk and network caches/memory buffers were cleared.
  8. Once MariaDB was back up, started WKodi, adding sources, using proper settings. All videos were scanned into the MariaDB.
  9. Checked for the "Refresh" button, and it's back where it belongs on both Movies and TV Show episodes.
  10. Fired up MKodi and all media was there.
  11. Checked for the "Refresh" button on MKodi and it's back where it belongs.

Thanks again, folks! 👍
Looking at code for xbmc\video\dialogs\GUIDialogVideoInfo.cpp
the requirement to enable (and for Estuary to display) the "refresh" button:

"content" for the item is not NONE (that is, must be a library item) or uniqueId (in the database) is empty
then you must be in the master profile (with password if set), or a profile that has setting allowing writes to the database.

see:
c++:
 const std:Confusedtring uniqueId = m_movieItem->GetProperty("xxuniqueid").asString();
  if (uniqueId.empty() || !StringUtils::StartsWithNoCase(uniqueId.c_str(), "xx"))
    CONTROL_ENABLE_ON_CONDITION(CONTROL_BTN_REFRESH,
        (profileManager->GetCurrentProfile().canWriteDatabases() ||
        g_passwordManager.bMasterUser));

scott s.
.
That's grand, love. But, since there's no way to diagnose the problem, it's rather useless data. Somehow, somewhere, with everything appearing to be set properly (smb paths, source type, etc.), it just didn't work. Like I posted yesterday, everything is grand, since I blew away the database and started from scratch.

But, thanks for playin'...
Cheers!
Well I for one appreciate the extra info @scott967, it's always great to see why things behave the way they do in actual code and have it explained.  No doubt Karellen's original suggestion of toggling the library type for each source to None and back to the correct one would also have solved this.  Not sure why the need for the pithy attitude.
Well, I had already done as Karellen suggested, with no change, LONG before I posted on here. 20 years of using XBMC/Kodi, so that was one of the FIRST things I did. Speaking as coder, it really doesn't matter WHAT the code does IF the database is somehow corrupted. Once the data is hosed, all the correct code in the world won't fix the problem.

Funny, how I posted my solution, but no one said, "That's good to know." Dude posts code and it's golden. Whatever.

If scott967 REALLY wanted to be helpful, he would have shown every code entry that modified that particular field, not just the snippet that shows how the Refresh button is displayed. The DATA is where the rub is possibly at. Knowing that, would be USEFUL information that a REAL developer could use to either prove or disprove there is a bug. But, no, just take a wipe big-assed swipe at the air, show some code, and that PROVES the problem is with the user. That's the way REAL coders do it. Yeah. Right. Worthless input.

To be frank, scott967's response was akin to a tragic accident, where someone runs a stop sign and the other driver is seriously injured. If I was scott967, I'd be an off-duty cop who happened upon the scene, grabbed my Driver's Law Book, and pointed the driver to the section that says, "You must stop at a stop sign." Yeah, that's true. But, the injured driver wasn't at fault; the reality is that all players don't always follow the rules. The same with errant code. Besides, what was the point? I'd already posted that the problem was fixed!

If I could, I'd delete this entire post, as it was worthless. I'd use the phrase "weak as water", but you'd miss the point and post how many feet of water can move a car. I TRIED to show respect and explain why things didn't work for me. I even showed a possible solution. But, y'all know more than I do about what's happening with my system. R-i-i-i-i-ghto. The value of that plus $10 would get me a coffee.

PS - since scott967 is so tight with the dev code and dialog boxes, why isn't there a set of boxes to setup the hosting of Kodi's library? Since code is the savior, and unerring. why do I have to modify .xlm files to do what most other apps do for me? I mean, mySQL integration has been around for almost 10 years. And y'all can't make it easier? Y'all can't make a basic diagnostic tool to check the setup is proper? Nah. You're too busy posting useless snippets, protecting the integrity of Kodi's code. Again, yeah. Whatever. I'm pissing in the wind, at this point.