![]() |
listitem setinfo date bug - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32) +--- Forum: Kodi Application (https://forum.kodi.tv/forumdisplay.php?fid=93) +--- Thread: listitem setinfo date bug (/showthread.php?tid=357061) |
listitem setinfo date bug - zachmorris - 2020-09-12 Hello, I believe I've found a bug, but wondering if this is expected or not, or if there's a workaround. I pass dates to Kodi listitems via a dictionary:
The docs state the format needs to be: date string (d.m.Y / 01.01.2009) - file date So I have a function that parses an unformatted date I get from outside sources:
The problem is, when I recieve garbage from my outside source, (for example date_in = 'blah'), then when I pass None to setinfo date the logs are spammed with:
Is there a value I can pass to setinfo that will both be valid and be "None"? Since I can't control the data I receive, I need to have a fallback value to be able to pass. Thanks in advance for any suggestions. RE: listitem setinfo date bug - ronie - 2020-09-13 can't you simply omit the date when it's invalid?
RE: listitem setinfo date bug - zachmorris - 2020-09-13 (2020-09-13, 00:13)ronie Wrote: can't you simply omit the date when it's invalid? Thanks. Yes I could do that, but from a coding standpoint, I pass all info tags in one dict: Where dict_in contains a bunch of info tags (roughly 20). This appears to be the only one that complains when it's passed None. RE: listitem setinfo date bug - ronie - 2020-09-13 looking at the source-code: https://github.com/xbmc/xbmc/blob/master/xbmc/interfaces/legacy/ListItem.cpp#L439-L450 kodi will only log the error if the date string isn't 10 characters long. so try to set it to 10 spaces:
|