Skip to content
This repository
Browse code

jsonrpc: fix bad if condition in CFooLibrary::FillFileItem

  • Loading branch information...
commit 80bb9b93db6a70762b7c05ed6b1e98451c9606bc 1 parent 52e2c69
Sascha Montellese authored July 15, 2013
6  xbmc/interfaces/json-rpc/AudioLibrary.cpp
@@ -587,9 +587,11 @@ bool CAudioLibrary::FillFileItem(const CStdString &strFilename, CFileItemPtr &it
587 587
   }
588 588
 
589 589
   if (item->GetLabel().empty())
  590
+  {
590 591
     item->SetLabel(CUtil::GetTitleFromPath(strFilename, false));
591  
-  if (item->GetLabel())
592  
-    item->SetLabel(URIUtils::GetFileName(strFilename));
  592
+    if (item->GetLabel().empty())
  593
+      item->SetLabel(URIUtils::GetFileName(strFilename));
  594
+  }
593 595
 
594 596
   return true;
595 597
 }
6  xbmc/interfaces/json-rpc/VideoLibrary.cpp
@@ -700,9 +700,11 @@ bool CVideoLibrary::FillFileItem(const CStdString &strFilename, CFileItemPtr &it
700 700
 
701 701
   item->SetFromVideoInfoTag(details);
702 702
   if (item->GetLabel().empty())
  703
+  {
703 704
     item->SetLabel(CUtil::GetTitleFromPath(strFilename, false));
704  
-  if (item->GetLabel())
705  
-    item->SetLabel(URIUtils::GetFileName(strFilename));
  705
+    if (item->GetLabel().empty())
  706
+      item->SetLabel(URIUtils::GetFileName(strFilename));
  707
+  }
706 708
   return true;
707 709
 }
708 710
 

0 notes on commit 80bb9b9

Please sign in to comment.
Something went wrong with that request. Please try again.