Convert extension method to extension property

This commit is contained in:
stax76
2026-01-09 07:29:19 +01:00
parent 96afc62165
commit 03d0aeb879
5 changed files with 24 additions and 21 deletions

View File

@@ -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;

View File

@@ -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)