From 47d7a15480faab38b50d0a393c01dd663759f404 Mon Sep 17 00:00:00 2001 From: Kimura Youichi Date: Wed, 11 Feb 2015 13:07:11 +0900 Subject: [PATCH] =?UTF-8?q?YouTube,=20=E3=83=8B=E3=82=B3=E3=83=8B=E3=82=B3?= =?UTF-8?q?=E5=8B=95=E7=94=BB,=20Vimeo=20=E3=81=AE=E3=82=B5=E3=83=A0?= =?UTF-8?q?=E3=83=8D=E3=82=A4=E3=83=AB=E3=81=AB=20IsPlayable=20=3D=20true?= =?UTF-8?q?=20=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- OpenTween/Thumbnail/Services/Nicovideo.cs | 3 ++- OpenTween/Thumbnail/Services/Vimeo.cs | 1 + OpenTween/Thumbnail/Services/Youtube.cs | 1 + OpenTween/Thumbnail/ThumbnailGenerator.cs | 18 +++++++++--------- 4 files changed, 13 insertions(+), 10 deletions(-) diff --git a/OpenTween/Thumbnail/Services/Nicovideo.cs b/OpenTween/Thumbnail/Services/Nicovideo.cs index 512efc379..ee239ccb4 100644 --- a/OpenTween/Thumbnail/Services/Nicovideo.cs +++ b/OpenTween/Thumbnail/Services/Nicovideo.cs @@ -185,7 +185,8 @@ public override Task GetThumbnailInfoAsync(string url, PostClass { ImageUrl = url, ThumbnailUrl = imgurl, - TooltipText = sb.ToString().Trim() + TooltipText = sb.ToString().Trim(), + IsPlayable = true, }; } } diff --git a/OpenTween/Thumbnail/Services/Vimeo.cs b/OpenTween/Thumbnail/Services/Vimeo.cs index 89d16d2a4..4d080946c 100644 --- a/OpenTween/Thumbnail/Services/Vimeo.cs +++ b/OpenTween/Thumbnail/Services/Vimeo.cs @@ -93,6 +93,7 @@ public override async Task GetThumbnailInfoAsync(string url, Post ImageUrl = url, ThumbnailUrl = thumbUrlElm.Value, TooltipText = tooltipText, + IsPlayable = true, }; } catch (HttpRequestException) { } diff --git a/OpenTween/Thumbnail/Services/Youtube.cs b/OpenTween/Thumbnail/Services/Youtube.cs index 0bf99d84a..835d55328 100644 --- a/OpenTween/Thumbnail/Services/Youtube.cs +++ b/OpenTween/Thumbnail/Services/Youtube.cs @@ -178,6 +178,7 @@ public override Task GetThumbnailInfoAsync(string url, PostClass ImageUrl = url, ThumbnailUrl = imgUrl, TooltipText = sb.ToString().Trim(), + IsPlayable = true, }; } diff --git a/OpenTween/Thumbnail/ThumbnailGenerator.cs b/OpenTween/Thumbnail/ThumbnailGenerator.cs index 7a07b6928..a8bcdefae 100644 --- a/OpenTween/Thumbnail/ThumbnailGenerator.cs +++ b/OpenTween/Thumbnail/ThumbnailGenerator.cs @@ -60,6 +60,15 @@ public static void InitializeGenerator() "${0}", "${0}:orig"), + // youtube + new Youtube(), + + // ニコニコ動画 + new Nicovideo(), + + // vimeo + new Vimeo(), + // DirectLink new SimpleThumbnailService(@"^https?://.*(\.jpg|\.jpeg|\.gif|\.png|\.bmp)$", "${0}"), @@ -121,12 +130,6 @@ public static void InitializeGenerator() "http://twitgoo.com/${1}/mini", "http://twitgoo.com/${1}/img"), - // youtube - new Youtube(), - - // ニコニコ動画 - new Nicovideo(), - // ニコニコ静画 new SimpleThumbnailService( @"^https?://(?:seiga\.nicovideo\.jp/seiga/|nico\.ms/)im(?\d+)", @@ -160,9 +163,6 @@ public static void InitializeGenerator() // ow.ly new SimpleThumbnailService(@"^https?://ow\.ly/i/(\w+)$", "http://static.ow.ly/photos/thumb/${1}.jpg"), - // vimeo - new Vimeo(), - // cloudfiles new SimpleThumbnailService(@"^https?://c[0-9]+\.cdn[0-9]+\.cloudfiles\.rackspacecloud\.com/[a-z_0-9]+", "${0}"),