mirror of
https://github.com/NicolasConstant/BirdsiteLive
synced 2025-06-05 21:49:16 +02:00
fix gif attachment type, fix #61
This commit is contained in:
@@ -89,8 +89,8 @@ namespace BirdsiteLive.Twitter.Extractors
|
|||||||
switch (mediaType)
|
switch (mediaType)
|
||||||
{
|
{
|
||||||
case "photo":
|
case "photo":
|
||||||
var ext = Path.GetExtension(mediaUrl);
|
var pExt = Path.GetExtension(mediaUrl);
|
||||||
switch (ext)
|
switch (pExt)
|
||||||
{
|
{
|
||||||
case ".jpg":
|
case ".jpg":
|
||||||
case ".jpeg":
|
case ".jpeg":
|
||||||
@@ -101,8 +101,15 @@ namespace BirdsiteLive.Twitter.Extractors
|
|||||||
return null;
|
return null;
|
||||||
|
|
||||||
case "animated_gif":
|
case "animated_gif":
|
||||||
|
var vExt = Path.GetExtension(mediaUrl);
|
||||||
|
switch (vExt)
|
||||||
|
{
|
||||||
|
case ".gif":
|
||||||
|
return "image/gif";
|
||||||
|
case ".mp4":
|
||||||
|
return "video/mp4";
|
||||||
|
}
|
||||||
return "image/gif";
|
return "image/gif";
|
||||||
|
|
||||||
case "video":
|
case "video":
|
||||||
return "video/mp4";
|
return "video/mp4";
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user