Skip to content

Commit

Permalink
Revert "fixup! [VideoPlayer] Support filename mangling for MVC files v2"
Browse files Browse the repository at this point in the history
This reverts commit cafafc8.
  • Loading branch information
popcornmix committed Feb 4, 2016
1 parent e419e54 commit f48bb91
Showing 1 changed file with 9 additions and 28 deletions.
37 changes: 9 additions & 28 deletions xbmc/cores/VideoPlayer/DVDInputStreams/DVDFactoryInputStream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
#include "settings/Settings.h"
#include "utils/log.h"


CDVDInputStream* CDVDFactoryInputStream::CreateInputStream(IVideoPlayer* pPlayer, CFileItem fileitem)
{
std::string file = fileitem.GetPath();
Expand All @@ -59,42 +60,22 @@ CDVDInputStream* CDVDFactoryInputStream::CreateInputStream(IVideoPlayer* pPlayer
URIUtils::RemoveSlashAtEnd(temp);
ssif_file = URIUtils::GetDirectory(temp);
}
else if (fileitem.IsDiscImage())
else if(fileitem.IsDiscImage())
{
CURL url("udf://");
url.SetHostName(file);
ssif_file = url.Get();
}
if (!ssif_file.empty())
{
bool isSSIF = false;
std::string fileName = URIUtils::GetFileName(file);
unsigned int playlist;
if (URIUtils::HasExtension(fileName, ".mpls") && sscanf(fileName.c_str(), "%05u.mpls", &playlist) == 1)
{
fileName = fileName.replace(fileName.end() - 4, fileName.end(), "ssif");
ssif_file = ssif_file.append("BDMV/STREAM/SSIF/" + fileName);
if (XFILE::CFile::Exists(ssif_file))
{
fileitem.SetPath(ssif_file);
isSSIF = true;
}
}
else
{
ssif_file = ssif_file.append("BDMV/STREAM/SSIF");
CFileItemList _3ditems;
XFILE::CDirectory::GetDirectory(ssif_file, _3ditems, XFILE::CDirectory::CHints(), true);
if (!_3ditems.IsEmpty())
{
_3ditems.Sort(SortByTrackNumber, SortOrderDescending);
_3ditems.Sort(SortBySize, SortOrderDescending);
fileitem.SetPath(_3ditems[0]->GetPath());
isSSIF = true;
}
}
if (isSSIF)
CURL url3(ssif_file.append("BDMV/STREAM/SSIF"));
CFileItemList _3ditems;
XFILE::CDirectory::GetDirectory(url3, _3ditems, XFILE::CDirectory::CHints(), true);
if (!_3ditems.IsEmpty())
{
_3ditems.Sort(SortByTrackNumber, SortOrderDescending);
_3ditems.Sort(SortBySize, SortOrderDescending);
fileitem.SetPath(_3ditems[0]->GetPath());
CLog::Log(LOGNOTICE, "CDVDFactoryInputStream::CreateInputStream - <f1> %s <f2> %s <ssif> %s", CURL::Decode(file).c_str(), CURL::Decode(fileitem.GetPath()).c_str(), ssif_file.c_str());
return (new CDVDInputStreamFile(fileitem));
}
Expand Down

0 comments on commit f48bb91

Please sign in to comment.