diff options
-rw-r--r-- | language/English/strings.xml | 1 | ||||
-rw-r--r-- | language/German/strings.xml | 1 | ||||
-rw-r--r-- | xbmc/dialogs/GUIDialogSmartPlaylistRule.cpp | 5 | ||||
-rw-r--r-- | xbmc/playlists/SmartPlayList.cpp | 7 | ||||
-rw-r--r-- | xbmc/playlists/SmartPlayList.h | 3 |
5 files changed, 15 insertions, 2 deletions
diff --git a/language/English/strings.xml b/language/English/strings.xml index 2573f8c79f..18ea2278b8 100644 --- a/language/English/strings.xml +++ b/language/English/strings.xml @@ -1889,6 +1889,7 @@ <string id="20454">Listener</string> <string id="20455">Listeners</string> <string id="20456">Set movieset fanart</string> + <string id="20457">Movie set</string> <!-- up to 21329 is reserved for the video db !! !--> <string id="21330">Show hidden files and directories</string> diff --git a/language/German/strings.xml b/language/German/strings.xml index d5aed8c5c8..604a3a35b4 100644 --- a/language/German/strings.xml +++ b/language/German/strings.xml @@ -1924,6 +1924,7 @@ <string id="20453">Episoden</string> <string id="20456">Filmset Fanart setzen</string> + <string id="20457">Zusammenstellung</string> <string id="21330">Versteckte Ordner und Dateien anzeigen</string> <string id="21331">TuxBox Client</string> diff --git a/xbmc/dialogs/GUIDialogSmartPlaylistRule.cpp b/xbmc/dialogs/GUIDialogSmartPlaylistRule.cpp index fa07d3aa36..43e34389f2 100644 --- a/xbmc/dialogs/GUIDialogSmartPlaylistRule.cpp +++ b/xbmc/dialogs/GUIDialogSmartPlaylistRule.cpp @@ -203,6 +203,11 @@ void CGUIDialogSmartPlaylistRule::OnBrowse() UpdateButtons(); return; } + else if (m_rule.m_field == CSmartPlaylistRule::FIELD_SET) + { + videodatabase.GetSetsNav("videodb://1/7/", items, VIDEODB_CONTENT_MOVIES); + iLabel = 20434; + } else { // TODO: Add browseability in here. assert(false); diff --git a/xbmc/playlists/SmartPlayList.cpp b/xbmc/playlists/SmartPlayList.cpp index c8eb70307f..f469e4ebe0 100644 --- a/xbmc/playlists/SmartPlayList.cpp +++ b/xbmc/playlists/SmartPlayList.cpp @@ -94,7 +94,8 @@ static const translateField fields[] = { { "none", CSmartPlaylistRule::FIELD_NON { "subtitlelanguage", CSmartPlaylistRule::FIELD_SUBTITLELANGUAGE, CSmartPlaylistRule::TEXTIN_FIELD, 21448 }, { "videoaspect", CSmartPlaylistRule::FIELD_VIDEOASPECT, CSmartPlaylistRule::NUMERIC_FIELD, 21374 }, { "random", CSmartPlaylistRule::FIELD_RANDOM, CSmartPlaylistRule::TEXT_FIELD, 590 }, - { "playlist", CSmartPlaylistRule::FIELD_PLAYLIST, CSmartPlaylistRule::PLAYLIST_FIELD, 559 } + { "playlist", CSmartPlaylistRule::FIELD_PLAYLIST, CSmartPlaylistRule::PLAYLIST_FIELD, 559 }, + { "set", CSmartPlaylistRule::FIELD_SET, CSmartPlaylistRule::BROWSEABLE_FIELD, 20457 } }; #define NUM_FIELDS sizeof(fields) / sizeof(translateField) @@ -303,6 +304,7 @@ vector<CSmartPlaylistRule::DATABASE_FIELD> CSmartPlaylistRule::GetFields(const C fields.push_back(FIELD_HASTRAILER); fields.push_back(FIELD_FILENAME); fields.push_back(FIELD_PATH); + fields.push_back(FIELD_SET); isVideo = true; // fields.push_back(FIELD_DATEADDED); // no date added yet in db } @@ -511,6 +513,8 @@ CStdString CSmartPlaylistRule::GetWhereClause(CDatabase &db, const CStdString& s query = "lastPlayed is NULL or lastPlayed" + parameter; else if (m_field == FIELD_INPROGRESS) query = "idFile " + negate + " in (select idFile from bookmark where type = 1)"; + else if (m_field == FIELD_SET) + query = "idMovie" + negate + " in (select idMovie from setlinkmovie join sets on sets.idSet=setlinkmovie.idSet where sets.strSet" + parameter + ")"; } else if (strType == "musicvideos") { @@ -673,6 +677,7 @@ CStdString CSmartPlaylistRule::GetDatabaseField(DATABASE_FIELD field, const CStd else if (field == FIELD_PATH) result = "strPath"; else if (field == FIELD_RANDOM) result = "RANDOM()"; // only used for order clauses else if (field == FIELD_DATEADDED) result = "idMovie"; // only used for order clauses + else if (field == FIELD_SET) result = "strSet"; return result; } else if (type == "musicvideos") diff --git a/xbmc/playlists/SmartPlayList.h b/xbmc/playlists/SmartPlayList.h index 72ab5c5b9d..5359a62aa5 100644 --- a/xbmc/playlists/SmartPlayList.h +++ b/xbmc/playlists/SmartPlayList.h @@ -82,7 +82,8 @@ public: FIELD_SUBTITLELANGUAGE, FIELD_VIDEOASPECT, FIELD_PLAYLIST, - FIELD_RANDOM + FIELD_RANDOM, + FIELD_SET }; enum SEARCH_OPERATOR { OPERATOR_START = 0, |