Bug VideoLibrary commands - inconsistent return values
#1
I have found what appears to be an inconsistency in the inplementation of one of the VideoLibrary calls.

GetTVShows, GetEpisodes, GetSeasons all work correctly with start and end parameters set, allowing you to select a range of shows. GetInProgressTVShows , even with correct settings for start and end set, shows all current in progress shows, not the ones specified - see examples below.

Does anyone know where this problem should be directed to get someone from the programming team to look into this with a view to fixing it?

{"jsonrpc":"2.0","method":"VideoLibrary.GetTVShows","params":{"limits":{"end":1,"start":0}},"id":2}

{
    "limits": {
        "end": 1,
        "start": 0,
        "total": 276
    },
    "tvshows": [
        {
            "label": "Lexx",
            "tvshowid": 5
        }
    ]
}

{"jsonrpc":"2.0","method":"VideoLibrary.GetInProgressTVShows","params":{"limits":{"end":1,"start":0}},"id":3}

{
    "limits": {
        "end": 1,
        "start": 0,
        "total": 4
    },
    "tvshows": [
        {
            "label": "Absentia",
            "tvshowid": 676
        },
        {
            "label": "Almost Human",
            "tvshowid": 644
        },
        {
            "label": "Eureka",
            "tvshowid": 677
        },
        {
            "label": "Krypton",
            "tvshowid": 621
        }
    ]
}

{"jsonrpc":"2.0","method":"VideoLibrary.GetEpisodes","params":{"tvshowid":5,"season":1,"limits":{"end":2,"start":0}},"id":4}

{
    "episodes": [
        {
            "episodeid": 41,
            "label": "1x01. I Worship His Shadow"
        },
        {
            "episodeid": 42,
            "label": "1x02. Super Nova"
        }
    ],
    "limits": {
        "end": 2,
        "start": 0,
        "total": 4
    }
}

{"jsonrpc":"2.0","method":"VideoLibrary.GetSeasons","params":{"tvshowid":5,"limits":{"end":1,"start":0}},"id":5}

{
    "limits": {
        "end": 1,
        "start": 0,
        "total": 4
    },
    "seasons": [
        {
            "label": "Season 1",
            "seasonid": 20
        }
    ]
}
Reply
#2
Not sure if it will help, however for consistency, you should set sort order.
https://kodi.wiki/view/JSON-RPC_API/v12#List.Sort
Image Lunatixz - Kodi / Beta repository
Image PseudoTV - Forum | Website | Youtube | Help?
Reply
#3
(2020-08-12, 16:49)Lunatixz Wrote: Not sure if it will help, however for consistency, you should set sort order.
https://kodi.wiki/view/JSON-RPC_API/v12#List.Sort
Thanks for the suggestion, but I had tried that and it made no difference Sad
Reply
#4
A quick look at the code suggests that GetInProgressTVShows does just that, it fetches all the in progress shows.  Not really sure why you might want to limit that to a subset but you can just filter the results returned from that call.
Learning Linux the hard way !!
Reply
#5
(2020-08-13, 10:09)black_eagle Wrote: A quick look at the code suggests that GetInProgressTVShows does just that, it fetches all the in progress shows.  Not really sure why you might want to limit that to a subset but you can just filter the results returned from that call.
The program I am using (DemoPad) only allows the use of RegEx to analyse returned results. It does not have the ability to process arrays. I need to able to return one result at a time and extract the information from it , then go on to the next. It seems illogical to me that all the other JSON calls I have illustrated do what they should, yet the GetInProgressTVShows has the start and end parameters as part of the syntax, but they are not implemented.
Reply
#6
The JSON request probably works with the limits included because it's valid json. However, those limits are not applied and looking at the routines called in the videodb, this particular function was never intended to apply any limits, simply return the complete list of in progress shows.  As regards how the code is currently written, it's returning exactly what it should.
Learning Linux the hard way !!
Reply
#7
(2020-08-13, 12:32)black_eagle Wrote: The JSON request probably works with the limits included because it's valid json. However, those limits are not applied and looking at the routines called in the videodb, this particular function was never intended to apply any limits, simply return the complete list of in progress shows.  As regards how the code is currently written, it's returning exactly what it should.

Thanks for looking at this and for the explanation. Is there any prospect that what I need could go onto a wish list? is the coding required likely to involve major work? I realise that with the work needed on the new release it would be some way off, but it would be appreciated if it could be considered.
Reply
#8
There is the feature request section of the forum (https://forum.kodi.tv/forumdisplay.php?fid=9) where you can make a request and explain why you feel that the change is needed.  Then you need someone to not only agree with it but also be willing to put in the time and effort to implement it.

The team are all volunteers and do this in our spare time so people tend to work on areas that interest them.  Probably the best way to get the code changed is to make the necessary changes yourself and then submit a PR to github.
Learning Linux the hard way !!
Reply
#9
(2020-08-14, 09:17)black_eagle Wrote: There is the feature request section of the forum (https://forum.kodi.tv/forumdisplay.php?fid=9) where you can make a request and explain why you feel that the change is needed.  Then you need someone to not only agree with it but also be willing to put in the time and effort to implement it.

The team are all volunteers and do this in our spare time so people tend to work on areas that interest them.  Probably the best way to get the code changed is to make the necessary changes yourself and then submit a PR to github.
Once again, thanks for your advice. I am afraid my programming skills are unlikely to be up to the task, so I will have to rely on the goodwill of others.
Reply

Logout Mark Read Team Forum Stats Members Help
VideoLibrary commands - inconsistent return values0