UserTags

From Gvp-public
Revision as of 18:00, 24 March 2015 by Rcalvo (talk | contribs)
Jump to navigation Jump to search

UserTags are structured objects used to represent contents (movies, series...) along with their tags (watched, completed, favorite, etc.). This struct is a key object in the MyTv features, which shows lists of tagged user contents

Members

Field Data Type Description
TaggedContentID int Movie ID (in the case of series -follow-up feature- it will be the ID of the "movie" object -of series type- referring the whole series, not the ID of the SimpleMovie returned "below" in the TaggedContent)
Tags Array of Tag Array of tags for the object (for example, a movie may have tags "watched (3)" (true) + "completed (6)" (true)), including the creation date
ResumeValue int It will contain the resume time value (for objects with "watched" started but not totally "completed"), or "-1" if completed.
  • if the object is a movie, it will contain the resume value of the movie
  • if the object is a series (or season), it will contain the resume value for the "next episode" (the next episode will be returned in the SimpleMovie object)
  • If the content (for example in the case of an episode within series) does not have "watched" tag, it will return "0" (playback not started)
  • if the "resume value" for a "not completed" content is not available (since MongoDB only stores resume data for a limited set of contents), it will return "-2" as the resume value (indicating not available)
TaggedContent SimpleMovie
  • For individual movies (or episodes), it will contain the SimpleMovie object for the requested tag/ID
  • In the case of series or seasons, it will contain the SimpleMovie object for the "next episode", according to this logic: Check for all available episodes to find the highest Season and Episode already watched (completed or resume):
  • if episode is in "resume" (watched), that episode is returned as "next"
  • if episode is "completed", it returns the next available episode (next one within season or first one of next season)
  • if there is not available (new) episode, it returns the "last wached" episode, with -1 (completed) for ResumeValue (Series Completed; meaning that series is completed so far)
  • if there is not any episode already watched, it returns the available episode with highest Season and Episode
  • etc


Example

{

TaggedContentID: movieID001,
Tags: [
Array of Tag
],
ResumeValue: -1 (already "completed'"),
TaggedContent: SimpleMovie object
},
{
TaggedContentID: movieID008,
Tags: [
Array of Tag
],
ResumeValue: 43154 (int) (represents the time already watched),
TaggedContent: SimpleMovie object

}


Known issues

None


Version history

API Version Number Change description Changes author
3.0 Initial data type implementation Jose A. Jiménez


See also