aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorenen92 <92enen@gmail.com>2023-07-18 09:32:31 +0100
committerenen92 <92enen@gmail.com>2023-07-19 19:09:49 +0100
commit9e1d39956056253f1ee59c5a33f5fbe5cafba410 (patch)
treef3f658fe2e8096d7a96e2c3f5a2e3a605f0b1189
parent022ef38abf96bdf8e2834259e0c147a9ef1161bb (diff)
[discs] Rename HAS_DVD_DRIVE to HAS_OPTICAL_DRIVE
-rw-r--r--CMakeLists.txt2
-rw-r--r--xbmc/Autorun.cpp2
-rw-r--r--xbmc/Autorun.h2
-rw-r--r--xbmc/ContextMenus.cpp4
-rw-r--r--xbmc/ServiceBroker.cpp2
-rw-r--r--xbmc/ServiceManager.cpp10
-rw-r--r--xbmc/ServiceManager.h4
-rw-r--r--xbmc/Util.cpp4
-rw-r--r--xbmc/application/Application.cpp13
-rw-r--r--xbmc/application/Application.h2
-rw-r--r--xbmc/cores/DllLoader/exports/emu_msvcrt.cpp20
-rw-r--r--xbmc/cores/VideoPlayer/DVDInputStreams/DVDFactoryInputStream.cpp2
-rw-r--r--xbmc/filesystem/DirectoryFactory.cpp2
-rw-r--r--xbmc/filesystem/FileFactory.cpp2
-rw-r--r--xbmc/filesystem/VirtualDirectory.cpp2
-rw-r--r--xbmc/guilib/GUIWindowManager.cpp6
-rw-r--r--xbmc/guilib/WindowIDs.h2
-rw-r--r--xbmc/guilib/guiinfo/SystemGUIInfo.cpp6
-rw-r--r--xbmc/interfaces/builtins/OpticalBuiltins.cpp4
-rw-r--r--xbmc/interfaces/builtins/PlayerBuiltins.cpp4
-rw-r--r--xbmc/music/MusicDatabase.cpp6
-rw-r--r--xbmc/music/tags/MusicInfoTagLoaderCDDA.cpp4
-rw-r--r--xbmc/music/tags/MusicInfoTagLoaderFactory.cpp2
-rw-r--r--xbmc/music/windows/GUIWindowMusicBase.cpp4
-rw-r--r--xbmc/music/windows/GUIWindowMusicNav.cpp2
-rw-r--r--xbmc/music/windows/GUIWindowMusicPlaylistEditor.cpp2
-rw-r--r--xbmc/pictures/GUIWindowPictures.cpp2
-rw-r--r--xbmc/platform/win32/storage/Win32StorageProvider.cpp4
-rw-r--r--xbmc/profiles/ProfileManager.cpp4
-rw-r--r--xbmc/programs/GUIWindowPrograms.cpp2
-rw-r--r--xbmc/settings/SettingConditions.cpp4
-rw-r--r--xbmc/settings/Settings.cpp2
-rw-r--r--xbmc/storage/DetectDVDType.cpp2
-rw-r--r--xbmc/storage/DetectDVDType.h2
-rw-r--r--xbmc/storage/IStorageProvider.h4
-rw-r--r--xbmc/storage/MediaManager.cpp34
-rw-r--r--xbmc/storage/MediaManager.h6
-rw-r--r--xbmc/video/ContextMenus.cpp4
-rw-r--r--xbmc/video/windows/GUIWindowVideoBase.cpp2
-rw-r--r--xbmc/windows/GUIWindowFileManager.cpp2
40 files changed, 95 insertions, 94 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c793bcba5e..c06939bf69 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -241,7 +241,7 @@ if(ENABLE_UPNP)
endif()
if(ENABLE_OPTICAL)
- list(APPEND DEP_DEFINES -DHAS_DVD_DRIVE -DHAS_CDDA_RIPPER)
+ list(APPEND DEP_DEFINES -DHAS_OPTICAL_DRIVE -DHAS_CDDA_RIPPER)
endif()
if(ENABLE_AIRTUNES)
diff --git a/xbmc/Autorun.cpp b/xbmc/Autorun.cpp
index 7739ae5ceb..87a77857e8 100644
--- a/xbmc/Autorun.cpp
+++ b/xbmc/Autorun.cpp
@@ -477,7 +477,7 @@ bool CAutorun::RunDisc(IDirectory* pDir, const std::string& strDrive, int& nAdde
void CAutorun::HandleAutorun()
{
-#if !defined(TARGET_WINDOWS) && defined(HAS_DVD_DRIVE)
+#if !defined(TARGET_WINDOWS) && defined(HAS_OPTICAL_DRIVE)
const CDetectDVDMedia& mediadetect = CServiceBroker::GetDetectDVDMedia();
if (!m_bEnable)
diff --git a/xbmc/Autorun.h b/xbmc/Autorun.h
index 1bd342b8a6..ac0f7d4bdc 100644
--- a/xbmc/Autorun.h
+++ b/xbmc/Autorun.h
@@ -16,7 +16,7 @@
//
//
-#ifdef HAS_DVD_DRIVE
+#ifdef HAS_OPTICAL_DRIVE
#include <memory>
#include <string>
diff --git a/xbmc/ContextMenus.cpp b/xbmc/ContextMenus.cpp
index 4dacfda7a2..0f6534cfb6 100644
--- a/xbmc/ContextMenus.cpp
+++ b/xbmc/ContextMenus.cpp
@@ -24,7 +24,7 @@ namespace CONTEXTMENU
bool CEjectDisk::IsVisible(const CFileItem& item) const
{
-#ifdef HAS_DVD_DRIVE
+#ifdef HAS_OPTICAL_DRIVE
return item.IsRemovable() && (item.IsDVD() || item.IsCDDA());
#else
return false;
@@ -33,7 +33,7 @@ namespace CONTEXTMENU
bool CEjectDisk::Execute(const std::shared_ptr<CFileItem>& item) const
{
-#ifdef HAS_DVD_DRIVE
+#ifdef HAS_OPTICAL_DRIVE
CServiceBroker::GetMediaManager().ToggleTray(
CServiceBroker::GetMediaManager().TranslateDevicePath(item->GetPath())[0]);
#endif
diff --git a/xbmc/ServiceBroker.cpp b/xbmc/ServiceBroker.cpp
index a8b62d3063..eaed83f546 100644
--- a/xbmc/ServiceBroker.cpp
+++ b/xbmc/ServiceBroker.cpp
@@ -122,7 +122,7 @@ WSDiscovery::IWSDiscovery& CServiceBroker::GetWSDiscovery()
}
#endif
-#if !defined(TARGET_WINDOWS) && defined(HAS_DVD_DRIVE)
+#if !defined(TARGET_WINDOWS) && defined(HAS_OPTICAL_DRIVE)
MEDIA_DETECT::CDetectDVDMedia& CServiceBroker::GetDetectDVDMedia()
{
return g_application.m_ServiceManager->GetDetectDVDMedia();
diff --git a/xbmc/ServiceManager.cpp b/xbmc/ServiceManager.cpp
index 02d9900e9b..ba94b8eec8 100644
--- a/xbmc/ServiceManager.cpp
+++ b/xbmc/ServiceManager.cpp
@@ -40,7 +40,7 @@
#include "powermanagement/PowerManager.h"
#include "profiles/ProfileManager.h"
#include "pvr/PVRManager.h"
-#if !defined(TARGET_WINDOWS) && defined(HAS_DVD_DRIVE)
+#if !defined(TARGET_WINDOWS) && defined(HAS_OPTICAL_DRIVE)
#include "storage/DetectDVDType.h"
#endif
#include "storage/MediaManager.h"
@@ -168,7 +168,7 @@ bool CServiceManager::InitStageTwo(const std::string& profilesUserDataFolder)
m_mediaManager.reset(new CMediaManager());
m_mediaManager->Initialize();
-#if !defined(TARGET_WINDOWS) && defined(HAS_DVD_DRIVE)
+#if !defined(TARGET_WINDOWS) && defined(HAS_OPTICAL_DRIVE)
m_DetectDVDType = std::make_unique<MEDIA_DETECT::CDetectDVDMedia>();
#endif
@@ -186,7 +186,7 @@ bool CServiceManager::InitStageTwo(const std::string& profilesUserDataFolder)
// stage 3 is called after successful initialization of WindowManager
bool CServiceManager::InitStageThree(const std::shared_ptr<CProfileManager>& profileManager)
{
-#if !defined(TARGET_WINDOWS) && defined(HAS_DVD_DRIVE)
+#if !defined(TARGET_WINDOWS) && defined(HAS_OPTICAL_DRIVE)
// Start Thread for DVD Mediatype detection
CLog::Log(LOGINFO, "[Media Detection] starting service for optical media detection");
m_DetectDVDType->Create(false);
@@ -217,7 +217,7 @@ bool CServiceManager::InitStageThree(const std::shared_ptr<CProfileManager>& pro
void CServiceManager::DeinitStageThree()
{
init_level = 2;
-#if !defined(TARGET_WINDOWS) && defined(HAS_DVD_DRIVE)
+#if !defined(TARGET_WINDOWS) && defined(HAS_OPTICAL_DRIVE)
m_DetectDVDType->StopThread();
m_DetectDVDType.reset();
#endif
@@ -328,7 +328,7 @@ XBPython& CServiceManager::GetXBPython()
}
#endif
-#if !defined(TARGET_WINDOWS) && defined(HAS_DVD_DRIVE)
+#if !defined(TARGET_WINDOWS) && defined(HAS_OPTICAL_DRIVE)
MEDIA_DETECT::CDetectDVDMedia& CServiceManager::GetDetectDVDMedia()
{
return *m_DetectDVDType;
diff --git a/xbmc/ServiceManager.h b/xbmc/ServiceManager.h
index 9c99811a40..4555c8ea88 100644
--- a/xbmc/ServiceManager.h
+++ b/xbmc/ServiceManager.h
@@ -143,7 +143,7 @@ public:
CMediaManager& GetMediaManager();
-#if !defined(TARGET_WINDOWS) && defined(HAS_DVD_DRIVE)
+#if !defined(TARGET_WINDOWS) && defined(HAS_OPTICAL_DRIVE)
MEDIA_DETECT::CDetectDVDMedia& GetDetectDVDMedia();
#endif
@@ -194,7 +194,7 @@ protected:
std::unique_ptr<CPlayerCoreFactory> m_playerCoreFactory;
std::unique_ptr<CDatabaseManager> m_databaseManager;
std::unique_ptr<CMediaManager> m_mediaManager;
-#if !defined(TARGET_WINDOWS) && defined(HAS_DVD_DRIVE)
+#if !defined(TARGET_WINDOWS) && defined(HAS_OPTICAL_DRIVE)
std::unique_ptr<MEDIA_DETECT::CDetectDVDMedia> m_DetectDVDType;
#endif
};
diff --git a/xbmc/Util.cpp b/xbmc/Util.cpp
index e394d18e43..9fb67d84f3 100644
--- a/xbmc/Util.cpp
+++ b/xbmc/Util.cpp
@@ -85,7 +85,7 @@
#include <fstrcmp.h>
-#ifdef HAS_DVD_DRIVE
+#ifdef HAS_OPTICAL_DRIVE
using namespace MEDIA_DETECT;
#endif
@@ -622,7 +622,7 @@ void CUtil::GetDVDDriveIcon(const std::string& strPath, std::string& strIcon)
if ( URIUtils::IsISO9660(strPath) )
{
-#ifdef HAS_DVD_DRIVE
+#ifdef HAS_OPTICAL_DRIVE
CCdInfo* pInfo = CServiceBroker::GetMediaManager().GetCdInfo();
if ( pInfo != NULL && pInfo->IsVideoCd( 1 ) )
{
diff --git a/xbmc/application/Application.cpp b/xbmc/application/Application.cpp
index 77c4301a8e..abbb48bf25 100644
--- a/xbmc/application/Application.cpp
+++ b/xbmc/application/Application.cpp
@@ -159,7 +159,7 @@
#include "platform/darwin/DarwinUtils.h"
#endif
-#ifdef HAS_DVD_DRIVE
+#ifdef HAS_OPTICAL_DRIVE
#include <cdio/logging.h>
#endif
@@ -198,7 +198,7 @@
using namespace ADDON;
using namespace XFILE;
-#ifdef HAS_DVD_DRIVE
+#ifdef HAS_OPTICAL_DRIVE
using namespace MEDIA_DETECT;
#endif
using namespace VIDEO;
@@ -222,7 +222,7 @@ using namespace std::chrono_literals;
CApplication::CApplication(void)
:
-#ifdef HAS_DVD_DRIVE
+#ifdef HAS_OPTICAL_DRIVE
m_Autorun(new CAutorun()),
#endif
m_pInertialScrollingHandler(new CInertialScrollingHandler()),
@@ -628,7 +628,8 @@ bool CApplication::Initialize()
appVolume->SetHardwareVolume(level);
CServiceBroker::GetActiveAE()->SetMute(muted);
-#if defined(HAS_DVD_DRIVE) && !defined(TARGET_WINDOWS) // somehow this throws an "unresolved external symbol" on win32
+#if defined(HAS_OPTICAL_DRIVE) && \
+ !defined(TARGET_WINDOWS) // somehow this throws an "unresolved external symbol" on win32
// turn off cdio logging
cdio_loglevel_default = CDIO_LOG_ERROR;
#endif
@@ -2007,7 +2008,7 @@ bool CApplication::Cleanup()
#ifdef TARGET_POSIX
CXHandle::DumpObjectTracker();
-#ifdef HAS_DVD_DRIVE
+#ifdef HAS_OPTICAL_DRIVE
CLibcdio::ReleaseInstance();
#endif
#endif
@@ -3218,7 +3219,7 @@ void CApplication::ProcessSlow()
CServiceBroker::GetGUI()->GetTextureManager().FreeUnusedTextures(5000);
-#ifdef HAS_DVD_DRIVE
+#ifdef HAS_OPTICAL_DRIVE
// checks whats in the DVD drive and tries to autostart the content (xbox games, dvd, cdda, avi files...)
if (!appPlayer->IsPlayingVideo())
m_Autorun->HandleAutorun();
diff --git a/xbmc/application/Application.h b/xbmc/application/Application.h
index a37dcf733d..6991a69960 100644
--- a/xbmc/application/Application.h
+++ b/xbmc/application/Application.h
@@ -169,7 +169,7 @@ public:
bool ExecuteXBMCAction(std::string action, const CGUIListItemPtr &item = NULL);
-#ifdef HAS_DVD_DRIVE
+#ifdef HAS_OPTICAL_DRIVE
std::unique_ptr<MEDIA_DETECT::CAutorun> m_Autorun;
#endif
diff --git a/xbmc/cores/DllLoader/exports/emu_msvcrt.cpp b/xbmc/cores/DllLoader/exports/emu_msvcrt.cpp
index 26b64ffdd2..a2084261b1 100644
--- a/xbmc/cores/DllLoader/exports/emu_msvcrt.cpp
+++ b/xbmc/cores/DllLoader/exports/emu_msvcrt.cpp
@@ -26,15 +26,15 @@
#if !defined(TARGET_FREEBSD) && (!defined(TARGET_ANDROID) && defined(__LP64__))
#include <sys/timeb.h>
#endif
-#ifdef HAS_DVD_DRIVE
- #ifdef TARGET_POSIX
- #include <sys/ioctl.h>
- #if defined(TARGET_DARWIN)
- #include <IOKit/storage/IODVDMediaBSDClient.h>
- #elif !defined(TARGET_FREEBSD)
- #include <linux/cdrom.h>
- #endif
- #endif
+#ifdef HAS_OPTICAL_DRIVE
+#ifdef TARGET_POSIX
+#include <sys/ioctl.h>
+#if defined(TARGET_DARWIN)
+#include <IOKit/storage/IODVDMediaBSDClient.h>
+#elif !defined(TARGET_FREEBSD)
+#include <linux/cdrom.h>
+#endif
+#endif
#endif
#include <fcntl.h>
#include <time.h>
@@ -1992,7 +1992,7 @@ extern "C"
if (!pFile)
return -1;
-#if defined(HAS_DVD_DRIVE) && !defined(TARGET_FREEBSD)
+#if defined(HAS_OPTICAL_DRIVE) && !defined(TARGET_FREEBSD)
#if !defined(TARGET_DARWIN)
if(request == DVD_READ_STRUCT || request == DVD_AUTH)
#else
diff --git a/xbmc/cores/VideoPlayer/DVDInputStreams/DVDFactoryInputStream.cpp b/xbmc/cores/VideoPlayer/DVDInputStreams/DVDFactoryInputStream.cpp
index 97c0896269..caacf7f86a 100644
--- a/xbmc/cores/VideoPlayer/DVDInputStreams/DVDFactoryInputStream.cpp
+++ b/xbmc/cores/VideoPlayer/DVDInputStreams/DVDFactoryInputStream.cpp
@@ -87,7 +87,7 @@ std::shared_ptr<CDVDInputStream> CDVDFactoryInputStream::CreateInputStream(IVide
return std::shared_ptr<CDVDInputStreamNavigator>(new CDVDInputStreamNavigator(pPlayer, fileitem));
}
-#ifdef HAS_DVD_DRIVE
+#ifdef HAS_OPTICAL_DRIVE
if (file.compare(CServiceBroker::GetMediaManager().TranslateDevicePath("")) == 0)
{
#ifdef HAVE_LIBBLURAY
diff --git a/xbmc/filesystem/DirectoryFactory.cpp b/xbmc/filesystem/DirectoryFactory.cpp
index a3016f6dd6..8eb1a6509a 100644
--- a/xbmc/filesystem/DirectoryFactory.cpp
+++ b/xbmc/filesystem/DirectoryFactory.cpp
@@ -130,7 +130,7 @@ IDirectory* CDirectoryFactory::Create(const CURL& url)
if (url.IsProtocol("special")) return new CSpecialProtocolDirectory();
if (url.IsProtocol("sources")) return new CSourcesDirectory();
if (url.IsProtocol("addons")) return new CAddonsDirectory();
-#if defined(HAS_DVD_DRIVE)
+#if defined(HAS_OPTICAL_DRIVE)
if (url.IsProtocol("cdda")) return new CCDDADirectory();
#endif
#if defined(HAS_ISO9660PP)
diff --git a/xbmc/filesystem/FileFactory.cpp b/xbmc/filesystem/FileFactory.cpp
index b248255e26..6f1d3647e2 100644
--- a/xbmc/filesystem/FileFactory.cpp
+++ b/xbmc/filesystem/FileFactory.cpp
@@ -129,7 +129,7 @@ IFile* CFileFactory::CreateLoader(const CURL& url)
return new CWin32File();
}
#endif // TARGET_WINDOWS
-#if defined(HAS_DVD_DRIVE)
+#if defined(HAS_OPTICAL_DRIVE)
else if (url.IsProtocol("cdda")) return new CFileCDDA();
#endif
#if defined(HAS_ISO9660PP)
diff --git a/xbmc/filesystem/VirtualDirectory.cpp b/xbmc/filesystem/VirtualDirectory.cpp
index 7134eba0d2..4fb0205d1e 100644
--- a/xbmc/filesystem/VirtualDirectory.cpp
+++ b/xbmc/filesystem/VirtualDirectory.cpp
@@ -170,7 +170,7 @@ void CVirtualDirectory::GetSources(VECSOURCES &shares) const
if (m_allowNonLocalSources)
CServiceBroker::GetMediaManager().GetRemovableDrives(shares);
-#ifdef HAS_DVD_DRIVE
+#ifdef HAS_OPTICAL_DRIVE
// and update our dvd share
for (unsigned int i = 0; i < shares.size(); ++i)
{
diff --git a/xbmc/guilib/GUIWindowManager.cpp b/xbmc/guilib/GUIWindowManager.cpp
index f15489e00e..7cbf24e250 100644
--- a/xbmc/guilib/GUIWindowManager.cpp
+++ b/xbmc/guilib/GUIWindowManager.cpp
@@ -133,7 +133,7 @@
#include "video/dialogs/GUIDialogTeletext.h"
#include "dialogs/GUIDialogSlider.h"
-#ifdef HAS_DVD_DRIVE
+#ifdef HAS_OPTICAL_DRIVE
#include "dialogs/GUIDialogPlayEject.h"
#endif
#include "dialogs/GUIDialogMediaFilter.h"
@@ -246,7 +246,7 @@ void CGUIWindowManager::CreateWindows()
Add(new CGUIDialogInfoProviderSettings);
-#ifdef HAS_DVD_DRIVE
+#ifdef HAS_OPTICAL_DRIVE
Add(new CGUIDialogPlayEject);
#endif
@@ -406,7 +406,7 @@ bool CGUIWindowManager::DestroyWindows()
DestroyWindow(WINDOW_DIALOG_PVR_GUIDE_CONTROLS);
DestroyWindow(WINDOW_DIALOG_TEXT_VIEWER);
-#ifdef HAS_DVD_DRIVE
+#ifdef HAS_OPTICAL_DRIVE
DestroyWindow(WINDOW_DIALOG_PLAY_EJECT);
#endif
DestroyWindow(WINDOW_STARTUP_ANIM);
diff --git a/xbmc/guilib/WindowIDs.h b/xbmc/guilib/WindowIDs.h
index 02ff8ebaac..c1a3edb459 100644
--- a/xbmc/guilib/WindowIDs.h
+++ b/xbmc/guilib/WindowIDs.h
@@ -83,7 +83,7 @@
#define WINDOW_DIALOG_SLIDER 10145
#define WINDOW_DIALOG_ADDON_INFO 10146
#define WINDOW_DIALOG_TEXT_VIEWER 10147
-#ifdef HAS_DVD_DRIVE
+#ifdef HAS_OPTICAL_DRIVE
#define WINDOW_DIALOG_PLAY_EJECT 10148
#endif
#define WINDOW_DIALOG_PERIPHERALS 10149
diff --git a/xbmc/guilib/guiinfo/SystemGUIInfo.cpp b/xbmc/guilib/guiinfo/SystemGUIInfo.cpp
index bc01047b3b..8004405d98 100644
--- a/xbmc/guilib/guiinfo/SystemGUIInfo.cpp
+++ b/xbmc/guilib/guiinfo/SystemGUIInfo.cpp
@@ -257,7 +257,7 @@ bool CSystemGUIInfo::GetLabel(std::string& value, const CFileItem *item, int con
case SYSTEM_FPS:
value = StringUtils::Format("{:02.2f}", m_fps);
return true;
-#ifdef HAS_DVD_DRIVE
+#ifdef HAS_OPTICAL_DRIVE
case SYSTEM_DVD_LABEL:
value = CServiceBroker::GetMediaManager().GetDiskLabel();
return true;
@@ -546,7 +546,7 @@ bool CSystemGUIInfo::GetBool(bool& value, const CGUIListItem *gitem, int context
value = CServiceBroker::GetMediaManager().IsDiscInDrive();
return true;
case SYSTEM_MEDIA_AUDIO_CD:
- #ifdef HAS_DVD_DRIVE
+#ifdef HAS_OPTICAL_DRIVE
if (CServiceBroker::GetMediaManager().IsDiscInDrive())
{
MEDIA_DETECT::CCdInfo* pCdInfo = CServiceBroker::GetMediaManager().GetCdInfo();
@@ -558,7 +558,7 @@ bool CSystemGUIInfo::GetBool(bool& value, const CGUIListItem *gitem, int context
value = false;
}
return true;
-#ifdef HAS_DVD_DRIVE
+#ifdef HAS_OPTICAL_DRIVE
case SYSTEM_DVDREADY:
value = CServiceBroker::GetMediaManager().GetDriveStatus() != DriveState::NOT_READY;
return true;
diff --git a/xbmc/interfaces/builtins/OpticalBuiltins.cpp b/xbmc/interfaces/builtins/OpticalBuiltins.cpp
index 4a0ec5de41..64df3d940a 100644
--- a/xbmc/interfaces/builtins/OpticalBuiltins.cpp
+++ b/xbmc/interfaces/builtins/OpticalBuiltins.cpp
@@ -10,7 +10,7 @@
#include "ServiceBroker.h"
-#ifdef HAS_DVD_DRIVE
+#ifdef HAS_OPTICAL_DRIVE
#include "storage/MediaManager.h"
#endif
@@ -23,7 +23,7 @@
*/
static int Eject(const std::vector<std::string>& params)
{
-#ifdef HAS_DVD_DRIVE
+#ifdef HAS_OPTICAL_DRIVE
CServiceBroker::GetMediaManager().ToggleTray();
#endif
diff --git a/xbmc/interfaces/builtins/PlayerBuiltins.cpp b/xbmc/interfaces/builtins/PlayerBuiltins.cpp
index ca69d69ea1..fcf04fb3a1 100644
--- a/xbmc/interfaces/builtins/PlayerBuiltins.cpp
+++ b/xbmc/interfaces/builtins/PlayerBuiltins.cpp
@@ -40,7 +40,7 @@
#include <math.h>
-#ifdef HAS_DVD_DRIVE
+#ifdef HAS_OPTICAL_DRIVE
#include "Autorun.h"
#endif
@@ -410,7 +410,7 @@ static int PlayerControl(const std::vector<std::string>& params)
*/
static int PlayDVD(const std::vector<std::string>& params)
{
-#ifdef HAS_DVD_DRIVE
+#ifdef HAS_OPTICAL_DRIVE
bool restart = false;
if (!params.empty() && StringUtils::EqualsNoCase(params[0], "restart"))
restart = true;
diff --git a/xbmc/music/MusicDatabase.cpp b/xbmc/music/MusicDatabase.cpp
index 9845960c0f..69819a98e4 100644
--- a/xbmc/music/MusicDatabase.cpp
+++ b/xbmc/music/MusicDatabase.cpp
@@ -74,7 +74,7 @@ using KODI::MESSAGING::HELPERS::DialogResponse;
#define RECENTLY_PLAYED_LIMIT 25
#define MIN_FULL_SEARCH_LENGTH 3
-#ifdef HAS_DVD_DRIVE
+#ifdef HAS_OPTICAL_DRIVE
using namespace CDDB;
using namespace MEDIA_DETECT;
#endif
@@ -4609,7 +4609,7 @@ bool CMusicDatabase::TrimImageURLs(std::string& strImage, const size_t space)
bool CMusicDatabase::LookupCDDBInfo(bool bRequery /*=false*/)
{
-#ifdef HAS_DVD_DRIVE
+#ifdef HAS_OPTICAL_DRIVE
if (!CServiceBroker::GetSettingsComponent()->GetSettings()->GetBool(
CSettings::SETTING_AUDIOCDS_USECDDB))
return false;
@@ -4730,7 +4730,7 @@ bool CMusicDatabase::LookupCDDBInfo(bool bRequery /*=false*/)
void CMusicDatabase::DeleteCDDBInfo()
{
-#ifdef HAS_DVD_DRIVE
+#ifdef HAS_OPTICAL_DRIVE
CFileItemList items;
if (!CDirectory::GetDirectory(m_profileManager.GetCDDBFolder(), items, ".cddb",
DIR_FLAG_NO_FILE_DIRS))
diff --git a/xbmc/music/tags/MusicInfoTagLoaderCDDA.cpp b/xbmc/music/tags/MusicInfoTagLoaderCDDA.cpp
index 66938d3450..e74bc70fb5 100644
--- a/xbmc/music/tags/MusicInfoTagLoaderCDDA.cpp
+++ b/xbmc/music/tags/MusicInfoTagLoaderCDDA.cpp
@@ -18,7 +18,7 @@
using namespace MUSIC_INFO;
-#ifdef HAS_DVD_DRIVE
+#ifdef HAS_OPTICAL_DRIVE
using namespace MEDIA_DETECT;
using namespace CDDB;
#endif
@@ -36,7 +36,7 @@ CMusicInfoTagLoaderCDDA::~CMusicInfoTagLoaderCDDA() = default;
bool CMusicInfoTagLoaderCDDA::Load(const std::string& strFileName, CMusicInfoTag& tag, EmbeddedArt *art)
{
-#ifdef HAS_DVD_DRIVE
+#ifdef HAS_OPTICAL_DRIVE
try
{
tag.SetURL(strFileName);
diff --git a/xbmc/music/tags/MusicInfoTagLoaderFactory.cpp b/xbmc/music/tags/MusicInfoTagLoaderFactory.cpp
index 56b2c17c43..562068ee95 100644
--- a/xbmc/music/tags/MusicInfoTagLoaderFactory.cpp
+++ b/xbmc/music/tags/MusicInfoTagLoaderFactory.cpp
@@ -70,7 +70,7 @@ IMusicInfoTagLoader* CMusicInfoTagLoaderFactory::CreateLoader(const CFileItem& i
CTagLoaderTagLib *pTagLoader = new CTagLoaderTagLib();
return pTagLoader;
}
-#ifdef HAS_DVD_DRIVE
+#ifdef HAS_OPTICAL_DRIVE
else if (strExtension == "cdda")
{
CMusicInfoTagLoaderCDDA *pTagLoader = new CMusicInfoTagLoaderCDDA();
diff --git a/xbmc/music/windows/GUIWindowMusicBase.cpp b/xbmc/music/windows/GUIWindowMusicBase.cpp
index df45141c9b..fc893beed3 100644
--- a/xbmc/music/windows/GUIWindowMusicBase.cpp
+++ b/xbmc/music/windows/GUIWindowMusicBase.cpp
@@ -463,7 +463,7 @@ void CGUIWindowMusicBase::GetContextButtons(int itemNumber, CContextButtons &but
else if (item->IsPlayList() || m_vecItems->IsPlayList())
buttons.Add(CONTEXT_BUTTON_EDIT, 586);
}
-#ifdef HAS_DVD_DRIVE
+#ifdef HAS_OPTICAL_DRIVE
// enable Rip CD Audio or Track button if we have an audio disc
if (CServiceBroker::GetMediaManager().IsDiscInDrive() && m_vecItems->IsCDDA())
{
@@ -620,7 +620,7 @@ void CGUIWindowMusicBase::PlayItem(int iItem)
// the current playlist
const CFileItemPtr pItem = m_vecItems->Get(iItem);
-#ifdef HAS_DVD_DRIVE
+#ifdef HAS_OPTICAL_DRIVE
if (pItem->IsDVD())
{
MEDIA_DETECT::CAutorun::PlayDiscAskResume(pItem->GetPath());
diff --git a/xbmc/music/windows/GUIWindowMusicNav.cpp b/xbmc/music/windows/GUIWindowMusicNav.cpp
index cf7e66e5b4..344931f8b4 100644
--- a/xbmc/music/windows/GUIWindowMusicNav.cpp
+++ b/xbmc/music/windows/GUIWindowMusicNav.cpp
@@ -552,7 +552,7 @@ void CGUIWindowMusicNav::GetContextButtons(int itemNumber, CContextButtons &butt
{
// get the usual music shares, and anything for all media windows
CGUIDialogContextMenu::GetContextButtons("music", item, buttons);
-#ifdef HAS_DVD_DRIVE
+#ifdef HAS_OPTICAL_DRIVE
// enable Rip CD an audio disc
if (CServiceBroker::GetMediaManager().IsDiscInDrive() && item->IsCDDA())
{
diff --git a/xbmc/music/windows/GUIWindowMusicPlaylistEditor.cpp b/xbmc/music/windows/GUIWindowMusicPlaylistEditor.cpp
index e4b69aa725..a6ceec2577 100644
--- a/xbmc/music/windows/GUIWindowMusicPlaylistEditor.cpp
+++ b/xbmc/music/windows/GUIWindowMusicPlaylistEditor.cpp
@@ -240,7 +240,7 @@ void CGUIWindowMusicPlaylistEditor::PlayItem(int iItem)
if (m_vecItems->IsVirtualDirectoryRoot() && !m_vecItems->Get(iItem)->IsDVD())
return;
-#ifdef HAS_DVD_DRIVE
+#ifdef HAS_OPTICAL_DRIVE
if (m_vecItems->Get(iItem)->IsDVD())
MEDIA_DETECT::CAutorun::PlayDiscAskResume(m_vecItems->Get(iItem)->GetPath());
else
diff --git a/xbmc/pictures/GUIWindowPictures.cpp b/xbmc/pictures/GUIWindowPictures.cpp
index ebc8fe9f2a..55c02074ea 100644
--- a/xbmc/pictures/GUIWindowPictures.cpp
+++ b/xbmc/pictures/GUIWindowPictures.cpp
@@ -306,7 +306,7 @@ bool CGUIWindowPictures::ShowPicture(int iItem, bool startSlideShow)
CFileItemPtr pItem = m_vecItems->Get(iItem);
std::string strPicture = pItem->GetPath();
-#ifdef HAS_DVD_DRIVE
+#ifdef HAS_OPTICAL_DRIVE
if (pItem->IsDVD())
return MEDIA_DETECT::CAutorun::PlayDiscAskResume(m_vecItems->Get(iItem)->GetPath());
#endif
diff --git a/xbmc/platform/win32/storage/Win32StorageProvider.cpp b/xbmc/platform/win32/storage/Win32StorageProvider.cpp
index 275cd0c55f..9df7b2f48f 100644
--- a/xbmc/platform/win32/storage/Win32StorageProvider.cpp
+++ b/xbmc/platform/win32/storage/Win32StorageProvider.cpp
@@ -38,7 +38,7 @@ void CWin32StorageProvider::Initialize()
else
CLog::Log(LOGDEBUG, "{}: No optical drive found.", __FUNCTION__);
-#ifdef HAS_DVD_DRIVE
+#ifdef HAS_OPTICAL_DRIVE
// Can be removed once the StorageHandler supports optical media
for (const auto& it : vShare)
if (CServiceBroker::GetMediaManager().GetDriveStatus(it.strPath) ==
@@ -380,7 +380,7 @@ CDetectDisc::CDetectDisc(const std::string &strPath, const bool bautorun)
bool CDetectDisc::DoWork()
{
-#ifdef HAS_DVD_DRIVE
+#ifdef HAS_OPTICAL_DRIVE
CLog::Log(LOGDEBUG, "{}: Optical media found in drive {}", __FUNCTION__, m_strPath);
CMediaSource share;
share.strPath = m_strPath;
diff --git a/xbmc/profiles/ProfileManager.cpp b/xbmc/profiles/ProfileManager.cpp
index e4e5bec16e..600c812cf1 100644
--- a/xbmc/profiles/ProfileManager.cpp
+++ b/xbmc/profiles/ProfileManager.cpp
@@ -41,7 +41,7 @@
#include <mutex>
#include <string>
#include <vector>
-#if !defined(TARGET_WINDOWS) && defined(HAS_DVD_DRIVE)
+#if !defined(TARGET_WINDOWS) && defined(HAS_OPTICAL_DRIVE)
#include "storage/DetectDVDType.h"
#endif
#include "ContextMenuManager.h" //! @todo Remove me
@@ -353,7 +353,7 @@ bool CProfileManager::LoadProfile(unsigned int index)
CPasswordManager::GetInstance().Clear();
// to set labels - shares are reloaded
-#if !defined(TARGET_WINDOWS) && defined(HAS_DVD_DRIVE)
+#if !defined(TARGET_WINDOWS) && defined(HAS_OPTICAL_DRIVE)
MEDIA_DETECT::CDetectDVDMedia::UpdateState();
#endif
diff --git a/xbmc/programs/GUIWindowPrograms.cpp b/xbmc/programs/GUIWindowPrograms.cpp
index 1e79c34037..42abec5fd7 100644
--- a/xbmc/programs/GUIWindowPrograms.cpp
+++ b/xbmc/programs/GUIWindowPrograms.cpp
@@ -134,7 +134,7 @@ bool CGUIWindowPrograms::OnPlayMedia(int iItem, const std::string&)
if ( iItem < 0 || iItem >= m_vecItems->Size() ) return false;
CFileItemPtr pItem = m_vecItems->Get(iItem);
-#ifdef HAS_DVD_DRIVE
+#ifdef HAS_OPTICAL_DRIVE
if (pItem->IsDVD())
return MEDIA_DETECT::CAutorun::PlayDiscAskResume(m_vecItems->Get(iItem)->GetPath());
#endif
diff --git a/xbmc/settings/SettingConditions.cpp b/xbmc/settings/SettingConditions.cpp
index 1b81756764..fab12ab700 100644
--- a/xbmc/settings/SettingConditions.cpp
+++ b/xbmc/settings/SettingConditions.cpp
@@ -451,8 +451,8 @@ void CSettingConditions::Initialize()
m_simpleConditions.emplace("has_cdda_ripper");
#endif
-#ifdef HAS_DVD_DRIVE
- m_simpleConditions.emplace("has_dvd_drive");
+#ifdef HAS_OPTICAL_DRIVE
+ m_simpleConditions.emplace("has_optical_drive");
#endif
// add complex conditions
diff --git a/xbmc/settings/Settings.cpp b/xbmc/settings/Settings.cpp
index b8b9b8d1cb..14a1479325 100644
--- a/xbmc/settings/Settings.cpp
+++ b/xbmc/settings/Settings.cpp
@@ -394,7 +394,7 @@ void CSettings::InitializeDefaults()
void CSettings::InitializeOptionFillers()
{
// register setting option fillers
-#ifdef HAS_DVD_DRIVE
+#ifdef HAS_OPTICAL_DRIVE
GetSettingsManager()->RegisterSettingOptionsFiller("audiocdactions", MEDIA_DETECT::CAutorun::SettingOptionAudioCdActionsFiller);
#endif
GetSettingsManager()->RegisterSettingOptionsFiller("charsets", CCharsetConverter::SettingOptionsCharsetsFiller);
diff --git a/xbmc/storage/DetectDVDType.cpp b/xbmc/storage/DetectDVDType.cpp
index 2392901217..3a3a3a08a8 100644
--- a/xbmc/storage/DetectDVDType.cpp
+++ b/xbmc/storage/DetectDVDType.cpp
@@ -369,7 +369,7 @@ DriveState CDetectDVDMedia::PollDriveState()
m_LastTrayState = m_TrayState;
}
-#ifdef HAS_DVD_DRIVE
+#ifdef HAS_OPTICAL_DRIVE
return DriveState::NOT_READY;
#else
return DriveState::READY;
diff --git a/xbmc/storage/DetectDVDType.h b/xbmc/storage/DetectDVDType.h
index c54272f5f1..500a10f574 100644
--- a/xbmc/storage/DetectDVDType.h
+++ b/xbmc/storage/DetectDVDType.h
@@ -15,7 +15,7 @@
#include "PlatformDefs.h"
-#ifdef HAS_DVD_DRIVE
+#ifdef HAS_OPTICAL_DRIVE
#include "storage/discs/IDiscDriveHandler.h"
#include "threads/CriticalSection.h"
diff --git a/xbmc/storage/IStorageProvider.h b/xbmc/storage/IStorageProvider.h
index aa9ecaf652..13d7fd2cc0 100644
--- a/xbmc/storage/IStorageProvider.h
+++ b/xbmc/storage/IStorageProvider.h
@@ -13,7 +13,7 @@
#include <memory>
#include <string>
#include <vector>
-#ifdef HAS_DVD_DRIVE
+#ifdef HAS_OPTICAL_DRIVE
#include "cdioSupport.h"
#endif
@@ -74,7 +74,7 @@ public:
virtual void GetRemovableDrives(VECSOURCES &removableDrives) = 0;
virtual std::string GetFirstOpticalDeviceFileName()
{
-#ifdef HAS_DVD_DRIVE
+#ifdef HAS_OPTICAL_DRIVE
return std::string(MEDIA_DETECT::CLibcdio::GetInstance()->GetDeviceFileName());
#else
return "";
diff --git a/xbmc/storage/MediaManager.cpp b/xbmc/storage/MediaManager.cpp
index a1efbd933a..047641e1de 100644
--- a/xbmc/storage/MediaManager.cpp
+++ b/xbmc/storage/MediaManager.cpp
@@ -21,7 +21,7 @@
#include "utils/CharsetConverter.h"
#endif
#include "guilib/GUIWindowManager.h"
-#ifdef HAS_DVD_DRIVE
+#ifdef HAS_OPTICAL_DRIVE
#ifndef TARGET_WINDOWS
//! @todo switch all ports to use auto sources
#include <map>
@@ -50,7 +50,7 @@
#include <string>
#include <vector>
-#ifdef HAS_DVD_DRIVE
+#ifdef HAS_OPTICAL_DRIVE
using namespace MEDIA_DETECT;
#endif
@@ -75,7 +75,7 @@ void CMediaManager::Initialize()
{
m_platformStorage = IStorageProvider::CreateInstance();
}
-#ifdef HAS_DVD_DRIVE
+#ifdef HAS_OPTICAL_DRIVE
m_platformDiscDriveHander = IDiscDriveHandler::CreateInstance();
m_strFirstAvailDrive = m_platformStorage->GetFirstOpticalDeviceFileName();
#endif
@@ -337,7 +337,7 @@ void CMediaManager::AddAutoSource(const CMediaSource &share, bool bAutorun)
if (gui)
gui->GetWindowManager().SendThreadMessage( msg );
-#ifdef HAS_DVD_DRIVE
+#ifdef HAS_OPTICAL_DRIVE
if(bAutorun)
MEDIA_DETECT::CAutorun::ExecuteAutorun(share.strPath);
#endif
@@ -353,7 +353,7 @@ void CMediaManager::RemoveAutoSource(const CMediaSource &share)
CGUIMessage msg(GUI_MSG_NOTIFY_ALL, 0, 0, GUI_MSG_UPDATE_SOURCES);
CServiceBroker::GetGUI()->GetWindowManager().SendThreadMessage( msg );
-#ifdef HAS_DVD_DRIVE
+#ifdef HAS_OPTICAL_DRIVE
// delete cached CdInfo if any
RemoveCdInfo(TranslateDevicePath(share.strPath, true));
RemoveDiscInfo(TranslateDevicePath(share.strPath, true));
@@ -369,7 +369,7 @@ std::string CMediaManager::TranslateDevicePath(const std::string& devicePath, bo
std::unique_lock<CCriticalSection> waitLock(m_muAutoSource);
std::string strDevice = devicePath;
// fallback for cdda://local/ and empty devicePath
-#ifdef HAS_DVD_DRIVE
+#ifdef HAS_OPTICAL_DRIVE
if(devicePath.empty() || StringUtils::StartsWith(devicePath, "cdda://local"))
strDevice = m_strFirstAvailDrive;
#endif
@@ -390,7 +390,7 @@ std::string CMediaManager::TranslateDevicePath(const std::string& devicePath, bo
bool CMediaManager::IsDiscInDrive(const std::string& devicePath)
{
-#ifdef HAS_DVD_DRIVE
+#ifdef HAS_OPTICAL_DRIVE
#ifdef TARGET_WINDOWS
if(!m_bhasoptical)
return false;
@@ -416,7 +416,7 @@ bool CMediaManager::IsDiscInDrive(const std::string& devicePath)
bool CMediaManager::IsAudio(const std::string& devicePath)
{
-#ifdef HAS_DVD_DRIVE
+#ifdef HAS_OPTICAL_DRIVE
#ifdef TARGET_WINDOWS
if(!m_bhasoptical)
return false;
@@ -438,7 +438,7 @@ bool CMediaManager::IsAudio(const std::string& devicePath)
bool CMediaManager::HasOpticalDrive()
{
-#ifdef HAS_DVD_DRIVE
+#ifdef HAS_OPTICAL_DRIVE
if (!m_strFirstAvailDrive.empty())
return true;
#endif
@@ -447,7 +447,7 @@ bool CMediaManager::HasOpticalDrive()
DriveState CMediaManager::GetDriveStatus(const std::string& devicePath)
{
-#ifdef HAS_DVD_DRIVE
+#ifdef HAS_OPTICAL_DRIVE
#ifdef TARGET_WINDOWS
if (!m_bhasoptical || !m_platformDiscDriveHander)
return DriveState::NOT_READY;
@@ -462,7 +462,7 @@ DriveState CMediaManager::GetDriveStatus(const std::string& devicePath)
#endif
}
-#ifdef HAS_DVD_DRIVE
+#ifdef HAS_OPTICAL_DRIVE
CCdInfo* CMediaManager::GetCdInfo(const std::string& devicePath)
{
#ifdef TARGET_WINDOWS
@@ -640,7 +640,7 @@ bool CMediaManager::Eject(const std::string& mountpath)
void CMediaManager::EjectTray( const bool bEject, const char cDriveLetter )
{
-#ifdef HAS_DVD_DRIVE
+#ifdef HAS_OPTICAL_DRIVE
if (m_platformDiscDriveHander)
{
m_platformDiscDriveHander->EjectDriveTray(TranslateDevicePath(""));
@@ -650,7 +650,7 @@ void CMediaManager::EjectTray( const bool bEject, const char cDriveLetter )
void CMediaManager::CloseTray(const char cDriveLetter)
{
-#ifdef HAS_DVD_DRIVE
+#ifdef HAS_OPTICAL_DRIVE
if (m_platformDiscDriveHander)
{
m_platformDiscDriveHander->ToggleDriveTray(TranslateDevicePath(""));
@@ -660,7 +660,7 @@ void CMediaManager::CloseTray(const char cDriveLetter)
void CMediaManager::ToggleTray(const char cDriveLetter)
{
-#ifdef HAS_DVD_DRIVE
+#ifdef HAS_OPTICAL_DRIVE
if (m_platformDiscDriveHander)
{
m_platformDiscDriveHander->ToggleDriveTray(TranslateDevicePath(""));
@@ -673,7 +673,7 @@ void CMediaManager::ProcessEvents()
std::unique_lock<CCriticalSection> lock(m_CritSecStorageProvider);
if (m_platformStorage->PumpDriveChangeEvents(this))
{
-#if defined(HAS_DVD_DRIVE) && defined(TARGET_DARWIN_OSX)
+#if defined(HAS_OPTICAL_DRIVE) && defined(TARGET_DARWIN_OSX)
// darwins GetFirstOpticalDeviceFileName only gives us something
// when a disc is inserted
// so we have to refresh m_strFirstAvailDrive when this happens after Initialize
@@ -695,7 +695,7 @@ std::vector<std::string> CMediaManager::GetDiskUsage()
void CMediaManager::OnStorageAdded(const MEDIA_DETECT::STORAGE::StorageDevice& device)
{
-#ifdef HAS_DVD_DRIVE
+#ifdef HAS_OPTICAL_DRIVE
const std::shared_ptr<CSettings> settings = CServiceBroker::GetSettingsComponent()->GetSettings();
if (settings->GetInt(CSettings::SETTING_AUDIOCDS_AUTOACTION) != AUTOCD_NONE || settings->GetBool(CSettings::SETTING_DVDS_AUTORUN))
{
@@ -808,7 +808,7 @@ bool CMediaManager::playStubFile(const CFileItem& item)
if (HasOpticalDrive())
{
-#ifdef HAS_DVD_DRIVE
+#ifdef HAS_OPTICAL_DRIVE
if (CGUIDialogPlayEject::ShowAndGetInput(strLine1, strLine2))
return MEDIA_DETECT::CAutorun::PlayDiscAskResume();
#endif
diff --git a/xbmc/storage/MediaManager.h b/xbmc/storage/MediaManager.h
index af76bb6e2a..c64c10be21 100644
--- a/xbmc/storage/MediaManager.h
+++ b/xbmc/storage/MediaManager.h
@@ -58,7 +58,7 @@ public:
bool HasOpticalDrive();
std::string TranslateDevicePath(const std::string& devicePath, bool bReturnAsDevice=false);
DriveState GetDriveStatus(const std::string& devicePath = "");
-#ifdef HAS_DVD_DRIVE
+#ifdef HAS_OPTICAL_DRIVE
MEDIA_DETECT::CCdInfo* GetCdInfo(const std::string& devicePath="");
bool RemoveCdInfo(const std::string& devicePath="");
std::string GetDiskLabel(const std::string& devicePath="");
@@ -109,7 +109,7 @@ protected:
std::vector<CNetworkLocation> m_locations;
CCriticalSection m_muAutoSource, m_CritSecStorageProvider;
-#ifdef HAS_DVD_DRIVE
+#ifdef HAS_OPTICAL_DRIVE
std::map<std::string,MEDIA_DETECT::CCdInfo*> m_mapCdInfo;
#endif
bool m_bhasoptical;
@@ -137,7 +137,7 @@ private:
const std::string& thumb) const;
std::unique_ptr<IStorageProvider> m_platformStorage;
-#ifdef HAS_DVD_DRIVE
+#ifdef HAS_OPTICAL_DRIVE
std::shared_ptr<IDiscDriveHandler> m_platformDiscDriveHander;
#endif
diff --git a/xbmc/video/ContextMenus.cpp b/xbmc/video/ContextMenus.cpp
index 4a655b66ab..0fadc7efe6 100644
--- a/xbmc/video/ContextMenus.cpp
+++ b/xbmc/video/ContextMenus.cpp
@@ -198,7 +198,7 @@ void SetPathAndPlay(CFileItem& item)
bool CVideoResume::Execute(const std::shared_ptr<CFileItem>& itemIn) const
{
CFileItem item(itemIn->GetItemToPlay());
-#ifdef HAS_DVD_DRIVE
+#ifdef HAS_OPTICAL_DRIVE
if (item.IsDVD() || item.IsCDDA())
return MEDIA_DETECT::CAutorun::PlayDisc(item.GetPath(), true, false);
#endif
@@ -226,7 +226,7 @@ bool CVideoPlay::IsVisible(const CFileItem& item) const
bool CVideoPlay::Execute(const std::shared_ptr<CFileItem>& itemIn) const
{
CFileItem item(itemIn->GetItemToPlay());
-#ifdef HAS_DVD_DRIVE
+#ifdef HAS_OPTICAL_DRIVE
if (item.IsDVD() || item.IsCDDA())
return MEDIA_DETECT::CAutorun::PlayDisc(item.GetPath(), true, true);
#endif
diff --git a/xbmc/video/windows/GUIWindowVideoBase.cpp b/xbmc/video/windows/GUIWindowVideoBase.cpp
index 2ace37ed94..c4348af263 100644
--- a/xbmc/video/windows/GUIWindowVideoBase.cpp
+++ b/xbmc/video/windows/GUIWindowVideoBase.cpp
@@ -124,7 +124,7 @@ bool CGUIWindowVideoBase::OnMessage(CGUIMessage& message)
case GUI_MSG_CLICKED:
{
int iControl = message.GetSenderId();
-#if defined(HAS_DVD_DRIVE)
+#if defined(HAS_OPTICAL_DRIVE)
if (iControl == CONTROL_PLAY_DVD)
{
// play movie...
diff --git a/xbmc/windows/GUIWindowFileManager.cpp b/xbmc/windows/GUIWindowFileManager.cpp
index 1b1ac0113b..627d127de2 100644
--- a/xbmc/windows/GUIWindowFileManager.cpp
+++ b/xbmc/windows/GUIWindowFileManager.cpp
@@ -190,7 +190,7 @@ bool CGUIWindowFileManager::OnAction(const CAction &action)
}
if (action.GetID() == ACTION_PLAYER_PLAY)
{
-#ifdef HAS_DVD_DRIVE
+#ifdef HAS_OPTICAL_DRIVE
if (m_vecItems[list]->Get(GetSelectedItem(list))->IsDVD())
return MEDIA_DETECT::CAutorun::PlayDiscAskResume(m_vecItems[list]->Get(GetSelectedItem(list))->GetPath());
#endif