This includes TV Shows (first path), seasons, episodes, movies, sets (multipath).
msgctxt "#36040"
msgid "Unsupported libCEC interface version. %x is lower than the version XBMC supports (%x)"
msgstr ""
+
+msgctxt "#36041"
+msgid "* Item folder"
+msgstr ""
return newPath;
}
+CStdString CMultiPathDirectory::ConstructMultiPath(const std::set<CStdString> &setPaths)
+{
+ CStdString newPath = "multipath://";
+ for (std::set<CStdString>::const_iterator path = setPaths.begin(); path != setPaths.end(); ++path)
+ AddToMultiPath(newPath, *path);
+
+ return newPath;
+}
+
void CMultiPathDirectory::MergeItems(CFileItemList &items)
{
CLog::Log(LOGDEBUG, "CMultiPathDirectory::MergeItems, items = %i", (int)items.Size());
*/
#include "IDirectory.h"
+#include <set>
namespace XFILE
{
static bool GetPaths(const CStdString& strPath, std::vector<CStdString>& vecPaths);
static bool HasPath(const CStdString& strPath, const CStdString& strPathToFind);
static CStdString ConstructMultiPath(const std::vector<CStdString> &vecPaths);
+ static CStdString ConstructMultiPath(const std::set<CStdString> &setPaths);
private:
void MergeItems(CFileItemList &items);
#include "utils/StringUtils.h"
#include "utils/Variant.h"
#include "video/VideoInfoTag.h"
+#include "utils/URIUtils.h"
+#include "filesystem/MultiPathDirectory.h"
using namespace std;
int ratings = 0;
int iWatched = 0; // have all the movies been played at least once?
+ std::set<CStdString> pathSet;
for (std::set<CFileItemPtr>::const_iterator movie = set->second.begin(); movie != set->second.end(); movie++)
{
CVideoInfoTag* movieInfo = (*movie)->GetVideoInfoTag();
setInfo->m_playCount += movieInfo->m_playCount;
if (movieInfo->m_playCount > 0)
iWatched++;
+
+ //accumulate the path for a multipath construction
+ CFileItem video(movieInfo->m_basePath, false);
+ if (video.IsVideo())
+ pathSet.insert(URIUtils::GetParentPath(movieInfo->m_basePath));
+ else
+ pathSet.insert(movieInfo->m_basePath);
}
+ setInfo->m_basePath = XFILE::CMultiPathDirectory::ConstructMultiPath(pathSet);
if (ratings > 1)
pItem->GetVideoInfoTag()->m_fRating /= ratings;
#include "music/MusicDatabase.h"
#include "URL.h"
#include "video/VideoThumbLoader.h"
+#include "filesystem/Directory.h"
using namespace std;
using namespace XFILE;
CStdString result;
VECSOURCES sources(g_settings.m_videoSources);
+ AddItemPathToFileBrowserSources(sources, *m_movieItem);
g_mediaManager.GetLocalDrives(sources);
if (!CGUIDialogFileBrowser::ShowAndGetImage(items, sources, g_localizeStrings.Get(13511), result))
return; // user cancelled
CStdString result;
VECSOURCES sources(g_settings.m_videoSources);
+ AddItemPathToFileBrowserSources(sources, item);
g_mediaManager.GetLocalDrives(sources);
bool flip=false;
if (!CGUIDialogFileBrowser::ShowAndGetImage(items, sources, g_localizeStrings.Get(20437), result, &flip, 20445) || result.Equals("fanart://Current"))
{
return m_movieItem->GetArt("thumb");
}
+
+void CGUIDialogVideoInfo::AddItemPathToFileBrowserSources(VECSOURCES &sources, const CFileItem &item)
+{
+ if (!item.HasVideoInfoTag())
+ return;
+
+ CStdString itemDir = item.GetVideoInfoTag()->m_basePath;
+
+ //season
+ if (itemDir.IsEmpty())
+ itemDir = item.GetVideoInfoTag()->GetPath();
+
+ CFileItem itemTmp(itemDir, false);
+ if (itemTmp.IsVideo())
+ itemDir = URIUtils::GetParentPath(itemDir);
+
+ if (!itemDir.IsEmpty() && CDirectory::Exists(itemDir))
+ {
+ CMediaSource itemSource;
+ itemSource.strName = g_localizeStrings.Get(36041);
+ itemSource.strPath = itemDir;
+ sources.push_back(itemSource);
+ }
+}
virtual bool HasListItems() const { return true; };
static std::string ChooseArtType(const CFileItem &item, std::map<std::string, std::string> ¤tArt);
+ static void AddItemPathToFileBrowserSources(VECSOURCES &sources, const CFileItem &item);
protected:
virtual void OnInitWindow();
void Update();
VECSOURCES sources=g_settings.m_videoSources;
g_mediaManager.GetLocalDrives(sources);
CStdString result;
+ CGUIDialogVideoInfo::AddItemPathToFileBrowserSources(sources, *item);
if (!CGUIDialogFileBrowser::ShowAndGetImage(items, sources,
g_localizeStrings.Get(13511), result))
{
CStdString result;
VECSOURCES sources(g_settings.m_videoSources);
g_mediaManager.GetLocalDrives(sources);
+ CGUIDialogVideoInfo::AddItemPathToFileBrowserSources(sources, item);
bool flip=false;
if (!CGUIDialogFileBrowser::ShowAndGetImage(items, sources, g_localizeStrings.Get(20437), result, &flip, 20445) || result.Equals("fanart://Current"))
return;