Permalink
Browse files

Artists may not have an attribute if we're talking to an older PMS

  • Loading branch information...
1 parent 826d957 commit 89b5225d5f083a3e7735b0726f79991d1918a19e @elan elan committed Nov 25, 2008
Showing with 18 additions and 11 deletions.
  1. +18 −11 xbmc/FileSystem/PlexDirectory.cpp
@@ -185,17 +185,24 @@ class PlexMediaArtist : public PlexMediaNode
{
pItem->SetLabel(el.Attribute("artist"));
- string path = el.Attribute("thumb");
-
- CURL url(pItem->m_strPath);
- url.SetProtocol("http");
- url.SetFileName(path.substr(1));
- url.SetPort(32400);
-
- CStdString theURL;
- url.GetURL(theURL);
-
- pItem->SetThumbnailImage(theURL);
+ try
+ {
+ string path = el.Attribute("thumb");
+
+ CURL url(pItem->m_strPath);
+ url.SetProtocol("http");
+ url.SetFileName(path.substr(1));
+ url.SetPort(32400);
+
+ CStdString theURL;
+ url.GetURL(theURL);
+
+ pItem->SetThumbnailImage(theURL);
+ }
+ catch (...)
+ {
+
+ }
}
};

0 comments on commit 89b5225

Please sign in to comment.