Skip to content

Commit

Permalink
YouTube, ニコニコ動画, Vimeo のサムネイルに IsPlayable = true を追加
Browse files Browse the repository at this point in the history
  • Loading branch information
upsilon committed Feb 11, 2015
1 parent 8cb6284 commit 47d7a15
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 10 deletions.
3 changes: 2 additions & 1 deletion OpenTween/Thumbnail/Services/Nicovideo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,8 @@ public override Task<ThumbnailInfo> GetThumbnailInfoAsync(string url, PostClass
{
ImageUrl = url,
ThumbnailUrl = imgurl,
TooltipText = sb.ToString().Trim()
TooltipText = sb.ToString().Trim(),
IsPlayable = true,
};
}
}
Expand Down
1 change: 1 addition & 0 deletions OpenTween/Thumbnail/Services/Vimeo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ public override async Task<ThumbnailInfo> GetThumbnailInfoAsync(string url, Post
ImageUrl = url,
ThumbnailUrl = thumbUrlElm.Value,
TooltipText = tooltipText,
IsPlayable = true,
};
}
catch (HttpRequestException) { }
Expand Down
1 change: 1 addition & 0 deletions OpenTween/Thumbnail/Services/Youtube.cs
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ public override Task<ThumbnailInfo> GetThumbnailInfoAsync(string url, PostClass
ImageUrl = url,
ThumbnailUrl = imgUrl,
TooltipText = sb.ToString().Trim(),
IsPlayable = true,
};
}

Expand Down
18 changes: 9 additions & 9 deletions OpenTween/Thumbnail/ThumbnailGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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}"),

Expand Down Expand Up @@ -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(?<id>\d+)",
Expand Down Expand Up @@ -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}"),

Expand Down

0 comments on commit 47d7a15

Please sign in to comment.