MasterPuppeteer

Added publication date.

......@@ -109,6 +109,7 @@ class PopcornFlixPuppet implements InstallablePuppet {
video.getString('title'),
video.getString('description'),
video.getJSONObject('contentDetails').getLong('duration'),
video.getJSONObject('metadata').getString('publishedDate'),
thumbnails.has('default') ? thumbnails.getString('default') : mImageUrl,
thumbnails.has('standard') ? thumbnails.getString('standard') : mBackgroundImageUrl
)
......@@ -246,22 +247,24 @@ class PopcornFlixPuppet implements InstallablePuppet {
String mName
String mShortDescription
long mDuration
String mPublicationDate
String mImageUrl
String mBackgroundImageUrl
PopcornFlixSourcesPuppet(parent, id, name, shortDescription, duration, imageUrl, backgroundImageUrl) {
PopcornFlixSourcesPuppet(parent, id, name, shortDescription, duration, publicationDate, imageUrl, backgroundImageUrl) {
mParent = parent
mId = id
mName = name
mShortDescription = shortDescription
mDuration = duration * 1000l
mPublicationDate = publicationDate
mImageUrl = imageUrl
mBackgroundImageUrl = backgroundImageUrl
}
@Override
String getPublicationDate() {
return null
return mPublicationDate ? mPublicationDate.split('T')[0] : null
}
@Override
......