added image format support for the info command
This commit is contained in:
@@ -1,7 +1,8 @@
|
|||||||
### 4.7.3
|
### 4.7.3
|
||||||
|
|
||||||
- fix cursor showing load activity on startup
|
- fix cursor showing load activity on startup
|
||||||
- added file size to info command using audio files
|
- added file size and type to info command using audio files
|
||||||
|
- added image format support for the info command
|
||||||
|
|
||||||
### 4.7.1
|
### 4.7.1
|
||||||
|
|
||||||
|
|||||||
@@ -109,7 +109,22 @@ namespace mpvnet
|
|||||||
if (genre != "") text += "Genre: " + genre + "\n";
|
if (genre != "") text += "Genre: " + genre + "\n";
|
||||||
if (date != "") text += "Year: " + date + "\n";
|
if (date != "") text += "Year: " + date + "\n";
|
||||||
if (duration != "") text += "Length: " + duration + "\n";
|
if (duration != "") text += "Length: " + duration + "\n";
|
||||||
text += "Size: " + mediaInfo.GetInfo(MediaInfoStreamKind.General, "FileSize/String");
|
text += "Size: " + mediaInfo.GetInfo(MediaInfoStreamKind.General, "FileSize/String") + "\n";
|
||||||
|
text += "Type: " + Path.GetExtension(path).ToUpper().TrimStart('.');
|
||||||
|
|
||||||
|
mp.commandv("show-text", text, "5000");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (App.ImageTypes.Contains(Path.GetExtension(path).ToLower().TrimStart('.')))
|
||||||
|
{
|
||||||
|
using (MediaInfo mediaInfo = new MediaInfo(path))
|
||||||
|
{
|
||||||
|
text =
|
||||||
|
"Width: " + mediaInfo.GetInfo(MediaInfoStreamKind.Image, "Width") + "\n" +
|
||||||
|
"Height: " + mediaInfo.GetInfo(MediaInfoStreamKind.Image, "Height") + "\n" +
|
||||||
|
"Size: " + mediaInfo.GetInfo(MediaInfoStreamKind.General, "FileSize/String") + "\n" +
|
||||||
|
"Type: " + Path.GetExtension(path).ToUpper().TrimStart('.');
|
||||||
|
|
||||||
mp.commandv("show-text", text, "5000");
|
mp.commandv("show-text", text, "5000");
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user