Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Cleaning the Library" no more working in ver 1.2.3 on Kodi 19.4 #70

Open
shama84 opened this issue Dec 24, 2022 · 3 comments
Open

"Cleaning the Library" no more working in ver 1.2.3 on Kodi 19.4 #70

shama84 opened this issue Dec 24, 2022 · 3 comments

Comments

@shama84
Copy link

shama84 commented Dec 24, 2022

Hi,

Long time user of your great addon I would like to report a problem on the cleaning side: once a folder is deleted on a disk the cleaning does not remove it anymore from the Kodi database. I've two setup and just compared the behavior:

#The setup
file source: NAS with SMB shares
Device1: Kodi embedded DB (default so, no external DB), Kodi 18.9, Livrary auto update ver 1.1.0
Device2: Kodi embedded DB (default so, no external DB), Kodi 19.4, Livrary auto update ver 1.2.3

#When I delete a folder on the SMB share

  • on Device1 all is fine, cleaning done and the entry is no more present in the TV shows
  • on Device2: the entry is present with no episodes under the TV shows (not cleaned). Using the Kodi menu "cleanup library" works however
@robweber
Copy link
Owner

Thanks for letting me know about this. There really shouldn't be any big difference between those two version of Kodi that would account for the behavior change. Could you run your test on Kodi 19.4 again but with Debug logging enabled? You should see an entry that says Cleaning Databases from this addon just prior to doing the JSON-RPC call to actually clean the database. If that is missing that would be a good indication that block of code just isn't getting executed.

@shama84
Copy link
Author

shama84 commented Dec 28, 2022

I ran the test again, I see in the log the lines mentioned:

service.libraryautoupdate-1.2.3 : Cleaning Database
service.libraryautoupdate-1.2.3 : {"jsonrpc": "2.0", "method": "VideoLibrary.Clean", "params": {"showdialogs": true}, "id": 44}
CleanDatabase: Starting videodatabase cleanup ..
DialogProgress::Open called 
------ Window Init (DialogConfirm.xml) ------
------ Window Deinit (DialogExtendedProgressBar.xml) ------
GetDirectory - Error getting /media/video/
GetDirectory - Error getting $THEFOLDER I JUST DELETED
CleanDatabase: Cleaning videodatabase done. Operation took 00:08
CGUIMediaWindow::GetDirectory (addons://sources/executable)
Thread waiting start, auto delete: false

On screen (notif enabled) I see the search and the cleaning progress. But an entry is still present in the TV shows with no content, an empty folder so. Doing the cleaning directly in media>cleanup library (default Kodi option) works

In the meanwhile I tested a workaround by adding the file advancedsettings.xml with the below content

<advancedsettings>
        <videolibrary>
                <cleanonupdate>true</cleanonupdate>
        </videolibrary>
        <musiclibrary>
                <cleanonupdate>true</cleanonupdate>
        </musiclibrary>
</advancedsettings>

This work too but prefer have your addon fully fonctionnal of course.

@robweber
Copy link
Owner

Thanks for doing the additional testing. I wonder what the big difference is between the GUI initiated method and using the JSON-RPC call. In theory they should both be the same thing. I can try to reproduce this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants