Kodi Community Forum
Solved Shared MySQL - Update library from another client results in duplicates - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: OS independent / Other (https://forum.kodi.tv/forumdisplay.php?fid=228)
+---- Thread: Solved Shared MySQL - Update library from another client results in duplicates (/showthread.php?tid=354567)



Shared MySQL - Update library from another client results in duplicates - johnyb - 2020-05-19

I've had a shared library running on a central server for a long time now, but I've always manually updated the library from a single client(1).  That clients gong to be removed from the network, so now looking to update library from the others but this results in duplicate entries (stop the update as soon as I see this).  Followed the guide section 5 here, additionally copying over the these files "sources.xml", "mediasources.xml" as well as the "advancedsettings" (which was already on the other clients), but problem remains.  Welcome any ideas on how to solve this. Thanks in advance.

System:
Client 1 - Acer Revo RL80 (LibraElec - Kodi 18.6)
Client 2 - Firestick 4k (Kodi 18.6)
Client 3 - Firestick 4k (Kodi 18.6)

SQL dbs - Hosted on server (192.168.0.63)
Content - Hosted on server (192.168.0.63 or //OMV)

Advanced settings file added into userdata on all clients:-
Quote:<advancedsettings>
  <videodatabase>
    <type>mysql</type>
    <host>192.168.0.63</host>
    <port>3306</port>
    <user>****</user>
    <pass>****</pass>
  </videodatabase> 
  <musicdatabase>
    <type>mysql</type>
    <host>192.168.0.63</host>
    <port>3306</port>
    <user>****</user>
    <pass>****</pass>
  </musicdatabase>
  <videolibrary>
    <importwatchedstate>true</importwatchedstate>
    <importresumepoint>true</importresumepoint>
  </videolibrary>
</advancedsettings>
 

mediasources.xml  (Not sure why I used IP address in once case but hostname in another, but its always worked ok)
Quote:<mediasources>
    <network>
        <location id="0">smb://192.168.0.63/Movies</location>
        <location id="1">smb://omv/TV</location>
    </network>
</mediasources>

sources.xml
Quote:<sources>
    <programs>
        <default pathversion="1"></default>
    </programs>
    <video>
        <default pathversion="1"></default>
        <source>
            <name>Movies</name>
            <path pathversion="1">smb://192.168.0.63/Movies/</path>
            <allowsharing>true</allowsharing>
        </source>
        <source>
            <name>TV</name>
            <path pathversion="1">smb://omv/TV/</path>
            <allowsharing>true</allowsharing>
        </source>
    </video>
    <music>
        <default pathversion="1"></default>
    </music>
    <pictures>
        <default pathversion="1"></default>
    </pictures>
    <files>
        <default pathversion="1"></default>
    </files>
    <games>
        <default pathversion="1"></default>
    </games>
</sources>



RE: Shared MySQL - Update library from another client results in duplicates - Klojum - 2020-05-19

"Duplicate" entries always have a difference one way or the other. An extra forward slash, a space char...
Try comparing the full paths of a couple of your duplicates, I'm sure there is something off between them.


RE: Shared MySQL - Update library from another client results in duplicates - johnyb - 2020-05-19

(2020-05-19, 10:57)Klojum Wrote: "Duplicate" entries always have a difference one way or the other. An extra forward slash, a space char...
Try comparing the full paths of a couple of your duplicates, I'm sure there is something off between them.

Sorry what do you mean compare the full paths, you mean of the entries in SQL dbs?  Not sure how to do this.  Given the identical source path's are being used on all machines (as I'm copying over the xml rather than adding the sources manually) surely this shouldnt be an issue :-)


RE: Shared MySQL - Update library from another client results in duplicates - Klojum - 2020-05-19

(2020-05-19, 11:27)johnyb Wrote: you mean of the entries in SQL dbs?  Not sure how to do this.

Database entries would be nice... Smile

But you can start by opening the information page of the videos, and highlight the last 'tab' button (which is Refresh in Estuary), and the full path of the video should appear.
Image


RE: Shared MySQL - Update library from another client results in duplicates - johnyb - 2020-05-22

(2020-05-19, 15:41)Klojum Wrote:
(2020-05-19, 11:27)johnyb Wrote: you mean of the entries in SQL dbs?  Not sure how to do this.

Database entries would be nice... Smile

But you can start by opening the information page of the videos, and highlight the last 'tab' button (which is Refresh in Estuary), and the full path of the video should appear.
Image 
Thanks for this.  So I checked and the duplicate entries had 'smb://omv/Movies/x'  whereas the existing one had 'smb://192.168.0.63/Movies/x' 
But I couldn't for the life of me figure out why, because the source for movies was configured as 'smb://192.168.0.63/Movies'.  Where is it getting this path from?


Anyway, decided to tidy this up a bit.  So exported the library (single files), created a new SQL instance (easy as on docker), used the SMB://omv/x for both TV & Movies this time.
Scanning for files picked up all the content, and now after copying the master  "sources.xml", "mediasources.xml", "advancedsettings" files to the other client its working fine.
(Only point worth noting is the TV scrapper plug in isnt installed by default to need to add this first).

Thanks for your help.


Shared MySQL - Update library from another client results in duplicates - Klojum - 2020-05-22

Thread marked solved.