Uploaded image for project: 'Inline Media'
  1. Inline Media
  2. INLINEMEDIA-42

YouTube API changes implies no possibility to get playlist thumbnails

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • 1.7.0
    • 1.6.0
    • None

      From recent YouTube API changes, we are not able to get Playlist thumbnails anymore.
      A new URL has to be called (https://www.googleapis.com/youtube/v3/videos?id=VIDEO_ID&part=snippet&key=API_KEY) using API_KEY generated from Google account.

          [INLINEMEDIA-42] YouTube API changes implies no possibility to get playlist thumbnails

          Finally, the google-api-key was backported on 3.7.2 version. You do not need to declare your own google-api-key site parameter if you use a 3.7.2 snapshot.

          Laurence Aumeunier added a comment - Finally, the google-api-key was backported on 3.7.2 version. You do not need to declare your own google-api-key site parameter if you use a 3.7.2 snapshot.

          Thank you so much Laurence !

          Bérénice Maurel added a comment - Thank you so much Laurence !

          Laurence Aumeunier added a comment - - edited

          This fix implies to use a google-api-key site parameter.
          This parameter is present in 3.8 version.

          For 3.7.x versions, you need to declare your own google-api-key site parameter :

          <extension point="org.ametys.web.site.SiteConfigurationExtensionPoint"
                            id="google.api.key">
                <param id="google-api-key" type="string">
                      <label i18n="true">GOOGLE_APIKEY_LABEL</label>
                      <description i18n="true">GOOGLE_APIKEY_DESC</description>
                      <category i18n="true">GOOGLE_APIKEY_CATEGORY</category>
                      <group i18n="true">GOOGLE_APIKEY_GROUP</group>
                 </param>
          </extension>
          

          Laurence Aumeunier added a comment - - edited This fix implies to use a google-api-key site parameter. This parameter is present in 3.8 version. For 3.7.x versions, you need to declare your own google-api-key site parameter : <extension point= "org.ametys.web.site.SiteConfigurationExtensionPoint" id= "google.api.key" > <param id= "google-api-key" type= "string" > <label i18n= "true" > GOOGLE_APIKEY_LABEL </label> <description i18n= "true" > GOOGLE_APIKEY_DESC </description> <category i18n= "true" > GOOGLE_APIKEY_CATEGORY </category> <group i18n= "true" > GOOGLE_APIKEY_GROUP </group> </param> </extension>

          This patch :

          • Replace the old API by the new API
          • Add a service parameter to configure the YouTube API Key

          You can also find a repository script to migrate current YouTube gallery services to add the new mandatory service parameter apikey. Don't forget to replace YouTube TO_REPLACE_BY_THE_API_KEY word by your API key.

          Finally, the data duration is no more available in the playlist items data, you're forced to search a single video to get its duration. Maybe we should get the video duration optionnaly to avoid slowdowns.

          Bérénice Maurel added a comment - This patch : Replace the old API by the new API Add a service parameter to configure the YouTube API Key You can also find a repository script to migrate current YouTube gallery services to add the new mandatory service parameter apikey. Don't forget to replace YouTube TO_REPLACE_BY_THE_API_KEY word by your API key. Finally, the data duration is no more available in the playlist items data, you're forced to search a single video to get its duration. Maybe we should get the video duration optionnaly to avoid slowdowns.

          David Cartier-Michaud added a comment - May be it could help : https://www.youtube.com/watch?v=-vH2eZAM30s

          Effectively, it's better for playlists, the first URL is only for a single video. But now, it require an API_KEY generated from a Google/YouTube, then a new service parameter.

          Bérénice Maurel added a comment - Effectively, it's better for playlists, the first URL is only for a single video. But now, it require an API_KEY generated from a Google/YouTube, then a new service parameter.

          Cédric Damioli added a comment - What about https://developers.google.com/youtube/v3/docs/playlists/list ?

            bmaurel Bérénice Maurel
            dcartier David Cartier-Michaud
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: