Skip to content

Commit

Permalink
some logging
Browse files Browse the repository at this point in the history
  • Loading branch information
phunkyfish committed Nov 2, 2023
1 parent 43f2078 commit 73e15a8
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/iptvsimple/Media.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ void Media::GetMedia(std::vector<kodi::addon::PVRRecording>& 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);
}
}
Expand Down
1 change: 1 addition & 0 deletions src/iptvsimple/PlaylistLoader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
}
}
Expand Down
8 changes: 8 additions & 0 deletions src/iptvsimple/data/MediaEntry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include "MediaEntry.h"

#include "../InstanceSettings.h"
#include "../utilities/Logger.h"

#include <kodi/General.h>
#include <kodi/tools/StringUtils.h>
Expand All @@ -17,6 +18,8 @@ using namespace iptvsimple;
using namespace iptvsimple::data;
using namespace kodi::tools;

using namespace iptvsimple::utilities;

void MediaEntry::Reset()
{
// From BaseEntry
Expand Down Expand Up @@ -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);
}

0 comments on commit 73e15a8

Please sign in to comment.