Solved Clean library claims it can't find sources and blasts away library.
#1
I have 3 Kodi instances (2 windows, 1 mac) with a smb share and mariadb configured. When I do a Clean Library on one of the windows boxes it shoots through and says "Unavailable source" and it asks me what I want to do with media items from the source, i.e. Keep/Remove. (similar to this https://forum.kodi.tv/showthread.php?tid=371590 ). The difference is, when I click remove, it removes my entire db (I had snapshotted before I clicked remove, so no harm no foul). 

When I scan, the windows box does find missing content and add it successfully, mapping with the same format as the files it says it can't find.

logs, media sources, sources, passwords:


All sources show up in the logs, like so:

2024-06-28 19:16:34.761 T:1588    debug <general>: CUtil::GetMatchingSource: no matching source found for [smb://192.168.50.235/share/movie/...]
...
2024-06-28 19:16:34.969 T:1588    debug <general>: CUtil::GetMatchingSource: no matching source found for [smb://192.168.50.235/share/tv/...]
.....

mediasources file:

<mediasources>
    <network>
        <location id="0">smb://user:[email protected]/share/tv</location>
        <location id="1">smb://user:[email protected]/share/movie</location>
    </network>
</mediasources>

sources file:

<sources>
    <programs>
        <default pathversion="1"></default>
    </programs>
    <video>
        <default pathversion="1"></default>
        <source>
            <name>tv</name>
            <path pathversion="1">smb://user:[email protected]/share/tv/</path>
            <allowsharing>true</allowsharing>
        </source>
        <source>
            <name>movie</name>
            <path pathversion="1">smb://user:[email protected]/share/movie/</path>
            <allowsharing>true</allowsharing>
        </source>
        </source>
    </video>
    ....

passwords file:

<passwords>
<path>
<from pathversion="1">smb://192.168.50.235/share</from>
<to pathversion="1">smb://user:[email protected]/share/movie/</to>
</path>
</passwords>

Reply
#2
(2024-06-29, 20:50)kingpin2k Wrote: click remove, it removes my entire db
That's what it should do if you 'remove'. Obviously it doesn't find the correct source path and assumes you have either unplugged it, or changed the source. In your case it could be the smb://user:[email protected]/share/movie/ username & password is failing. A full proper debug log might offer a clue.
Reply
#3
I pulled the source, cut a new build with a ton a of logs and it did only know about a single source "addons://sources/video/". All that being said, I digress, xml was bad on the sources file (it's visible in my OP, an extra closing source tag in the video tree). Fun day, and yeah, it did complain about this at the top of the logs, so a trained eye probably would have caught that, I didn't think it was that file due to somehow being able to scan for new content out of those folders (and then it would subsequently remove the content on clean).
Reply
#4
An xml-aware text editor can go a long way.

scotts.
.
Reply
#5
hah, I have plenty of IDEs that are XML aware, but alas, not on the media center itself. and I'm sure I lazily opened it in notepad or something embarrassingly inadequate. 

And although totally my fault, I wouldn't mind something like this failing closed (or possibly failing loudly) and just blowing up so you don't have to look through logs due to some "important" file failing the parse (I'd have a totally different opinion about can parse successfully and a source is missing, or currently unavailable, as I realize that may be ephemeral).
Reply
#6
(2024-07-06, 14:44)kingpin2k Wrote: (or possibly failing loudly)
Thanks for getting back to the thread to post your observations. On clean-up, you are presented with a requester at the end to query 'what to do with sources that it didn't find' That's the clue option and as about as loud as it gets.
Reply
#7
Thread marked solved.
Reply

Logout Mark Read Team Forum Stats Members Help
Clean library claims it can't find sources and blasts away library.0