2017-02-20, 19:28
(2017-02-18, 12:37)schapplm Wrote: The only possibility for the WatchedList addon to recognize the media is for you to set the uniqueid-field in such a way, that the imdbnumber entry of the JSON-query is set.
You could for example
- set the id-field in the tvshow.nfo and rescrape or
- rescrape discarding the nfos or
- set the uniqueid manually in the video library (not in the view but in the database tables) (I would not recommend this).
OK. After reading all this again, I decided to try something. I deleted the blank <uniqueid></uniqueid> "line" from the tvshow.nfos, leaving the ones in my episode nfos intact.
Things worked from there.
The JSON-RPC query :
Code:
http://localhost:8080/jsonrpc?request={"jsonrpc": "2.0", "method": "VideoLibrary.GetTVShows", "params": {"properties": ["title", "imdbnumber"], "sort": { "order": "ascending", "method": "title" } }, "id": 1}
now gives expected results, with an imdbnumber that is set.
From what I understand (which might not be much) if you have a blank uniqueid tag set in your tvshow.nfos, kodi loads that tag as a blank value for the imdbnumber. If you do not have the uniqueid tag in your tvshow.nfos, kodi loads the ID tag as the imdbnumber. I may be wrong since I have no clue of the internal workings of any of this!
Now to edit all my NFOs....
For people running into the same thing as me, who can run a windows batch file on their nfos, can use this little batch file to remove the uniqueid tag from their tvshow.nfos. Just place in your collection root and run.
Code:
for /r %%G in (tvsho*.nfo) do if exist "%%~dpnG.nfo" (
rename "%%~dpnG.nfo" "%%~nG0123.nfo"
type "%%~dpnG0123.nfo" | findstr /v uniqueid > "%%~dpnG.nfo"
del "%%~dpnG0123.nfo" /q
)
BE ADVISED, if you have uniqueids set in your tvshow.nfos, they will be deleted. This batch will simply rewrite ALL the tvshow.nfo without the WHOLE line containing the string "uniqueid". I am aware that none of my tvshow.nfos have the uniqueid tag set to any value.
Disclaimer : I don't know if this is a "proper" solution for this problem (maybe schapplm can chime in), but it seems to work on my test setup. I have yet to try on my complete collection. I have only done so on a few shows to test its functionality.
Be careful when running automated stuff that edits stuff on many stuffs.
Use at own risk.
Always backup first!!
If anyone has anything to add or correct, please do so.
Thanks schapplm for this great addon that I can't live without!
CSC