Permalink
Browse files

switch CFileItem::m_strPath to private, and add GetPath/SetPath for a…

…ccess
  • Loading branch information...
1 parent fc785d4 commit 6d27f0fc4db267636bf108e9407d55c0e01a867b Jonathan Marshall committed Aug 7, 2011
Showing with 1,311 additions and 1,275 deletions.
  1. +31 −31 xbmc/Application.cpp
  2. +2 −4 xbmc/ApplicationMessenger.cpp
  3. +11 −11 xbmc/Autorun.cpp
  4. +1 −1 xbmc/BackgroundInfoLoader.cpp
  5. +2 −2 xbmc/CueDocument.cpp
  6. +8 −8 xbmc/Favourites.cpp
  7. +41 −43 xbmc/FileItem.cpp
  8. +5 −1 xbmc/FileItem.h
  9. +19 −19 xbmc/GUIInfoManager.cpp
  10. +1 −1 xbmc/GUIViewControl.cpp
  11. +4 −4 xbmc/GUIViewState.cpp
  12. +1 −1 xbmc/PartyModeManager.cpp
  13. +2 −2 xbmc/PlayListPlayer.cpp
  14. +2 −2 xbmc/SortFileItem.cpp
  15. +7 −7 xbmc/ThumbLoader.cpp
  16. +3 −3 xbmc/ThumbnailCache.cpp
  17. +3 −3 xbmc/URL.cpp
  18. +15 −15 xbmc/Util.cpp
  19. +2 −2 xbmc/addons/AddonInstaller.cpp
  20. +1 −1 xbmc/addons/GUIDialogAddonInfo.cpp
  21. +2 −2 xbmc/addons/GUIViewStateAddonBrowser.cpp
  22. +9 −9 xbmc/addons/GUIWindowAddonBrowser.cpp
  23. +1 −1 xbmc/addons/Scraper.cpp
  24. +7 −7 xbmc/cdrip/CDDARipper.cpp
  25. +1 −1 xbmc/cores/ExternalPlayer/ExternalPlayer.cpp
  26. +1 −1 xbmc/cores/dvdplayer/DVDFileInfo.cpp
  27. +1 −1 xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamHTSP.cpp
  28. +3 −3 xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamStack.cpp
  29. +2 −2 xbmc/cores/dvdplayer/DVDPlayer.cpp
  30. +3 −3 xbmc/cores/paplayer/AudioDecoder.cpp
  31. +4 −4 xbmc/cores/paplayer/PAPlayer.cpp
  32. +3 −3 xbmc/cores/playercorefactory/PlayerCoreFactory.cpp
  33. +2 −2 xbmc/cores/playercorefactory/PlayerSelectionRule.cpp
  34. +6 −6 xbmc/dialogs/GUIDialogContextMenu.cpp
  35. +1 −1 xbmc/dialogs/GUIDialogFavourites.cpp
  36. +40 −40 xbmc/dialogs/GUIDialogFileBrowser.cpp
  37. +1 −1 xbmc/dialogs/GUIDialogFileBrowser.h
  38. +12 −10 xbmc/dialogs/GUIDialogMediaSource.cpp
  39. +3 −3 xbmc/dialogs/GUIDialogPlayEject.cpp
  40. +4 −4 xbmc/filesystem/AddonsDirectory.cpp
  41. +4 −2 xbmc/filesystem/CDDADirectory.cpp
  42. +13 −10 xbmc/filesystem/DAAPDirectory.cpp
  43. +10 −8 xbmc/filesystem/DAVDirectory.cpp
  44. +5 −5 xbmc/filesystem/Directory.cpp
  45. +4 −4 xbmc/filesystem/FTPDirectory.cpp
  46. +2 −2 xbmc/filesystem/FactoryFileDirectory.cpp
  47. +1 −2 xbmc/filesystem/FileSFTP.cpp
  48. +4 −5 xbmc/filesystem/HDDirectory.cpp
  49. +3 −2 xbmc/filesystem/HDHomeRun.cpp
  50. +3 −3 xbmc/filesystem/HTSPDirectory.cpp
  51. +2 −2 xbmc/filesystem/HTSPSession.cpp
  52. +4 −4 xbmc/filesystem/HTTPDirectory.cpp
  53. +4 −5 xbmc/filesystem/ISO9660Directory.cpp
  54. +2 −2 xbmc/filesystem/LastFMDirectory.cpp
  55. +5 −5 xbmc/filesystem/MultiPathDirectory.cpp
  56. +4 −4 xbmc/filesystem/MusicDatabaseDirectory.cpp
  57. +4 −4 xbmc/filesystem/MusicDatabaseDirectory/DirectoryNode.cpp
  58. +1 −1 xbmc/filesystem/MusicDatabaseDirectory/DirectoryNodeOverview.cpp
  59. +1 −1 xbmc/filesystem/MusicDatabaseDirectory/DirectoryNodeTop100.cpp
  60. +2 −1 xbmc/filesystem/MusicFileDirectory.cpp
  61. +1 −1 xbmc/filesystem/MusicSearchDirectory.cpp
  62. +2 −2 xbmc/filesystem/MythSession.cpp
  63. +9 −6 xbmc/filesystem/NFSDirectory.cpp
  64. +3 −3 xbmc/filesystem/PluginDirectory.cpp
  65. +5 −5 xbmc/filesystem/RSSDirectory.cpp
  66. +3 −3 xbmc/filesystem/RTVDirectory.cpp
  67. +1 −1 xbmc/filesystem/RarDirectory.cpp
  68. +4 −6 xbmc/filesystem/RarManager.cpp
  69. +1 −1 xbmc/filesystem/SAPDirectory.cpp
  70. +6 −5 xbmc/filesystem/SMBDirectory.cpp
  71. +1 −1 xbmc/filesystem/SmartPlaylistDirectory.cpp
  72. +7 −7 xbmc/filesystem/SourcesDirectory.cpp
  73. +3 −3 xbmc/filesystem/SpecialProtocolDirectory.cpp
  74. +6 −6 xbmc/filesystem/StackDirectory.cpp
  75. +4 −5 xbmc/filesystem/UDFDirectory.cpp
  76. +5 −5 xbmc/filesystem/UPnPDirectory.cpp
  77. +2 −1 xbmc/filesystem/VTPDirectory.cpp
  78. +4 −4 xbmc/filesystem/VideoDatabaseDirectory.cpp
  79. +2 −2 xbmc/filesystem/VideoDatabaseDirectory/DirectoryNode.cpp
  80. +1 −1 xbmc/filesystem/VideoDatabaseDirectory/DirectoryNodeMusicVideosOverview.cpp
  81. +1 −1 xbmc/filesystem/VideoDatabaseDirectory/DirectoryNodeSeasons.cpp
  82. +1 −1 xbmc/filesystem/VideoDatabaseDirectory/DirectoryNodeTvShowsOverview.cpp
  83. +1 −1 xbmc/filesystem/VirtualDirectory.cpp
  84. +2 −2 xbmc/filesystem/ZeroconfDirectory.cpp
  85. +4 −3 xbmc/filesystem/ZipDirectory.cpp
  86. +1 −1 xbmc/guilib/GUIBaseContainer.cpp
  87. +1 −1 xbmc/guilib/GUIMultiImage.cpp
  88. +6 −4 xbmc/guilib/GUIStaticItem.cpp
  89. +1 −1 xbmc/input/ButtonTranslator.cpp
  90. +3 −3 xbmc/interfaces/Builtins.cpp
  91. +42 −42 xbmc/interfaces/http-api/XBMChttp.cpp
  92. +7 −3 xbmc/interfaces/json-rpc/FileItemHandler.cpp
  93. +9 −9 xbmc/interfaces/json-rpc/FileOperations.cpp
  94. +2 −1 xbmc/interfaces/json-rpc/VideoLibrary.cpp
  95. +3 −3 xbmc/interfaces/python/xbmcmodule/listitem.cpp
  96. +2 −2 xbmc/interfaces/python/xbmcmodule/player.cpp
  97. +5 −5 xbmc/interfaces/python/xbmcmodule/pyplaylist.cpp
  98. +2 −2 xbmc/interfaces/python/xbmcmodule/xbmcplugin.cpp
  99. +27 −27 xbmc/music/GUIViewStateMusic.cpp
  100. +2 −2 xbmc/music/LastFmManager.cpp
  101. +7 −6 xbmc/music/MusicDatabase.cpp
  102. +9 −9 xbmc/music/MusicInfoLoader.cpp
  103. +5 −3 xbmc/music/dialogs/GUIDialogSongInfo.cpp
  104. +18 −18 xbmc/music/infoscanner/MusicInfoScanner.cpp
  105. +2 −2 xbmc/music/karaoke/karaokewindowbackground.cpp
  106. +33 −33 xbmc/music/windows/GUIWindowMusicBase.cpp
  107. +48 −46 xbmc/music/windows/GUIWindowMusicNav.cpp
  108. +12 −12 xbmc/music/windows/GUIWindowMusicPlaylist.cpp
  109. +3 −3 xbmc/music/windows/GUIWindowMusicPlaylistEditor.cpp
  110. +18 −18 xbmc/music/windows/GUIWindowMusicSongs.cpp
  111. +12 −12 xbmc/network/UPnP.cpp
  112. +2 −2 xbmc/pictures/GUIDialogPictureInfo.cpp
  113. +2 −2 xbmc/pictures/GUIViewStatePictures.cpp
  114. +14 −14 xbmc/pictures/GUIWindowPictures.cpp
  115. +17 −17 xbmc/pictures/GUIWindowSlideShow.cpp
  116. +3 −3 xbmc/pictures/PictureInfoLoader.cpp
  117. +15 −15 xbmc/pictures/PictureThumbLoader.cpp
  118. +8 −8 xbmc/playlists/PlayList.cpp
  119. +2 −2 xbmc/playlists/PlayListB4S.cpp
  120. +2 −2 xbmc/playlists/PlayListFactory.cpp
  121. +1 −1 xbmc/playlists/PlayListM3U.cpp
  122. +6 −6 xbmc/playlists/PlayListPLS.cpp
  123. +2 −2 xbmc/playlists/PlayListWPL.cpp
  124. +2 −2 xbmc/playlists/PlayListXML.cpp
  125. +2 −2 xbmc/programs/GUIViewStatePrograms.cpp
  126. +6 −6 xbmc/programs/GUIWindowPrograms.cpp
  127. +8 −8 xbmc/programs/ProgramDatabase.cpp
  128. +1 −1 xbmc/settings/AppParamParser.cpp
  129. +3 −3 xbmc/settings/GUIDialogContentSettings.cpp
  130. +0 −2 xbmc/settings/GUIWindowSettingsProfile.cpp
  131. +1 −1 xbmc/settings/Settings.cpp
  132. +7 −7 xbmc/utils/FileOperationJob.cpp
  133. +1 −1 xbmc/utils/FileUtils.cpp
  134. +3 −3 xbmc/utils/LabelFormatter.cpp
  135. +2 −2 xbmc/utils/SaveFileStateJob.h
  136. +11 −11 xbmc/utils/TuxBoxUtil.cpp
  137. +5 −5 xbmc/utils/URIUtils.cpp
  138. +28 −28 xbmc/video/GUIViewStateVideo.cpp
  139. +64 −54 xbmc/video/VideoDatabase.cpp
  140. +75 −74 xbmc/video/VideoInfoScanner.cpp
  141. +3 −3 xbmc/video/dialogs/GUIDialogAudioSubtitleSettings.cpp
  142. +7 −7 xbmc/video/dialogs/GUIDialogVideoInfo.cpp
  143. +85 −82 xbmc/video/windows/GUIWindowVideoBase.cpp
  144. +62 −62 xbmc/video/windows/GUIWindowVideoNav.cpp
  145. +7 −7 xbmc/video/windows/GUIWindowVideoPlaylist.cpp
  146. +7 −10 xbmc/win32/WINSMBDirectory.cpp
  147. +76 −73 xbmc/windows/GUIMediaWindow.cpp
  148. +1 −1 xbmc/windows/GUIMediaWindow.h
  149. +66 −65 xbmc/windows/GUIWindowFileManager.cpp
