File tree Expand file tree Collapse file tree
Project-Aurora/Project-Aurora Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- using Aurora . Modules . Media ;
2- using Aurora . Utils ;
1+ using System ;
2+ using System . Windows ;
3+ using Aurora . Modules . Media ;
34using Lombok . NET ;
45
56namespace Aurora . Modules ;
@@ -11,7 +12,19 @@ public sealed partial class MediaInfoModule : IAuroraModule
1112 [ Async ]
1213 public void Initialize ( )
1314 {
14- _mediaMonitor = new MediaMonitor ( ) ;
15+ if ( ! Global . Configuration . EnableMediaInfo )
16+ {
17+ return ;
18+ }
19+ try
20+ {
21+ _mediaMonitor = new MediaMonitor ( ) ;
22+ }
23+ catch ( Exception e )
24+ {
25+ MessageBox . Show ( "Media Info module could not be loaded.\n Media playback data will not be detected." , "Aurora - Error" ) ;
26+ Global . logger . Error ( "MediaInfo error" , e ) ;
27+ }
1528 }
1629
1730
Original file line number Diff line number Diff line change @@ -517,6 +517,7 @@ public class Configuration : INotifyPropertyChanged
517517 public bool HighPriority { get ; set ; } = false ;
518518 public BitmapAccuracy BitmapAccuracy { get ; set ; } = BitmapAccuracy . Okay ;
519519 public bool EnableAudioCapture { get ; set ; } = false ;
520+ public bool EnableMediaInfo { get ; set ; } = true ;
520521
521522
522523 public int UpdateDelay { get ; set ; } = 30 ;
You can’t perform that action at this time.
0 commit comments