From 0747b743a62eb24364c91fba3fa4a10a135e5cf4 Mon Sep 17 00:00:00 2001 From: montellese Date: Fri, 8 Aug 2014 21:47:54 +0200 Subject: upnp: fix year property --- xbmc/network/upnp/UPnPInternal.cpp | 8 ++++---- 1 file 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(); -- cgit v1.2.3