It would be nice if this module could expose a TOKEN that could be used by the "Automatic Nodetitles" module to generate the video node title based on the title of the source video. I have found with my usage of this module, 99% of the time I am just entering in the same title in the node add form as the title from the youtube page.

Comments

Khalor’s picture

Likewise, the token this module exposes seems to be empty - I was at least hoping for the URL for use in Automatic Entity Labels.

liquidcms’s picture

Title: Auto Generate Node Title Based on Source Video » Make video's Title and Description available as tokens.
Category: Feature request » Bug report
Issue summary: View changes

The field shows values of

    video_url (String, 28 characters ) https://youtu.be/iDCxCx5dbeY
    thumbnail_path (String, 61 characters ) public://video_embed_field_thumbnails/youtube/i...
    video_data (String, 34 characters ) a:1:{s:7:"handler";s:7:"youtube";}
    embed_code (NULL)
    description (NULL)

but embed code and description are both empty. There is a token (available for use in ANT) for description; which is likely tied to the field value listed above. But since the field value is empty; the token is as well. Ideally both the video Title and Description would be pulled from the video and made available as tokens.

Since this is both a bug and a feature request; i'll change to bug. Also modifying the title slightly.

liquidcms’s picture

Version: 7.x-2.x-dev » 7.x-2.0-beta11

i grabbed beta11 version of code and i see it now has a config field for adding YouTube API which is required to pull metadata on the video.

And when i add this and resubmit a node with the embed field; the node's field now has the parameter video_data as:

    a:2:{i:0;a:4:{s:4:"kind";s:13:"youtube#video";s:4:"etag";s:57:""kiOs9cZLH2FUp6r6KJ8eyq_LIOk/qIfEcwpCO8nK6Qk06q69I790NBk"";s:2:"id";s:11:"iDCxCx5dbeY";s:7:"snippet";a:10:{s:11:"publishedAt";s:24:"2014-05-01T22:10:25.000Z";s:9:"channelId";s:24:"UCehdft3b4zTcDWOQEY-9BLw";s:5:"title";s:22:"WORLDS 2014 Cali Smoed";s:11:"description";s:22:"WORLDS 2014 Cali Smoed";s:10:"thumbnails";a:5:{s:7:"default";a:3:{s:3:"url";s:46:"https://i.ytimg.com/vi/iDCxCx5dbeY/default.jpg";s:5:"width";i:120;s:6:"height";i:90;}s:6:"medium";a:3:{s:3:"url";s:48:"https://i.ytimg.com/vi/iDCxCx5dbeY/mqdefault.jpg";s:5:"width";i:320;s:6:"height";i:180;}s:4:"high";a:3:{s:3:"url";s:48:"https://i.ytimg.com/vi/iDCxCx5dbeY/hqdefault.jpg";s:5:"width";i:480;s:6:"height";i:360;}s:8:"standard";a:3:{s:3:"url";s:48:"https://i.ytimg.com/vi/iDCxCx5dbeY/sddefault.jpg";s:5:"width";i:640;s:6:"height";i:480;}s:6:"maxres";a:3:{s:3:"url";s:52:"https://i.ytimg.com/vi/iDCxCx5dbeY/maxresdefault.jpg";s:5:"width";i:1280;s:6:"height";i:720;}}s:12:"channelTitle";s:22:"For the LOVE of CHEER!";s:4:"tags";a:7:{i:0;s:10:"cali smoed";i:1;s:11:"worlds 2014";i:2;s:5:"cheer";i:3;s:5:"smoed";i:4;s:21:"California (US State)";i:5;s:12:"worlds cheer";i:6;s:12:"cheer worlds";}s:10:"categoryId";s:2:"17";s:20:"liveBroadcastContent";s:4:"none";s:9:"localized";a:2:{s:5:"title";s:22:"WORLDS 2014 Cali Smoed";s:11:"description";s:22:"WORLDS 2014 Cali Smoed";}}}s:7:"handler";s:7:"youtube";}

which has Title and Description included.

But tokens are still not available for any of this metadata. I am a little confused as to where the tokens come from as there is no token code in this module. I assume the token module (entity token) auto creates tokens for the various parameters for all fields. However the parameters for the field are as listed above and the only ones which show as tokens in the token listing are:

Field "field_video_embed". The following properties may be appended to the token: video_url (Video URL), thumbnail_path (Thumbnail path), description (Description)

these all work (other than description field is empty); but the other parameters do not present as tokens

Syntapse’s picture

Component: Miscellaneous » Code

the following tokens do not yield any results.

[node:field_video:entity:video_url]
[node:field_video:entity:description]
[node:field_video:entity:thumbnail_path]

Storch’s picture

[node:field_video:entity] >> works for me with Media embedded YouTube URL and the "Automatic Entity Label" Module.
The title is generated automatically.