aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArne Morten Kvarving <spiff@kodi.tv>2024-06-30 15:55:53 +0200
committerArne Morten Kvarving <spiff@kodi.tv>2024-06-30 17:55:49 +0200
commitd3f3373dc9b430dc3e81c7caeed42c5c344b1731 (patch)
treee77253b4780df0ac81ebf3ab9794e33378ab5b21
parentafeb7e56f81c544422f665782c299f610ce5b68d (diff)
drop str prefix for string variables
-rw-r--r--xbmc/utils/ArtUtils.cpp42
1 files changed, 21 insertions, 21 deletions
diff --git a/xbmc/utils/ArtUtils.cpp b/xbmc/utils/ArtUtils.cpp
index 46251a1480..c76192956e 100644
--- a/xbmc/utils/ArtUtils.cpp
+++ b/xbmc/utils/ArtUtils.cpp
@@ -24,42 +24,42 @@ namespace KODI::ART
std::string GetTBNFile(const CFileItem& item)
{
std::string thumbFile;
- std::string strFile = item.GetPath();
+ std::string file = item.GetPath();
if (item.IsStack())
{
- std::string strPath, strReturn;
- URIUtils::GetParentPath(item.GetPath(), strPath);
- CFileItem item(CStackDirectory::GetFirstStackedFile(strFile), false);
- std::string strTBNFile = GetTBNFile(item);
- strReturn = URIUtils::AddFileToFolder(strPath, URIUtils::GetFileName(strTBNFile));
- if (CFile::Exists(strReturn))
- return strReturn;
+ std::string path, returnPath;
+ URIUtils::GetParentPath(item.GetPath(), path);
+ CFileItem item(CStackDirectory::GetFirstStackedFile(file), false);
+ const std::string TBNFile = GetTBNFile(item);
+ returnPath = URIUtils::AddFileToFolder(path, URIUtils::GetFileName(TBNFile));
+ if (CFile::Exists(returnPath))
+ return returnPath;
- strFile = URIUtils::AddFileToFolder(
- strPath, URIUtils::GetFileName(CStackDirectory::GetStackedTitlePath(strFile)));
+ const std::string& stackPath = CStackDirectory::GetStackedTitlePath(file);
+ file = URIUtils::AddFileToFolder(path, URIUtils::GetFileName(stackPath));
}
- if (URIUtils::IsInRAR(strFile) || URIUtils::IsInZIP(strFile))
+ if (URIUtils::IsInRAR(file) || URIUtils::IsInZIP(file))
{
- std::string strPath = URIUtils::GetDirectory(strFile);
- std::string strParent;
- URIUtils::GetParentPath(strPath, strParent);
- strFile = URIUtils::AddFileToFolder(strParent, URIUtils::GetFileName(item.GetPath()));
+ const std::string path = URIUtils::GetDirectory(file);
+ std::string parent;
+ URIUtils::GetParentPath(path, parent);
+ file = URIUtils::AddFileToFolder(parent, URIUtils::GetFileName(item.GetPath()));
}
- CURL url(strFile);
- strFile = url.GetFileName();
+ CURL url(file);
+ file = url.GetFileName();
if (item.m_bIsFolder && !item.IsFileFolder())
- URIUtils::RemoveSlashAtEnd(strFile);
+ URIUtils::RemoveSlashAtEnd(file);
- if (!strFile.empty())
+ if (!file.empty())
{
if (item.m_bIsFolder && !item.IsFileFolder())
- thumbFile = strFile + ".tbn"; // folder, so just add ".tbn"
+ thumbFile = file + ".tbn"; // folder, so just add ".tbn"
else
- thumbFile = URIUtils::ReplaceExtension(strFile, ".tbn");
+ thumbFile = URIUtils::ReplaceExtension(file, ".tbn");
url.SetFileName(thumbFile);
thumbFile = url.Get();
}