Nothing happens when importing back DB
#1
Hi,
I moved some files in my NAS and I didn't want to rescrap all of them because some use TVDB, some TMDB, some manual NFO, …

I had:
smb://192.168.1.17:445/AnimFilms/
smb://192.168.1.17:445/AnimSéries/
and now I have:
smb://192.168.1.17:445/Animation/Films/
smb://192.168.1.17:445/Animation/Séries/

I exported the DB, edited the xml file to edit all the ~15'000 lines and I also edited the sources on Kodi and when it asked me if I wanted to scrap it, I said no.
And then I uploaded back the file on my vero4K.
I try to import the DB but nothing happens Huh Kodi freezes for few seconds and then nothing.
Here is my log: ujuqabixur (paste)

Any idea? Thank you
Reply
#2
(2024-05-14, 23:50)Pierrou Wrote: I exported the DB, edited the xml file to edit all the ~15'000 lines and I also edited the sources on Kodi and when it asked me if I wanted to scrap it, I said no.
How did you export the db?
My Signature
Links to : Official:Forum rules (wiki) | Official:Forum rules/Banned add-ons (wiki) | Debug Log (wiki)
Links to : HOW-TO:Create Music Library (wiki) | HOW-TO:Create_Video_Library (wiki)  ||  Artwork (wiki) | Basic controls (wiki) | Import-export library (wiki) | Movie sets (wiki) | Movie universe (wiki) | NFO files (wiki) | Quick start guide (wiki)
Reply
#3
(2024-05-15, 00:38)Karellen Wrote:
(2024-05-14, 23:50)Pierrou Wrote: I exported the DB, edited the xml file to edit all the ~15'000 lines and I also edited the sources on Kodi and when it asked me if I wanted to scrap it, I said no.
How did you export the db?
With Kodi itself (Param > Media > Export), single file
Then I accessed it with FileZilla to download it and edit it with Notepad++
Reply
#4
(2024-05-15, 00:50)Pierrou Wrote: With Kodi itself (Param > Media > Export), single file
And you are aware of the warnings... https://kodi.wiki/view/Import-export_lib...ingle_File
I guess you are as you tried to edit the paths, but that is only one limitation.

Unfortunately the log does not show anything. You enabled debug mode at the end, and I don't see any scanning. I don't remember if an import shows up in the log.
Can you also enable Component Specific Logging for... The SMB library and The Database component.
And make sure debug mode is enabled then restart and perform the scan.
My Signature
Links to : Official:Forum rules (wiki) | Official:Forum rules/Banned add-ons (wiki) | Debug Log (wiki)
Links to : HOW-TO:Create Music Library (wiki) | HOW-TO:Create_Video_Library (wiki)  ||  Artwork (wiki) | Basic controls (wiki) | Import-export library (wiki) | Movie sets (wiki) | Movie universe (wiki) | NFO files (wiki) | Quick start guide (wiki)
Reply
#5
(2024-05-15, 01:11)Karellen Wrote: I guess you are as you tried to edit the paths, but that is only one limitation.
Well I'll be honest I didn't read the wiki so I wasn't aware about those warnings Tongue
I searched on Google how to edit the DB without having to rescrap everything when you move files and many threads were talking about exporting the DB as a single file to make it easier
(2024-05-15, 01:11)Karellen Wrote: Can you also enable Component Specific Logging for... The SMB library and The Database component.

Sure! For my previous log, I enabled it and ran the import but I didn't restart between those two steps.
This this log, I restarted (some files got scrapped btw because I forget I had “auto-update when turned on” on)
New log: botizezoxu (paste) (Log enabled with SMB and DB options, restarted my device, ran import)
Reply
#6
(2024-05-15, 01:34)Pierrou Wrote: New log: botizezoxu (paste) (Log enabled with SMB and DB options, restarted my device, ran import)
Thanks. Unfortunately nothing is shown for the import.
All I can really see is this... RunQuery took 48 ms for 0 items query: SELECT * FROM tvshow_view WHERE ((tvshow_view.strPath LIKE 'smb://192.168.1.17:445/Animes/%'))
And it looks like the path is still wrong.
Have you correctly set up your Source to point to the correct folder?

Maybe you could use the better method of Export to Separate Files as shown in that wiki page?
My Signature
Links to : Official:Forum rules (wiki) | Official:Forum rules/Banned add-ons (wiki) | Debug Log (wiki)
Links to : HOW-TO:Create Music Library (wiki) | HOW-TO:Create_Video_Library (wiki)  ||  Artwork (wiki) | Basic controls (wiki) | Import-export library (wiki) | Movie sets (wiki) | Movie universe (wiki) | NFO files (wiki) | Quick start guide (wiki)
Reply
#7
(2024-05-15, 01:44)Karellen Wrote: Have you correctly set up your Source to point to the correct folder?
I think I did it right yeah
Image Image

Example of my xml with 1 animated movie and 1 animated series: https://hastebin.skyra.pw/oqadiwurid.htm
Btw, my xml file is 2'880'595 lines long and is 127Mo… Notepad++ is going slowly through it

(2024-05-15, 01:44)Karellen Wrote: Maybe you could use the better method of Export to Separate Files as shown in that wiki page?
Well I deleted the old sources and removed movies from it :p
Reply
#8
(2024-05-15, 01:44)Karellen Wrote: All I can really see is this... RunQuery took 48 ms for 0 items query: SELECT * FROM tvshow_view WHERE ((tvshow_view.strPath LIKE 'smb://192.168.1.17:445/Animes/%'))

 Sorry for the double-poste, I forgot that part.
