diff options
author | chriszero <zerov83@gmail.com> | 2015-06-26 19:50:55 +0200 |
---|---|---|
committer | chriszero <zerov83@gmail.com> | 2015-06-26 19:50:55 +0200 |
commit | 94c4505e7620a071f86463ec351d3e0dd35146a2 (patch) | |
tree | 6a4256ac6e4181b7b224c475a31a3b101613a054 | |
parent | bc21cd691cd45ce4419a8b9d6b0ee561103c8254 (diff) | |
download | vdr-plugin-plex-94c4505e7620a071f86463ec351d3e0dd35146a2.tar.gz vdr-plugin-plex-94c4505e7620a071f86463ec351d3e0dd35146a2.tar.bz2 |
Finally fixed loop tokens
-rw-r--r-- | Directory.cpp | 10 | ||||
-rw-r--r-- | PVideo.cpp | 11 | ||||
-rw-r--r-- | templates/plug-plex-root.xml | 3 |
3 files changed, 13 insertions, 11 deletions
diff --git a/Directory.cpp b/Directory.cpp index 0ff9fa4..16877f3 100644 --- a/Directory.cpp +++ b/Directory.cpp @@ -95,17 +95,17 @@ void Directory::AddTokens(std::shared_ptr<skindesignerapi::cOsdElement> grid, bo grid->AddIntToken("isdirectory", true); } - map<string, string> roles; for(auto it = m_vRole.begin(); it != m_vRole.end(); it++) { + map<string, string> roles; roles["actor"] = *it; + grid->AddLoopToken("actor[roles]", roles); } - grid->AddLoopToken("roles", roles); - map<string, string> genres; for(auto it = m_vGenre.begin(); it != m_vGenre.end(); it++) { - genres["genre"] = *it; + map<string, string> genres; + genres.insert(std::pair<string, string>("genres[genre]", *it)); + grid->AddLoopToken("genres", genres); } - grid->AddLoopToken("genres", genres); if(m_eType == MediaType::SHOW) { grid->AddIntToken("isshow", true); @@ -266,17 +266,18 @@ void Video::AddTokens(std::shared_ptr<skindesignerapi::cOsdElement> grid, bool c grid->AddIntToken("ismovie", true); } - map<string, string> roles; for(auto it = m_vRole.begin(); it != m_vRole.end(); it++) { + map<string, string> roles; roles["actor"] = *it; + grid->AddLoopToken("actor[roles]", roles); } - grid->AddLoopToken("roles", roles); - map<string, string> genres; for(auto it = m_vGenre.begin(); it != m_vGenre.end(); it++) { - genres["genre"] = *it; + map<string, string> genres; + genres.insert(std::pair<string, string>("genres[genre]", *it)); + grid->AddLoopToken("genres", genres); } - grid->AddLoopToken("genres", genres); + grid->AddIntToken("originallyAvailableYear", m_tOriginallyAvailableAt.year()); grid->AddIntToken("originallyAvailableMonth", m_tOriginallyAvailableAt.month()); diff --git a/templates/plug-plex-root.xml b/templates/plug-plex-root.xml index 92b99c7..49d710a 100644 --- a/templates/plug-plex-root.xml +++ b/templates/plug-plex-root.xml @@ -94,6 +94,7 @@ {seriestitle} Seriestitle {leafCount} Total leafs, episodes {viewedLeafCount} viewed Leafs, episodes + If the item is a video following tokens are avaliable The item is a video if one of the following tokens are set: {ismovie}, {isepisode} @@ -131,7 +132,7 @@ {seriestitle} Title of the series/show {season} int, Season {episode} int, Episode, season based - {hasbanner} bool, Bannerstyle? + {hasbanner} bool, Bannerstyle {banner} Image path {hasseriesthumb} bool, seriesthumb (seasoncover, seriescover) {seriesthumb} Image path |