Guest - Testers are needed for the reworked CDateTime core component. See... https://forum.kodi.tv/showthread.php?tid=378981 (September 29) x
  • 1
  • 6
  • 7
  • 8(current)
  • 9
  • 10
  • 39
v19 Video Database Cleaner add-on
I had a cleaning hanging issue, and looking at the debug log, I noticed thousands of http:// live streams while cleaning, I suspected they were the cause of the hanging cleaning process.

Just installed this on Krypton Alpha (LibreELEC). Unfortunately the addon repository does not install, so I downloaded the zip of the addon and installed it manually. But cannot autoupdate without the repository.

The addon worked at first shot. I use MySQL on a centralized NAS at home. It did its job in 10 seconds, cleaning included.

Only thing I didn't like was that it didn't report anything in those 10 seconds, would be cool to know what it was doing, when it was finished, how many entries were removed etc.

Anyway, GREAT JOB. Saved me from getting crazy. Thank you so much.
Reply
I just ran this tool, with many high hopes. I'm having a few DB issues and I thought this would resolve it. Unfortunately, it didn't remove numerous things from the DB which are no longer there but still have entries. For example, there is a show, under smb://10.10.10.120/media/tvshows/Archive/ which we added, (smb://10.10.10.120/media/tvshows/Archive/Show4), then removed the source. But it keeps still scanning in

I did not get a prompt that would show what is being deleted. Also, I was unable to see the full paths on the initial pop up screen that listed all my sources.

Edit: Details of my setup forthcoming

Relevant parts of my files and logs. I trimmed out similar entires to reduce reading clutter, as well as removed some file names

sources.xml
Code:
<sources>
    <programs>
        <default pathversion="1"></default>
    </programs>
    <video>
        <default pathversion="1"></default>
        <source>
            <name>Show1</name>
            <path pathversion="1">smb://10.10.10.120/media/tvshows/Archive/Show1/</path>
            <allowsharing>true</allowsharing>
        </source>
        <source>
            <name>Show2</name>
            <path pathversion="1">smb://10.10.10.120/media/tvshows/Archive/Show2/</path>
            <allowsharing>true</allowsharing>
        </source>
        <source>
            <name>TV-General</name>
            <path pathversion="1">smb://10.10.10.120/media/tvshows/General/</path>
            <allowsharing>true</allowsharing>
        </source>
        <source>
            <name>TV-Kids</name>
            <path pathversion="1">smb://10.10.10.120/media/tvshows/Kids/</path>
            <allowsharing>true</allowsharing>
        </source>
        <source>
            <name>Movies-Rips</name>
            <path pathversion="1">smb://10.10.10.120/media/movies/Rips/</path>
            <allowsharing>true</allowsharing>
        </source>
        <source>
            <name>Movies-ISO</name>
            <path pathversion="1">smb://10.10.10.120/media2/movies/ISOs/</path>
            <allowsharing>true</allowsharing>
        </source>
        <source>
            <name>Movies-Excercise</name>
            <path pathversion="1">smb://10.10.10.120/media2/movies/Excercise/</path>
            <allowsharing>true</allowsharing>
        </source>
        <source>
            <name>Boxart</name>
            <path pathversion="1">smb://10.10.10.120/media2/movies/Boxart/</path>
            <allowsharing>true</allowsharing>
        </source>
        <source>
            <name>videos</name>
            <path pathversion="1">smb://10.10.10.120/media/videos/</path>
            <allowsharing>true</allowsharing>
        </source>
        <source>
            <name>Show3</name>
            <path pathversion="1">smb://10.10.10.120/media/tvshows/Kids 2/Show3/</path>
            <allowsharing>true</allowsharing>
        </source>
    </video>
    <music>
        <default pathversion="1">Music</default>
        <source>
            <name>Music</name>
            <path pathversion="1">smb://10.10.10.120/media/music/Music/</path>
            <allowsharing>true</allowsharing>
        </source>
    </music>
    <pictures>
        <default pathversion="1">Pictures</default>
        <source>
            <name>Pictures</name>
            <path pathversion="1">smb://10.10.10.120/media/pictures/</path>
            <allowsharing>true</allowsharing>
        </source>
    </pictures>
    <files>
        <default pathversion="1"></default>
        <source>
            <name>media2</name>
            <path pathversion="1">smb://10.10.10.120/media2/</path>
            <allowsharing>true</allowsharing>
        </source>
        <source>
            <name>media</name>
            <path pathversion="1">smb://10.10.10.120/media/</path>
            <allowsharing>true</allowsharing>
        </source>
        <source>
            <name>Black Pudding</name>
            <path pathversion="1">http://batteredbits.co.uk/KODI/repo</path>
            <allowsharing>true</allowsharing>
        </source>
    </files>