I remember I tried to separated Animated Movies from Real movies on Home and I tried to create special playlist and stuff like but now I just use Kodi as it is. So that's maybe from my old mess, do you think this can be the problem?
I don't really know where this sql request is executed right now since I don't use it
Reply
#9
(2024-05-15, 02:02)Pierrou Wrote: Example of my xml with 1 animated movie and 1 animated series: https://hastebin.skyra.pw/oqadiwurid.htm
Is this the full file or did you cut out this bit from the full file?
I ask because the file is incomplete so it won't scan.

At the end of the file you should see the <paths> tags, along with a listing of all your sources. Then there should be the closing </videodb> tag that makes the xml file complete.

I have been playing with this for the last 30 minutes using v21, and I have exported and imported, changing paths in between and had no problems, though it is a method I would never use. So there is no regression or bug that has crept in.
And I can confirm that nothing is logged when using the Import method, so there was nothing wrong with your log, in case you were wondering.

At this point, apart from the missing tags from the file, I don't know what else could be causing the problem, and with the unhelpful log I probably never will, unless I am sitting right in front of your Kodi install Wink.
Is there any reason you cannot use the better method of Export to Separate Files instead of this troublesome Export to Single File?



Some other observations...

IF/WHEN you update to v21 this cache code needs to be removed. See... https://kodi.wiki/view/Settings/Services/Caching
xml:
<cache>
<buffermode>1</buffermode>
<memorysize>524880000</memorysize>
<readfactor>5.0</readfactor>
</cache>

Not sure where you found the following 3 sets of tags but I don't think they exist in Kodi...
xml:
<gamesgeneral>
<enable>true</enable>
</gamesgeneral>

xml:
<videoscreen>
<screen>0</screen>
</videoscreen>

xml:
<myvideos>
<usetags>false</usetags>
</myvideos>
My Signature
Links to : Official:Forum rules (wiki) | Official:Forum rules/Banned add-ons (wiki) | Debug Log (wiki)
Links to : HOW-TO:Create Music Library (wiki) | HOW-TO:Create_Video_Library (wiki)  ||  Artwork (wiki) | Basic controls (wiki) | Import-export library (wiki) | Movie sets (wiki) | Movie universe (wiki) | NFO files (wiki) | Quick start guide (wiki)
Reply
#10
(2024-05-15, 05:06)Karellen Wrote: Is this the full file or did you cut out this bit from the full file?

Yeah I cut because, as I said, the XML file is 2'880'595 lines long, 2,8 millions Nerd
I uploaded it on Mega because it's 137Mo and too big for Pastebin, Hastebin, … https://mega.nz/file/aj4i3LIC#i5a_vUy7xG...NB0wOp3AhQ
(2024-05-15, 05:06)Karellen Wrote: Is there any reason you cannot use the better method of Export to Separate Files instead of this troublesome Export to Single File?
Since I deleted previous scrapped movies/series when editing the sources (it asked me if I wanted to remove them and I said yes to not have duplicated movies) I can't export the “old” DB anymore
(2024-05-15, 05:06)Karellen Wrote: Not sure where you found the following 3 sets of tags but I don't think they exist in Kodi...
xml:
<gamesgeneral>
<enable>true</enable>
</gamesgeneral>

xml:
<videoscreen>
<screen>0</screen>
</videoscreen>

xml:
<myvideos>
<usetags>false</usetags>
</myvideos>

I didn't touch anything else beside editing the SMB url, so I don't know where they are from. I only use Kodi for Movies/Series so I don't understand where those game tags can be from.
Btw, I also deleted the custom playlist I've made and the Node I've made like a year ago but it didn't fix the import: majokuravo (paste)
At least, no more SQL error.

Well I guess I have no choice to rescrap everything then… Sad
Reply
#11
(2024-05-15, 05:40)Pierrou Wrote: Well I guess I have no choice to rescrap everything then…
Yea, I am not sure of a way around this, especially as you don't have the original db to fall back on.

Please follow this method and, barring a catastrophic hard drive failure, you won't have problems in future.

1. Install Artwork Dump from this thread... https://forum.kodi.tv/showthread.php?tid=360078 (it is not in the kodi repo)
Adjust settings to download artwork after scraping. This will give you the original artwork saved next to your media files.

2. After scraping your media, use the Export to Separate Files to export the nfo files. Do not export Artwork when asked, as you already have the originals from Artwork Dump.
You should get in the habit of running the export at regular intervals. This captures your play counts, resume points, and any changes you have made, like changing the title, or creating Sets/Collections.

Having these, and you can quickly and easily rebuild your library in minutes - 3min 58 sec for 617 movies. About 20 min for 6,000 episodes (my own library). A lot quicker than scraping as you will soon discover.
My Signature
Links to : Official:Forum rules (wiki) | Official:Forum rules/Banned add-ons (wiki) | Debug Log (wiki)
Links to : HOW-TO:Create Music Library (wiki) | HOW-TO:Create_Video_Library (wiki)  ||  Artwork (wiki) | Basic controls (wiki) | Import-export library (wiki) | Movie sets (wiki) | Movie universe (wiki) | NFO files (wiki) | Quick start guide (wiki)
Reply

Logout Mark Read Team Forum Stats Members Help
Nothing happens when importing back DB0