diff options
author | elupus <elupus@svn> | 2010-10-18 02:11:45 +0000 |
---|---|---|
committer | elupus <elupus@svn> | 2010-10-18 02:11:45 +0000 |
commit | 3d163c63c8a520d10716f5e95f9af074b68f75c1 (patch) | |
tree | f882d96603b52d64484845540a85249e7011e16a | |
parent | 5366b208d0bd43c7df45b6da7a4ad45448f99f4a (diff) |
fixed: #10415 setResolvedUrl didn't reset mimetype
git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk@34814 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
-rw-r--r-- | xbmc/FileItem.cpp | 4 | ||||
-rw-r--r-- | xbmc/FileItem.h | 2 | ||||
-rw-r--r-- | xbmc/FileSystem/PluginDirectory.cpp | 1 |
3 files changed, 4 insertions, 3 deletions
diff --git a/xbmc/FileItem.cpp b/xbmc/FileItem.cpp index fcef3a2728..8d85e4d279 100644 --- a/xbmc/FileItem.cpp +++ b/xbmc/FileItem.cpp @@ -1019,9 +1019,9 @@ bool CFileItem::IsParentFolder() const return m_bIsParentFolder; } -const CStdString& CFileItem::GetMimeType() const +const CStdString& CFileItem::GetMimeType(bool lookup /*= true*/) const { - if( m_mimetype.IsEmpty() ) + if( m_mimetype.IsEmpty() && lookup) { // discard const qualifyier CStdString& m_ref = (CStdString&)m_mimetype; diff --git a/xbmc/FileItem.h b/xbmc/FileItem.h index ed8cf41246..49253574f2 100644 --- a/xbmc/FileItem.h +++ b/xbmc/FileItem.h @@ -242,7 +242,7 @@ public: virtual bool LoadMusicTag(); /* returns the content type of this item if known. will lookup for http streams */ - const CStdString& GetMimeType() const; + const CStdString& GetMimeType(bool lookup = true) const; /* sets the mime-type if known beforehand */ void SetMimeType(const CStdString& mimetype) { m_mimetype = mimetype; } ; diff --git a/xbmc/FileSystem/PluginDirectory.cpp b/xbmc/FileSystem/PluginDirectory.cpp index f5039eb0d7..cd51999df7 100644 --- a/xbmc/FileSystem/PluginDirectory.cpp +++ b/xbmc/FileSystem/PluginDirectory.cpp @@ -146,6 +146,7 @@ bool CPluginDirectory::GetPluginResult(const CStdString& strPath, CFileItem &res if (!resultItem.HasProperty("original_listitem_url")) resultItem.SetProperty("original_listitem_url", resultItem.m_strPath); resultItem.m_strPath = newDir->m_fileResult->m_strPath; + resultItem.SetMimeType(newDir->m_fileResult->GetMimeType(false)); } delete newDir; |