</sources>

mediasources.xml
Code:
<mediasources>
    <network>
        <location id="2">smb://10.10.10.120/media</location>
        <location id="1">smb://10.10.10.120/media2</location>
    </network>
</mediasources>
Reply
Hello, i installed the addon two days ago but i got an error when i tried to run it with default settings. I looked in the .log and found this:

Code:
12:58:55 T:5252   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <class 'sqlite3.OperationalError'>
                                            Error Contents: near "s": syntax error
                                            Traceback (most recent call last):
                                              File "C:\Users\Ronnie\AppData\Roaming\Kodi\addons\script.database.cleaner\default.py", line 524, in <module>
                                                cleaner_log_file(our_select, False)
                                              File "C:\Users\Ronnie\AppData\Roaming\Kodi\addons\script.database.cleaner\default.py", line 234, in cleaner_log_file
                                                cursor.execute(our_select)
                                            OperationalError: near "s": syntax error
                                            -->End of Python script error report<--

Then i started playing with the setting to see if i could get it working and what did the trick for me was to disable Sources > Use sources.xml to determine files to keep.

Kodi 16.1 is installed on Windows 10 Pro x64 bits. Here's my sources.xml file:
Code:
<sources>
    <programs>
        <default pathversion="1"></default>
    </programs>
    <video>
        <default pathversion="1"></default>
        <source>
            <name>TV Shows</name>
            <path pathversion="1">nfs://192.168.12.1/tmp/usb_mount/5aea3b7c-6edb-41f6-9bc5-297483067c2f/myMedia/TV Shows/</path>
            <allowsharing>true</allowsharing>
        </source>
        <source>
            <name>Concerts</name>
            <path pathversion="1">nfs://192.168.12.1/tmp/usb_mount/5aea3b7c-6edb-41f6-9bc5-297483067c2f/myMedia/Concerts/</path>
            <allowsharing>true</allowsharing>
        </source>
        <source>
            <name>Documentary Films</name>
            <path pathversion="1">nfs://192.168.12.1/tmp/usb_mount/5aea3b7c-6edb-41f6-9bc5-297483067c2f/myMedia/Documentary/Films/</path>
            <allowsharing>true</allowsharing>
        </source>
        <source>
            <name>Kid&apos;s Movies</name>
            <path pathversion="1">nfs://192.168.12.1/tmp/usb_mount/5aea3b7c-6edb-41f6-9bc5-297483067c2f/myMedia/Kid&apos;s Movies/</path>
            <allowsharing>true</allowsharing>
        </source>
        <source>
            <name>Movies</name>
            <path pathversion="1">nfs://192.168.12.1/tmp/usb_mount/5aea3b7c-6edb-41f6-9bc5-297483067c2f/myMedia/Movies/</path>
            <allowsharing>true</allowsharing>
        </source>
        <source>
            <name>Anime</name>
            <path pathversion="1">nfs://192.168.12.1/tmp/usb_mount/5aea3b7c-6edb-41f6-9bc5-297483067c2f/myMedia/Anime/</path>
            <allowsharing>true</allowsharing>
        </source>
    </video>
    <music>
        <default pathversion="1"></default>
        <source>
            <name>Music</name>
            <path pathversion="1">C:\Users\Ronnie\Music\RONNIE\</path>
            <allowsharing>true</allowsharing>
        </source>
    </music>
    <pictures>
        <default pathversion="1"></default>
    </pictures>
    <files>
        <default pathversion="1"></default>
        <source>
            <name>Archivos</name>
            <path pathversion="1">C:\Users\Ronnie\</path>
            <allowsharing>true</allowsharing>
        </source>
        <source>
            <name>Unsorted</name>
            <path pathversion="1">nfs://192.168.12.1/tmp/usb_mount/5aea3b7c-6edb-41f6-9bc5-297483067c2f/myMedia/Unsorted/</path>
            <allowsharing>true</allowsharing>
        </source>
    </files>
</sources>

Could it be the part that is supposed to show Kid's Movies or the spaces betwen some names?

Thanks!.
My XBMC/Kodi folder: addons, skins, addon/menu backgrounds & more
Reply
Hi all !

Major apologies for the lack of support in the last couple of months - RL has been rather hectic recently but I hope I now have some free time to help you guys out.

As it's been a while, it'd be helpful if you could give me the version number of the cleaner and whether or not you installed it from the repo, or from github.

Cheers
Learning Linux the hard way !!
Reply
Version: 0.5.4 downloaded from repo

