xbmc/xbmc — pull request #4405 by Montellese (2014-03-12 22:48:39+00:00)
Title: JSON-RPC: fix resetting a datetime property through VideoLibrary.SetFooDetails

I've got a report on the forum that it's not possible to e.g. reset the "lastplayed" property of a movie to nothing (which may make sense when resetting playcount to 0, similar to "Mark unwatched"). I looked at the code and all properties stored in a CDateTime object are affected because CDateTime::SetFromDBDate()/SetFromDBDateTime() fails on an empty string. Therefore I have added some extra logic to reset the CDateTime object when the value of the property is provided as empty.

Furthermore I've removed the code to set playcount/lastplayed for tvshows through JSON-RPC because it doesn't make sense as CVideoDatabase::SetPlaycount operates on the files table which is not used for tvshows.