[longomatch] Enable back mpegts remuxing when FullHD is supported



commit 45f65925e9cb5f5743d10f3a483f9e131b30a6e9
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date:   Mon Dec 22 20:41:20 2014 +0100

    Enable back mpegts remuxing when FullHD is supported

 LongoMatch.Core/Config.cs      |    5 +++++
 LongoMatch.GUI.Helpers/Misc.cs |   20 ++++++++++++--------
 2 files changed, 17 insertions(+), 8 deletions(-)
---
diff --git a/LongoMatch.Core/Config.cs b/LongoMatch.Core/Config.cs
index caf2e5b..01c956f 100644
--- a/LongoMatch.Core/Config.cs
+++ b/LongoMatch.Core/Config.cs
@@ -250,6 +250,11 @@ namespace LongoMatch
                        set;
                }
 
+               static public bool SupportsFullHD {
+                       get;
+                       set;
+               }
+
                static public Image FieldBackground {
                        get {
                                return new Image (Path.Combine (Config.ImagesDir, 
Constants.FIELD_BACKGROUND));
diff --git a/LongoMatch.GUI.Helpers/Misc.cs b/LongoMatch.GUI.Helpers/Misc.cs
index 4a14712..a5daa99 100644
--- a/LongoMatch.GUI.Helpers/Misc.cs
+++ b/LongoMatch.GUI.Helpers/Misc.cs
@@ -348,14 +348,18 @@ namespace LongoMatch.Gui.Helpers
                        if (mediaFile != null) {
                                try {
                                        if (multimedia.FileNeedsRemux (mediaFile)) {
-                                               string msg = Catalog.GetString ("This file is not a supported 
format, convert it with video conversion tool");
-                                               throw new Exception (msg);
-//                                             string q = Catalog.GetString ("This file needs to be 
converted into a more suitable format." +
-//                                                     "(this step only requires a few minutes)");
-//                                             gui.InfoMessage (q, parent);
-//                                             string newFilename = multimedia.RemuxFile (mediaFile, parent);
-//                                             if (newFilename != null)
-//                                                     mediaFile = multimedia.DiscoverFile (newFilename);
+                                               if (!Config.SupportsFullHD) {
+                                                       string msg = Catalog.GetString ("This file is not in 
a supported format, " +
+                                                                                       "convert it with the 
video conversion tool");
+                                                       throw new Exception (msg);
+                                               } else {
+                                                       string q = Catalog.GetString ("This file needs to be 
converted into a more suitable format." +
+                                                                                     "(This step will only 
take a few minutes)");
+                                                       gui.InfoMessage (q, parent);
+                                                       string newFilename = multimedia.RemuxFile (mediaFile, 
parent);
+                                                       if (newFilename != null)
+                                                               mediaFile = multimedia.DiscoverFile 
(newFilename);
+                                               }
                                        }
                                } catch (Exception ex) {
                                        gui.ErrorMessage (ex.Message, parent);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]