Browse files

Windows: small changes to the videoutils and ringbuffer for Windows.

Support DVD paths in Windows, and use a different seperator for Windows local video file storage.

NB, please *don't* actually use local file storage in Windows.  Use Video Storage groups.  Local Storage is not long for this world.

Refs #9268.
  • Loading branch information...
1 parent 885129b commit bfd7c49cab7029357f505cd63068a3d4cdb6707b Robert McNamara committed Dec 9, 2010
Showing with 7 additions and 0 deletions.
  1. +5 −0 mythtv/libs/libmythmetadata/videoutils.cpp
  2. +2 −0 mythtv/libs/libmythtv/ringbuffer.cpp
View
5 mythtv/libs/libmythmetadata/videoutils.cpp
@@ -74,8 +74,13 @@ QStringList GetVideoDirsByHost(QString host)
if (host.isEmpty())
{
+#ifdef WIN32
+ QStringList tmp3 = gCoreContext->GetSetting("VideoStartupDir",
+ DEFAULT_VIDEOSTARTUP_DIR).split(";", QString::SkipEmptyParts);
+#else
QStringList tmp3 = gCoreContext->GetSetting("VideoStartupDir",
DEFAULT_VIDEOSTARTUP_DIR).split(":", QString::SkipEmptyParts);
+#endif
for (QStringList::iterator p = tmp3.begin(); p != tmp3.end(); ++p)
{
bool matches = false;
View
2 mythtv/libs/libmythtv/ringbuffer.cpp
@@ -161,6 +161,8 @@ RingBuffer *RingBuffer::Create(
lfilename.remove(0,5); // e.g. "dvd://dev/sda"
else if (lfilename.left(5) == "dvd:/") // Less correct URI "dvd:" + path
lfilename.remove(0,4); // e.g. "dvd:/videos/ET"
+ else if (lfilename.left(4) == "dvd:") // Win32 URI "dvd:" + abs path
+ lfilename.remove(0,4); // e.g. "dvd:D:\"
if (QFile::exists(lfilename) || lfilename.startsWith("myth://"))
{

0 comments on commit bfd7c49

Please sign in to comment.