Convert extension method to extension property
This commit is contained in:
@@ -303,20 +303,20 @@ public class GuiCommand
|
||||
|
||||
if (File.Exists(path) && osd)
|
||||
{
|
||||
if (FileTypes.IsAudio(path.Ext()))
|
||||
if (FileTypes.IsAudio(path.Ext))
|
||||
{
|
||||
text = Player.GetPropertyOsdString("filtered-metadata");
|
||||
Player.CommandV("show-text", text, "5000");
|
||||
return;
|
||||
}
|
||||
else if (FileTypes.IsImage(path.Ext()))
|
||||
else if (FileTypes.IsImage(path.Ext))
|
||||
{
|
||||
fileSize = new FileInfo(path).Length;
|
||||
|
||||
text = "Width: " + Player.GetPropertyInt("width") + "\n" +
|
||||
"Height: " + Player.GetPropertyInt("height") + "\n" +
|
||||
"Size: " + Convert.ToInt32(fileSize / 1024.0) + " KB\n" +
|
||||
"Type: " + path.Ext().ToUpper();
|
||||
"Type: " + path.Ext.ToUpper();
|
||||
|
||||
Player.CommandV("show-text", text, "5000");
|
||||
return;
|
||||
|
||||
@@ -556,12 +556,12 @@ public partial class MainForm : Form
|
||||
if (App.AutofitImage > 1)
|
||||
App.AutofitImage = 1;
|
||||
|
||||
bool isAudio = FileTypes.IsAudio(Player.Path.Ext());
|
||||
bool isAudio = FileTypes.IsAudio(Player.Path.Ext);
|
||||
|
||||
if (isAudio)
|
||||
autoFitHeight = Convert.ToInt32(workingArea.Height * App.AutofitAudio);
|
||||
|
||||
if (FileTypes.IsImage(Player.Path.Ext()))
|
||||
if (FileTypes.IsImage(Player.Path.Ext))
|
||||
autoFitHeight = Convert.ToInt32(workingArea.Height * App.AutofitImage);
|
||||
|
||||
if (Player.VideoSize.Height == 0 || Player.VideoSize.Width == 0)
|
||||
|
||||
Reference in New Issue
Block a user