Permalink
Browse files

CSmartPlaylist: support multiple OR'ed conditions in a single rule

  • Loading branch information...
1 parent beb7df6 commit a490fbdb4e7d43d5d8967bce1616664819622b1b @Montellese committed Jun 8, 2012
Showing with 267 additions and 192 deletions.
  1. +260 −185 xbmc/playlists/SmartPlayList.cpp
  2. +7 −7 xbmc/playlists/SmartPlayList.h
@@ -62,9 +62,10 @@ class CSmartPlaylistRule
TEXTIN_FIELD
};
- CStdString GetWhereClause(CDatabase &db, const CStdString& strType) const;
- void TranslateStrings(const char *field, const char *oper, const char *parameter);
+ bool Load(TiXmlElement *element, const CStdString &encoding = "UTF-8");
+ bool Save(TiXmlNode *parent) const;
+ CStdString GetWhereClause(CDatabase &db, const CStdString& strType) const;
static Field TranslateField(const char *field);
static CStdString TranslateField(Field field);
static SortBy TranslateOrder(const char *order);
@@ -79,17 +80,16 @@ class CSmartPlaylistRule
static std::vector<SortBy> GetOrders(const CStdString &type);
static FIELD_TYPE GetFieldType(Field field);
- CStdString GetLocalizedRule() const;
-
- TiXmlElement GetAsElement() const;
+ CStdString GetLocalizedRule(const CStdString &type) const;
+ CStdString GetLocalizedParameter(const CStdString &type) const;
Field m_field;
SEARCH_OPERATOR m_operator;
- CStdString m_parameter;
+ std::vector<CStdString> m_parameter;
private:
static SEARCH_OPERATOR TranslateOperator(const char *oper);
- CStdString GetVideoResolutionQuery(void) const;
+ CStdString GetVideoResolutionQuery(const CStdString &parameter) const;
};
class CSmartPlaylist

0 comments on commit a490fbd

Please sign in to comment.