You are here

public function FeedsYoutubeParser::getMappingSources in Feeds: YouTube Parser 7.3

Same name and namespace in other branches
  1. 6 FeedsYoutubeParser.inc \FeedsYoutubeParser::getMappingSources()
  2. 7.2 FeedsYoutubeParser.inc \FeedsYoutubeParser::getMappingSources()

Add the extra mapping sources provided by this parser.

File

plugins/FeedsYoutubeParser.inc, line 48
Feeds parser class for YouTube.

Class

FeedsYoutubeParser
Class definition for YouTube Parser.

Code

public function getMappingSources() {
  $mapping = array(
    'feed_title' => array(
      'name' => t('Feed title'),
      'description' => t('The title of the pulled feed.'),
    ),
    'guid' => array(
      'name' => t('GUID'),
    ),
    'video_id' => array(
      'name' => t('Video ID'),
      'description' => t('YouTube video unique ID.'),
    ),
    'title' => array(
      'name' => t('Video title'),
      'description' => t('Video title.'),
    ),
    'published_datetime' => array(
      'name' => t('Published on (Datetime)'),
    ),
    'published_timestamp' => array(
      'name' => t('Published on (Timestamp)'),
    ),
    'description' => array(
      'name' => t('Description'),
    ),
    'thumbnail_default' => array(
      'name' => t('Thumbnail (default)'),
      'description' => t('URL to default thumbnail of the video.'),
    ),
    'thumbnail_medium' => array(
      'name' => t('Thumbnail (medium)'),
      'description' => t('URL to medium size thumbnail of the video.'),
    ),
    'thumbnail_high' => array(
      'name' => t('Thumbnail (high)'),
      'description' => t('URL of the thumbnail of the video.'),
    ),
    'thumbnail_standard' => array(
      'name' => t('Thumbnail'),
      'description' => t('URL to high res thumbnail of the video.'),
    ),
    'category' => array(
      'name' => t('Category'),
    ),
    'tags' => array(
      'name' => t('Tags'),
      'description' => t('This can be imported directly with Taxonomy "tags" vocabularies.'),
    ),
    'video_url' => array(
      'name' => t('Video URL'),
      'description' => t('The URL of the video.'),
    ),
    'duration' => array(
      'name' => t('Duration (Formatted)'),
      'description' => t('Duration of the video in HH:MM:SS format.'),
    ),
    'duration_raw' => array(
      'name' => t('Duration (Seconds)'),
      'description' => t('Duration of the video in number of seconds.'),
    ),
  );
  $private = array(
    'embedded_player' => array(
      'name' => t('Embed Player'),
      'description' => t('Embed Player HTML code.'),
    ),
    'fav_count' => array(
      'name' => t('Favorite count'),
    ),
    'view_count' => array(
      'name' => t('View count'),
    ),
    'likes' => array(
      'name' => t('Number of likes'),
    ),
    'dislikes' => array(
      'name' => t('Number of dislikes'),
    ),
  );
  if (isset($this->config['authenticated_on_channel']) && $this->config['authenticated_on_channel'] != 0) {
    $mapping += $private;
  }
  return parent::getMappingSources() + $mapping;
}