Not sure if this is a bug, or if i'm misunderstanding something, so i would appreciate if someone could confirm this.
The issue is it looks like GetTVShows and GetTVShowDetails return inconsistent information in "watchedepisodes". GetTVShows returns the correct number, whereas GetTVShowDetails always returns 0 (AFAICT).
A GetTVShows request:
Code:
{ "id" : 203,
"jsonrpc" : "2.0",
"method" : "VideoLibrary.GetTVShows",
"params" : { "properties" : [
"episode",
"playcount",
"watchedepisodes"
] }
}
Returns:
Code:
{ "id" : 203,
"jsonrpc" : "2.0",
"result" : { "limits" : { "end" : 1,
"start" : 0,
"total" : 1
},
"tvshows" : [ {
"episode" : 4,
"label" : "Falling Skies",
"playcount" : 0,
"tvshowid" : 1,
"watchedepisodes" : 2
} ]
}
}
GetTVShowDetails request:
Code:
{ "id" : 203,
"jsonrpc" : "2.0",
"method" : "VideoLibrary.GetTVShowDetails",
"params" : { "properties" : [
"episode",
"playcount",
"watchedepisodes"
],
"tvshowid" : 1
}
}
Returns:
Code:
{ "id" : 203,
"jsonrpc" : "2.0",
"result" : { "tvshowdetails" : {
"episode" : 4,
"label" : "Falling Skies",
"playcount" : 0,
"tvshowid" : 1,
"watchedepisodes" : 0
} }
}
"watchedepisodes" should be 2, but it is always 0 in GetTVShowDetails. GetTVShows reports the correct number.
It might be linked to this issue:
http://trac.xbmc.org/ticket/14703
As i understand, in the code, playcount is used as a marker for the number of episodes watched, which is assigned to "watchedepisodes", and them set to 0/1 depending on whether all episodes where watched or not, but i can't find where the inconsistency between GetTVShows and GetTVShowDetails comes from.
Thanks