diff --git a/src/iptvsimple/Media.cpp b/src/iptvsimple/Media.cpp index 43070696..f54da479 100644 --- a/src/iptvsimple/Media.cpp +++ b/src/iptvsimple/Media.cpp @@ -31,6 +31,8 @@ void Media::GetMedia(std::vector& kodiRecordings) mediaEntry.UpdateTo(kodiRecording, IsInVirtualMediaEntryFolder(mediaEntry), m_haveMediaTypes); + Logger::Log(LEVEL_ERROR, "%s - XXX Media Entry - dir: '%s', title: '%s'", __FUNCTION__, kodiRecording.GetDirectory().c_str(), kodiRecording.GetTitle().c_str()); + kodiRecordings.emplace_back(kodiRecording); } } diff --git a/src/iptvsimple/PlaylistLoader.cpp b/src/iptvsimple/PlaylistLoader.cpp index a28c7e71..ae2c5fb9 100644 --- a/src/iptvsimple/PlaylistLoader.cpp +++ b/src/iptvsimple/PlaylistLoader.cpp @@ -503,6 +503,7 @@ std::string PlaylistLoader::ParseIntoChannel(const std::string& line, Channel& c { //A media entry directory will always end with a "/" mediaEntry.SetDirectory(mediaEntry.GetDirectory() + groupNames); + Logger::Log(LEVEL_ERROR, "%s - XXX Using group name for directory: %s", __func__, mediaEntry.GetDirectory().c_str()); } } } diff --git a/src/iptvsimple/data/MediaEntry.cpp b/src/iptvsimple/data/MediaEntry.cpp index 9e70d0db..f7aa1b2f 100644 --- a/src/iptvsimple/data/MediaEntry.cpp +++ b/src/iptvsimple/data/MediaEntry.cpp @@ -9,6 +9,7 @@ #include "MediaEntry.h" #include "../InstanceSettings.h" +#include "../utilities/Logger.h" #include #include @@ -17,6 +18,8 @@ using namespace iptvsimple; using namespace iptvsimple::data; using namespace kodi::tools; +using namespace iptvsimple::utilities; + void MediaEntry::Reset() { // From BaseEntry @@ -304,10 +307,15 @@ void MediaEntry::UpdateTo(kodi::addon::PVRRecording& left, bool isInVirtualMedia std::string seasonText = GetMatchTextFromString(m_title, pattern); if (!seasonText.empty()) + { newDirectory = StringUtils::Format("%s%s/%s/", newDirectory.c_str(), m_folderTitle.c_str(), seasonText.c_str()); + // Logger::Log(LEVEL_ERROR, "%s - XXX Season Directory: %s", __FUNCTION__, newDirectory.c_str()); + } } } } + // Logger::Log(LEVEL_ERROR, "%s - XXX New Directory: %s", __FUNCTION__, newDirectory.c_str()); + left.SetDirectory(newDirectory); }