View
@@ -527,7 +527,7 @@ bool CApplication::Create()
CFileItemList items;
CUtil::GetRecursiveListing("special://xbmc/userdata",items,"");
for (int i=0;i<items.Size();++i)
- CFile::Cache(items[i]->m_strPath,"special://masterprofile/"+URIUtils::GetFileName(items[i]->m_strPath));
+ CFile::Cache(items[i]->GetPath(),"special://masterprofile/"+URIUtils::GetFileName(items[i]->GetPath()));
}
g_settings.m_logFolder = "special://masterprofile/";
}
@@ -1738,13 +1738,13 @@ bool CApplication::LoadUserWindows()
{
if (items[i]->m_bIsFolder)
continue;
- CStdString skinFile = URIUtils::GetFileName(items[i]->m_strPath);
+ CStdString skinFile = URIUtils::GetFileName(items[i]->GetPath());
if (skinFile.Left(6).CompareNoCase("custom") == 0)
{
TiXmlDocument xmlDoc;
- if (!xmlDoc.LoadFile(items[i]->m_strPath))
+ if (!xmlDoc.LoadFile(items[i]->GetPath()))
{
- CLog::Log(LOGERROR, "unable to load:%s, Line %d\n%s", items[i]->m_strPath.c_str(), xmlDoc.ErrorRow(), xmlDoc.ErrorDesc());
+ CLog::Log(LOGERROR, "unable to load:%s, Line %d\n%s", items[i]->GetPath().c_str(), xmlDoc.ErrorRow(), xmlDoc.ErrorDesc());
continue;
}
@@ -2334,7 +2334,7 @@ bool CApplication::OnAction(const CAction &action)
CMusicDatabase db;
if (db.Open()) // OpenForWrite() ?
{
- db.SetSongRating(m_itemCurrentFile->m_strPath, m_itemCurrentFile->GetMusicInfoTag()->GetRating());
+ db.SetSongRating(m_itemCurrentFile->GetPath(), m_itemCurrentFile->GetMusicInfoTag()->GetRating());
db.Close();
}
// send a message to all windows to tell them to update the fileitem (eg playlistplayer, media windows)
@@ -3303,11 +3303,11 @@ bool CApplication::PlayMedia(const CFileItem& item, int iPlaylist)
{
CDirectory dir;
CFileItemList items;
- if (dir.GetDirectory(item.m_strPath, items) && items.Size())
+ if (dir.GetDirectory(item.GetPath(), items) && items.Size())
{
CSmartPlaylist smartpl;
//get name and type of smartplaylist, this will always succeed as GetDirectory also did this.
- smartpl.OpenAndReadName(item.m_strPath);
+ smartpl.OpenAndReadName(item.GetPath());
CPlayList playlist;
playlist.Add(items);
return ProcessAndStartPlaylist(smartpl.GetName(), playlist, (smartpl.GetType() == "songs" || smartpl.GetType() == "albums") ? PLAYLIST_MUSIC:PLAYLIST_VIDEO);
@@ -3319,7 +3319,7 @@ bool CApplication::PlayMedia(const CFileItem& item, int iPlaylist)
//is or could be a playlist
auto_ptr<CPlayList> pPlayList (CPlayListFactory::Create(item));
- bool gotPlayList = (pPlayList.get() && pPlayList->Load(item.m_strPath));
+ bool gotPlayList = (pPlayList.get() && pPlayList->Load(item.GetPath()));
if (dlgCache)
{
@@ -3332,10 +3332,10 @@ bool CApplication::PlayMedia(const CFileItem& item, int iPlaylist)
{
if (iPlaylist != PLAYLIST_NONE)
- return ProcessAndStartPlaylist(item.m_strPath, *pPlayList, iPlaylist);
+ return ProcessAndStartPlaylist(item.GetPath(), *pPlayList, iPlaylist);
else
{
- CLog::Log(LOGWARNING, "CApplication::PlayMedia called to play a playlist %s but no idea which playlist to use, playing first item", item.m_strPath.c_str());
+ CLog::Log(LOGWARNING, "CApplication::PlayMedia called to play a playlist %s but no idea which playlist to use, playing first item", item.GetPath().c_str());
if(pPlayList->size())
return PlayFile(*(*pPlayList)[0], false);
}
@@ -3368,15 +3368,15 @@ bool CApplication::PlayStack(const CFileItem& item, bool bRestart)
CVideoDatabase dbs;
if (dbs.Open())
{
- dbs.GetVideoSettings(item.m_strPath, g_settings.m_currentVideoSettings);
- haveTimes = dbs.GetStackTimes(item.m_strPath, times);
+ dbs.GetVideoSettings(item.GetPath(), g_settings.m_currentVideoSettings);
+ haveTimes = dbs.GetStackTimes(item.GetPath(), times);
dbs.Close();
}
// calculate the total time of the stack
CStackDirectory dir;
- dir.GetDirectory(item.m_strPath, *m_currentStack);
+ dir.GetDirectory(item.GetPath(), *m_currentStack);
long totalTime = 0;
for (int i = 0; i < m_currentStack->Size(); i++)
{
@@ -3385,7 +3385,7 @@ bool CApplication::PlayStack(const CFileItem& item, bool bRestart)
else
{
int duration;
- if (!CDVDFileInfo::GetFileDuration((*m_currentStack)[i]->m_strPath, duration))
+ if (!CDVDFileInfo::GetFileDuration((*m_currentStack)[i]->GetPath(), duration))
{
m_currentStack->Clear();
return false;
@@ -3403,13 +3403,13 @@ bool CApplication::PlayStack(const CFileItem& item, bool bRestart)
if (dbs.Open())
{
if( !haveTimes )
- dbs.SetStackTimes(item.m_strPath, times);
+ dbs.SetStackTimes(item.GetPath(), times);
if( item.m_lStartOffset == STARTOFFSET_RESUME )
{
// can only resume seek here, not dvdstate
CBookmark bookmark;
- if( dbs.GetResumeBookMark(item.m_strPath, bookmark) )
+ if( dbs.GetResumeBookMark(item.GetPath(), bookmark) )
seconds = bookmark.timeInSeconds;
else
seconds = 0.0f;
@@ -3478,15 +3478,15 @@ bool CApplication::PlayFile(const CFileItem& item, bool bRestart)
if (item.IsPlugin())
{ // we modify the item so that it becomes a real URL
CFileItem item_new(item);
- if (XFILE::CPluginDirectory::GetPluginResult(item.m_strPath, item_new))
+ if (XFILE::CPluginDirectory::GetPluginResult(item.GetPath(), item_new))
return PlayFile(item_new, false);
return false;
}
- if (URIUtils::IsUPnP(item.m_strPath))
+ if (URIUtils::IsUPnP(item.GetPath()))
{
CFileItem item_new(item);
- if (XFILE::CUPnPDirectory::GetResource(item.m_strPath, item_new))
+ if (XFILE::CUPnPDirectory::GetResource(item.GetPath(), item_new))
return PlayFile(item_new, false);
return false;
}
@@ -3500,7 +3500,7 @@ bool CApplication::PlayFile(const CFileItem& item, bool bRestart)
//Is TuxBox, this should probably be moved to CFileTuxBox
if(item.IsTuxBox())
{
- CLog::Log(LOGDEBUG, "%s - TuxBox URL Detected %s",__FUNCTION__, item.m_strPath.c_str());
+ CLog::Log(LOGDEBUG, "%s - TuxBox URL Detected %s",__FUNCTION__, item.GetPath().c_str());
if(g_tuxboxService.IsRunning())
g_tuxboxService.Stop();
@@ -3550,13 +3550,13 @@ bool CApplication::PlayFile(const CFileItem& item, bool bRestart)
// open the d/b and retrieve the bookmarks for the current movie
CVideoDatabase dbs;
dbs.Open();
- dbs.GetVideoSettings(item.m_strPath, g_settings.m_currentVideoSettings);
+ dbs.GetVideoSettings(item.GetPath(), g_settings.m_currentVideoSettings);
if( item.m_lStartOffset == STARTOFFSET_RESUME )
{
options.starttime = 0.0f;
CBookmark bookmark;
- CStdString path = item.m_strPath;
+ CStdString path = item.GetPath();
if (item.IsDVD())
path = item.GetVideoInfoTag()->m_strFileNameAndPath;
if(dbs.GetResumeBookMark(path, bookmark))
@@ -3656,7 +3656,7 @@ bool CApplication::PlayFile(const CFileItem& item, bool bRestart)
}
else
{
- CLog::Log(LOGERROR, "Error creating player for item %s (File doesn't exist?)", item.m_strPath.c_str());
+ CLog::Log(LOGERROR, "Error creating player for item %s (File doesn't exist?)", item.GetPath().c_str());
bResult = false;
}
@@ -3986,7 +3986,7 @@ void CApplication::SaveFileState()
void CApplication::UpdateFileState()
{
// Did the file change?
- if (m_progressTrackingItem->m_strPath != "" && m_progressTrackingItem->m_strPath != CurrentFile())
+ if (m_progressTrackingItem->GetPath() != "" && m_progressTrackingItem->GetPath() != CurrentFile())
{
SaveFileState();
@@ -3997,7 +3997,7 @@ void CApplication::UpdateFileState()
{
if (IsPlayingVideo() || IsPlayingAudio())
{
- if (m_progressTrackingItem->m_strPath == "")
+ if (m_progressTrackingItem->GetPath() == "")
{
// Init some stuff
*m_progressTrackingItem = CurrentFileItem();
@@ -4389,14 +4389,14 @@ bool CApplication::OnMessage(CGUIMessage& message)
{
if (!m_itemCurrentFile->HasMusicInfoTag() || !m_itemCurrentFile->GetMusicInfoTag()->Loaded())
{
- IMusicInfoTagLoader* tagloader = CMusicInfoTagLoaderFactory::CreateLoader(m_itemCurrentFile->m_strPath);
- tagloader->Load(m_itemCurrentFile->m_strPath,*m_itemCurrentFile->GetMusicInfoTag());
+ IMusicInfoTagLoader* tagloader = CMusicInfoTagLoaderFactory::CreateLoader(m_itemCurrentFile->GetPath());
+ tagloader->Load(m_itemCurrentFile->GetPath(),*m_itemCurrentFile->GetMusicInfoTag());
delete tagloader;
}
m_pKaraokeMgr->Start(m_itemCurrentFile->GetMusicInfoTag()->GetURL());
}
else
- m_pKaraokeMgr->Start(m_itemCurrentFile->m_strPath);
+ m_pKaraokeMgr->Start(m_itemCurrentFile->GetPath());
}
#endif
// Let scrobbler know about the track
@@ -4563,7 +4563,7 @@ bool CApplication::ExecuteXBMCAction(std::string actionStr)
#ifdef HAS_PYTHON
if (item.IsPythonScript())
{ // a python script
- g_pythonParser.evalFile(item.m_strPath.c_str(),ADDON::AddonPtr());
+ g_pythonParser.evalFile(item.GetPath().c_str(),ADDON::AddonPtr());
}
else
#endif
@@ -4836,7 +4836,7 @@ void CApplication::Restart(bool bSamePosition)
const CStdString& CApplication::CurrentFile()
{
- return m_itemCurrentFile->m_strPath;
+ return m_itemCurrentFile->GetPath();
}
CFileItem& CApplication::CurrentFileItem()
@@ -5259,7 +5259,7 @@ void CApplication::SaveCurrentFileSettings()
{
CVideoDatabase dbs;
dbs.Open();
- dbs.SetVideoSettings(m_itemCurrentFile->m_strPath, g_settings.m_currentVideoSettings);
+ dbs.SetVideoSettings(m_itemCurrentFile->GetPath(), g_settings.m_currentVideoSettings);
dbs.Close();
}
}
@@ -364,7 +364,7 @@ case TMSG_POWERDOWN:
{
pSlideShow->Add(items[i].get());
}
- pSlideShow->Select(items[0]->m_strPath);
+ pSlideShow->Select(items[0]->GetPath());
}
}
else
@@ -798,9 +798,7 @@ void CApplicationMessenger::ExecBuiltIn(const CStdString &command, bool wait)
void CApplicationMessenger::MediaPlay(string filename)
{
- CFileItem item;
- item.m_strPath = filename;
- item.m_bIsFolder = false;
+ CFileItem item(filename, false);
if (item.IsAudio())
item.SetMusicThumb();
else
View
@@ -172,10 +172,10 @@ bool CAutorun::RunDisc(IDirectory* pDir, const CStdString& strDrive, int& nAdded
CFileItemPtr pItem = vecItems[i];
// is the current item a (non system) folder?
- if (pItem->m_bIsFolder && pItem->m_strPath != "." && pItem->m_strPath != "..")
+ if (pItem->m_bIsFolder && pItem->GetPath() != "." && pItem->GetPath() != "..")
{
// Check if the current foldername indicates a DVD structure (name is "VIDEO_TS")
- if (pItem->m_strPath.Find( "VIDEO_TS" ) != -1 && bAllowVideo
+ if (pItem->GetPath().Find( "VIDEO_TS" ) != -1 && bAllowVideo
&& (bypassSettings || g_guiSettings.GetBool("dvds.autorun")))
{
CUtil::PlayDVD("dvd", restart);
@@ -186,7 +186,7 @@ bool CAutorun::RunDisc(IDirectory* pDir, const CStdString& strDrive, int& nAdded
// Check if the current foldername indicates a Blu-Ray structure (default is "BDMV").
// A BR should also include an "AACS" folder for encryption, Sony-BRs can also include update folders for PS3 (PS3_UPDATE / PS3_VPRM).
// ToDo: for the time beeing, the DVD autorun settings are used to determine if the BR should be started automatically.
- if (pItem->m_strPath.Find( "BDMV" ) != -1 && bAllowVideo
+ if (pItem->GetPath().Find( "BDMV" ) != -1 && bAllowVideo
&& (bypassSettings || g_guiSettings.GetBool("dvds.autorun")))
{
CUtil::PlayDVD("bd", restart);
@@ -196,17 +196,17 @@ bool CAutorun::RunDisc(IDirectory* pDir, const CStdString& strDrive, int& nAdded
// Video CDs can have multiple file formats. First we need to determine which one is used on the CD
CStdString strExt;
- if (pItem->m_strPath.Find("MPEGAV") != -1)
+ if (pItem->GetPath().Find("MPEGAV") != -1)
strExt = ".dat";
- if (pItem->m_strPath.Find("MPEG2") != -1)
+ if (pItem->GetPath().Find("MPEG2") != -1)
strExt = ".mpg";
// If a file format was extracted we are sure this is a VCD. Autoplay if settings indicate we should.
if (!strExt.IsEmpty() && bAllowVideo
&& (bypassSettings || g_guiSettings.GetBool("dvds.autorun")))
{
CFileItemList items;
- CDirectory::GetDirectory(pItem->m_strPath, items, strExt);
+ CDirectory::GetDirectory(pItem->GetPath(), items, strExt);
if (items.Size())
{
items.Sort(SORT_METHOD_LABEL, SORT_ORDER_ASC);
@@ -219,12 +219,12 @@ bool CAutorun::RunDisc(IDirectory* pDir, const CStdString& strDrive, int& nAdded
}
}
/* Probably want this if/when we add some automedia action dialog...
- else if (pItem->m_strPath.Find("PICTURES") != -1 && bAllowPictures
+ else if (pItem->GetPath().Find("PICTURES") != -1 && bAllowPictures
&& (bypassSettings))
{
bPlaying = true;
CStdString strExec;
- strExec.Format("XBMC.RecursiveSlideShow(%s)", pItem->m_strPath.c_str());
+ strExec.Format("XBMC.RecursiveSlideShow(%s)", pItem->GetPath().c_str());
CBuiltins::Execute(strExec);
return true;
}
@@ -254,7 +254,7 @@ bool CAutorun::RunDisc(IDirectory* pDir, const CStdString& strDrive, int& nAdded
// TODO: remove this once the app/player is capable of handling stacks immediately
CStackDirectory dir;
CFileItemList items;
- dir.GetDirectory(pItem->m_strPath, items);
+ dir.GetDirectory(pItem->GetPath(), items);
itemlist.Append(items);
}
else
@@ -318,9 +318,9 @@ bool CAutorun::RunDisc(IDirectory* pDir, const CStdString& strDrive, int& nAdded
CFileItemPtr pItem = vecItems[i];
if (pItem->m_bIsFolder)
{
- if (pItem->m_strPath != "." && pItem->m_strPath != ".." )
+ if (pItem->GetPath() != "." && pItem->GetPath() != ".." )
{
- if (RunDisc(pDir, pItem->m_strPath, nAddedToPlaylist, false, bypassSettings, restart))
+ if (RunDisc(pDir, pItem->GetPath(), nAddedToPlaylist, false, bypassSettings, restart))
{
bPlaying = true;
break;
@@ -91,7 +91,7 @@ void CBackgroundInfoLoader::Run()
}
catch (...)
{
- CLog::Log(LOGERROR, "%s::LoadItem - Unhandled exception for item %s", __FUNCTION__, pItem->m_strPath.c_str());
+ CLog::Log(LOGERROR, "%s::LoadItem - Unhandled exception for item %s", __FUNCTION__, pItem->GetPath().c_str());
}
}
}
@@ -376,9 +376,9 @@ bool CCueDocument::ResolvePath(CStdString &strPath, const CStdString &strBase)
CDirectory::GetDirectory(strDirectory,items);
for (int i=0;i<items.Size();++i)
{
- if (items[i]->m_strPath.Equals(strPath))
+ if (items[i]->GetPath().Equals(strPath))
{
- strPath = items[i]->m_strPath;
+ strPath = items[i]->GetPath();
return true;
}
}
Oops, something went wrong.

0 comments on commit 6d27f0f

Please sign in to comment.