Solved Stop Scan custom button
#1
Hi All/Gade,

Just a quick query really, I want to put a submenu button that would 'stop' the library scan similar to the main 'Stop Scan' button that appears within a library view when a scan is running.

I guess id have to set a custom action to this as its not a preset but Im having trouble tracking down the exact command to use.

I cant seem to find anything on the wiki relating to stopping the scan (just starting it) and have had a search through the skin files for any reference to the command with no luck.

Im thinking maybe this is an internal Kodi bit of code and not able to be 'commanded'?
Reply
#2
Hi IAmTheDude360.

The actions of the button within the video and music library is hardcoded by Kodi.
I only provide the id of the button (20) and label/alt label (one label when scanning the library and another when not scanning).

Like you write, only actions to update the library is possible:
Code:
UpdateLibrary(video)
UpdateLibrary(music)

To my knowledge, there's no way to make an action to stop the library scan.

If anyone have any info on this, it's more than welcome.
Reply
#3
(2017-08-03, 15:47)Gade Wrote: Hi IAmTheDude360.

The actions of the button within the video and music library is hardcoded by Kodi.
I only provide the id of the button (20) and label/alt label (one label when scanning the library and another when not scanning).

Like you write, only actions to update the library is possible:
Code:
UpdateLibrary(video)
UpdateLibrary(music)

To my knowledge, there's no way to make an action to stop the library scan.

If anyone have any info on this, it's more than welcome.

Thanks for the reply Gade,

No problem, I suspected as such but thanks for clarifying Smile
Reply
#4
Hi IAmTheDude360.

The solution:

Create a submenu button with the action
Code:
UpdateLibrary(Video)
or
UpdateLibrary(Music)

Clicking the button while a scan is done will stop the scan.

Simple as that. Wink


I'll mark this thread as solved.
Reply

Logout Mark Read Team Forum Stats Members Help
Stop Scan custom button0