Skip to content

Commit

Permalink
Backport:
Browse files Browse the repository at this point in the history
r33281 changed: parse media:group entries in rss (will select the first available item)
r33282 changed: improve rss directory by always selecting the resource with highest bitrate or resolution
r33283 changed: always select the longest rss title
r33284 changed: if mimetype is set that is a more sure type than any video/audio/picture tags
r33285 added: method to set a listitems mimetype from python. allows plugins to avoid the http HEAD request done to look this up on playback
r33286 changed: make sure a rss resource selects content based in prio list video/audio/rss/image changed: if content is application/rss+xml and protocol is http:// replace protocol with rss:// since server may be silly and not return correct content type
r33287 added: parse SVT Play rss extensions rss continuation links

git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/branches/Dharma@33313 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
  • Loading branch information
elupus committed Aug 29, 2010
1 parent 157f9e9 commit bb4f82c
Show file tree
Hide file tree
Showing 3 changed files with 231 additions and 83 deletions.
22 changes: 11 additions & 11 deletions xbmc/FileItem.cpp
Expand Up @@ -456,14 +456,14 @@ bool CFileItem::Exists(bool bUseCache /* = true */) const

bool CFileItem::IsVideo() const
{
if (HasVideoInfoTag()) return true;
if (HasMusicInfoTag()) return false;
if (HasPictureInfoTag()) return false;

/* check preset mime type */
if( m_mimetype.Left(6).Equals("video/") )
return true;

if (HasVideoInfoTag()) return true;
if (HasMusicInfoTag()) return false;
if (HasPictureInfoTag()) return false;

if (IsHDHomeRun() || IsTuxBox() || CUtil::IsDVD(m_strPath))
return true;

Expand Down Expand Up @@ -492,16 +492,16 @@ bool CFileItem::IsVideo() const

bool CFileItem::IsAudio() const
{
/* check preset mime type */
if( m_mimetype.Left(6).Equals("audio/") )
return true;

if (HasMusicInfoTag()) return true;
if (HasVideoInfoTag()) return false;
if (HasPictureInfoTag()) return false;
if (IsCDDA()) return true;
if (!m_bIsFolder && IsLastFM()) return true;

/* check preset mime type */
if( m_mimetype.Left(6).Equals("audio/") )
return true;

CStdString extension;
if( m_mimetype.Left(12).Equals("application/") )
{ /* check for some standard types */
Expand Down Expand Up @@ -534,13 +534,13 @@ bool CFileItem::IsKaraoke() const

bool CFileItem::IsPicture() const
{
if( m_mimetype.Left(6).Equals("image/") )
return true;

if (HasPictureInfoTag()) return true;
if (HasMusicInfoTag()) return false;
if (HasVideoInfoTag()) return false;

if( m_mimetype.Left(6).Equals("image/") )
return true;

return CUtil::IsPicture(m_strPath);
}

Expand Down

0 comments on commit bb4f82c

Please sign in to comment.