Guest - Testers are needed for the reworked CDateTime core component. See... https://forum.kodi.tv/showthread.php?tid=378981 (September 29) x
Scan for new content
#1
Hi,
I'm wondering if there is a way to use the Scan for new content feature directly from an item's context menu, instead of having to navigate through deep through the Videos menus.
Videos > Files > (Navigate to show) > Item Menu > Scan for new content

I thought this was a skin issue at first, but was told this is an actual issue in the core.
Quote:The scan for new content is a little wonky. For some reason, you need to be in TV Shows > Titles or your source folder on the exact show you want to update. Any other area and it will not appear. Not in recently added, a playlist (which looks like it is from your SS), or anywhere else.

My library is quite large, which means it can take a very long time for it to update and pick up the new episode I've added to a show.
My only other options other than sitting and waiting have been to navigate through the Files menu to reach the Scan for new content option, or to do a Refresh for the show, which then clears your watch status.
Both are still quicker than waiting for Kodi to finish a library update.

So I'm curious if there is a technical reason that this option isn't available in all the context menus where it would be the most useful?
Specifically for me is by way of a widget that displays In Progress & Recently added.

Would it be possible to have this feature added though a plugin, or is there a limitation in the core that prevents this?
I can't think of another reason why you wouldn't want this ability where it would be the most useful.

Thanks!
Reply
#2
use json rpc

{"jsonrpc": "2.0", "method": "VideoLibrary.Scan","params":{"directory": "/path/to/update"}, "id": 1}

i wrote this functionality back in april for my own use
if you need a python example i can provide one but it runs external to kodi from a different machine
Reply
#3
(2023-12-01, 19:19)izprtxqkft Wrote: use json rpc

{"jsonrpc": "2.0", "method": "VideoLibrary.Scan","params":{"directory": "/path/to/update"}, "id": 1}

i wrote this functionality back in april for my own use
if you need a python example i can provide one but it runs external to kodi from a different machine

I have never gotten this to work on windows-style paths.  Tried "raw", \\, \\\\, Never got a valid path when Kodi tried to use it (if the json parser even accepted it).

But my method to add new is to put the video files view in "date"/"descending" sort order.  Then go files->navigate to new item folder-> i key (to open the movieinfo dialog).  Works good for movies and musicvideos (where folder contains a single video item like mp4 or mkv), might not for shows or episodes also never tried iso or folder rips.

scott s.
.
Reply
#4
(2023-12-02, 03:01)scott967 Wrote: I have never gotten this to work on windows-style paths.  Tried "raw", \\, \\\\, Never got a valid path when Kodi tried to use it (if the json parser even accepted it).

But my method to add new is to put the video files view in "date"/"descending" sort order.  Then go files->navigate to new item folder-> i key (to open the movieinfo dialog).  Works good for movies and musicvideos (where folder contains a single video item like mp4 or mkv), might not for shows or episodes also never tried iso or folder rips.

scott s.
.

i have to wonder why the json rpc fails on windows, i admit i never tried it with that, smb or local linux/android only
- bug?

good alternative with date sort
Reply
#5
(2023-12-01, 19:19)izprtxqkft Wrote: use json rpc

{"jsonrpc": "2.0", "method": "VideoLibrary.Scan","params":{"directory": "/path/to/update"}, "id": 1}

i wrote this functionality back in april for my own use
if you need a python example i can provide one but it runs external to kodi from a different machine

Thanks for the tip!

I'm not versed in json rpc, but I wonder if I can't call it from TinyMendiaManager.
It has a Post Processing feature, so I could update Kodi once I've added them there.
Seems I have my work cut out for me.

That said,
I'm baffled why this isn't available within Kodi itself in the places where it would be most useful.
Is this a technical barrier, or a design philosophy?
Reply
#6
no clue how it works but TMM has kodi functionality https://www.tinymediamanager.org/docs/kodi

-----
(2023-12-02, 23:48)akovia Wrote: Is this a technical barrier, or a design philosophy?

couldn't say, maybe just wasn't needed or nobody thought about adding it
Reply
#7
(2023-12-02, 03:47)izprtxqkft Wrote: i have to wonder why the json rpc fails on windows, i admit i never tried it with that, smb or local linux/android only
- bug?

good alternative with date sort

 Windows problem is dealing with "\" which needs to be properly escaped in python, json, and c++. All my attempts if I got through json parsing it only had a single "\" in the result string and c++ couldn't deal with it. I "think" I need to escape the "\" in what gets out of json "rapidJSON" parsing library (so get out a string with "\\" for every occurrence) but never achieved that.

scott s.
.
Reply

Logout Mark Read Team Forum Stats Members Help
Scan for new content0