I just downloaded this and ran it and got the following error
Code:
14:41:41 T:9068   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <class 'sqlite3.OperationalError'>
                                            Error Contents: near "s": syntax error
                                            Traceback (most recent call last):
                                              File "C:\Users\neil-\AppData\Roaming\Kodi\addons\script.database.cleaner\default.py", line 524, in <module>
                                                cleaner_log_file(our_select, False)
                                              File "C:\Users\neil-\AppData\Roaming\Kodi\addons\script.database.cleaner\default.py", line 234, in cleaner_log_file
                                                cursor.execute(our_select)
                                            OperationalError: near "s": syntax error
                                            -->End of Python script error report<--
I know it is still beta but thought I'd give it a shot any how Tongue
Reply
Cheers, the info is helpful. I'll see if I can figure out what's going on and get back to you as soon as possible. I might have to grab it from the repo myself as I'm not sure how far further on my dev version is Tongue

Either way, that's at least two users with the same issue so I'm guessing it might be easily reproducible in which case a fix should be sooner rather than later !!
Learning Linux the hard way !!
Reply
(2016-09-02, 16:00)black_eagle Wrote: Cheers, the info is helpful. I'll see if I can figure out what's going on and get back to you as soon as possible. I might have to grab it from the repo myself as I'm not sure how far further on my dev version is Tongue

Either way, that's at least two users with the same issue so I'm guessing it might be easily reproducible in which case a fix should be sooner rather than later !!

Thats great if it is something simple but then again... I ran the script again but turned off check sources.xml and it ran without errors!
Reply
Hmmm, probably means then that its an error in the formatting of the sql statement when excluding all the paths in sources.xml. Thanks, that makes it a bit easier to narrow it down (I hope lol!!).
Learning Linux the hard way !!
Reply
I use latest version from repo, same as @Pasado.
As I mentioned disabling Sources option makes it work so the problem is indeed sources.xml related.
No manual excludes.XML nor external SQL db.

T.I.A Smile

Enviado desde mi Moto X vía Tapatalk!
My XBMC/Kodi folder: addons, skins, addon/menu backgrounds & more
Reply
In spite of looking over the code thats on the repo and running it on my laptop against a local sqlite database, I have been unable so far to reproduce an error. Is there any chance one of you can get a proper debug log (wiki) (debug on in both kodi and the addon) and post the relevant lines somewhere with a link to them ?

I don't need the full log, just all the lines that start "DEBUG: Video Database Cleaner:", but I do need ALL of those. Hopefully that'll give me an insight into what exactly is happening.

Thanks guys n gals Smile
Learning Linux the hard way !!
Reply
(2016-09-02, 21:34)black_eagle Wrote: In spite of looking over the code thats on the repo and running it on my laptop against a local sqlite database, I have been unable so far to reproduce an error. Is there any chance one of you can get a proper debug log (wiki) (debug on in both kodi and the addon) and post the relevant lines somewhere with a link to them ?

I don't need the full log, just all the lines that start "DEBUG: Video Database Cleaner:", but I do need ALL of those. Hopefully that'll give me an insight into what exactly is happening.

Thanks guys n gals Smile

Hopefully this is what you want! http://pastebin.com/iMdbqSNa

or if you want the full log (it's rather long) https://pastebin.com/vMH6byCU
Reply
I have done a complete re-install and now this add-on appears to be working as expected, the only difference I've made is to use the Local Information Scraper instead, not sure why that should make any difference, maybe it hasn't, all I know is everything is working!
Reply
Cool !!

As it happens, I missed your earlier reply with the debug stuff in it which is exactly what I wanted Smile

Looking at what the addon has spit out into there, I can clearly see where the error is occurring, and it is because you have a path named "H:\Users\Neil\Videos\Music Video's\". The apostrophe before the s in video's is what causes the issue. Running the addon without using the sources.xml file would generate a different sql command without that path in it. I imagine that Veronica's issue will also be similar.

Now that I'm aware of that, I can check for that before passing the command to sql/sqlite3.

Thanks for your assistance in tracking down that bug !! Big Grin
Learning Linux the hard way !!
Reply
In my case i have a path with: Kid's Movies , i had a huntch that 's was the problem.
I'll wait for an update instead of editing the source.

Thank you!

Enviado desde mi Moto X vía Tapatalk!
My XBMC/Kodi folder: addons, skins, addon/menu backgrounds & more
Reply
So, I think I have a fix for this issue Smile

Unfortunately, I do not have any access to the repo which means I can't push out the fix and update everyone automatically Sad

In view of this, you can download the updated add-on from https://www.dropbox.com/s/8vrmw9h3524lwn...1.zip?dl=0 . As far as I'm aware, it should update and install over the top of the old one, but if you have any issues with this, uninstalling the repo version and then installing from zip should fix it.
Learning Linux the hard way !!
Reply
  • 1
  • 6
  • 7
  • 8(current)
  • 9
  • 10
  • 39

Logout Mark Read Team Forum Stats Members Help
Video Database Cleaner add-on5