diff options
author | montellese <montellese@xbmc.org> | 2014-08-08 21:47:54 +0200 |
---|---|---|
committer | montellese <montellese@xbmc.org> | 2014-08-08 21:48:42 +0200 |
commit | 0747b743a62eb24364c91fba3fa4a10a135e5cf4 (patch) | |
tree | 797f7982a9c4fb32da93c4a5bfb021a6af85bcf7 | |
parent | f1abe38f15e77bdf248435abb1e350b4e6984071 (diff) |
upnp: fix year property
-rw-r--r-- | xbmc/network/upnp/UPnPInternal.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/xbmc/network/upnp/UPnPInternal.cpp b/xbmc/network/upnp/UPnPInternal.cpp index 4a9ad63930..4cfdc500cb 100644 --- a/xbmc/network/upnp/UPnPInternal.cpp +++ b/xbmc/network/upnp/UPnPInternal.cpp @@ -274,12 +274,12 @@ PopulateObjectFromTag(CVideoInfoTag& tag, object.m_People.artists.Add(itArtist->c_str()); object.m_Affiliation.album = tag.m_strAlbum; object.m_Title = tag.m_strTitle; - object.m_Date = CDateTime(tag.m_iYear, 0, 0, 0, 0, 0).GetAsW3CDate().c_str(); + object.m_Date = CDateTime(tag.m_iYear, 1, 1, 0, 0, 0).GetAsW3CDate().c_str(); object.m_ReferenceID = NPT_String::Format("videodb://musicvideos/titles/%i", tag.m_iDbId); } else if (tag.m_type == MediaTypeMovie) { object.m_ObjectClass.type = "object.item.videoItem.movie"; object.m_Title = tag.m_strTitle; - object.m_Date = CDateTime(tag.m_iYear, 0, 0, 0, 0, 0).GetAsW3CDate().c_str(); + object.m_Date = CDateTime(tag.m_iYear, 1, 1, 0, 0, 0).GetAsW3CDate().c_str(); object.m_ReferenceID = NPT_String::Format("videodb://movies/titles/%i", tag.m_iDbId); } else { object.m_ObjectClass.type = "object.item.videoItem.videoBroadcast"; @@ -517,8 +517,8 @@ BuildObject(CFileItem& item, container->m_Recorded.episode_number = tag.m_iEpisode; container->m_MiscInfo.play_count = tag.m_playCount; container->m_Title = tag.m_strTitle; - if(!tag.m_premiered.IsValid() && tag.m_iYear) - container->m_Date = NPT_String::FromInteger(tag.m_iYear) + "-01-01"; + if (!tag.m_premiered.IsValid() && tag.m_iYear) + container->m_Date = CDateTime(tag.m_iYear, 1, 1, 0, 0, 0).GetAsW3CDateTime().c_str(); else container->m_Date = tag.m_premiered.GetAsW3CDate().c_str(); |