5
5
import com .sun .jna .platform .win32 .VersionHelpers ;
6
6
import javafx .application .Platform ;
7
7
import mediathek .config .*;
8
+ import mediathek .controller .SenderFilmlistLoadApprover ;
8
9
import mediathek .controller .history .SeenHistoryMigrator ;
9
10
import mediathek .daten .IndexedFilmList ;
10
11
import mediathek .gui .dialog .DialogStarteinstellungen ;
@@ -504,6 +505,8 @@ public static void main(final String... args) {
504
505
505
506
loadConfigurationData ();
506
507
508
+ activateNewSenders ();
509
+
507
510
migrateSeenHistory ();
508
511
Daten .getInstance ().launchHistoryDataLoading ();
509
512
Daten .getInstance ().getListeBookmarkList ().loadFromFile ();
@@ -519,6 +522,29 @@ public static void main(final String... args) {
519
522
});
520
523
}
521
524
525
+ /**
526
+ * Activate all senders when MediathekView adds additional ones.
527
+ * For newer versions configKey must be adapted.
528
+ */
529
+ private static void activateNewSenders () {
530
+ final String configKey = "newSendersActivated.fourteen.three" ;
531
+ var alreadyActivated = ApplicationConfiguration .getConfiguration ().getBoolean (configKey , false );
532
+ if (!alreadyActivated ) {
533
+ splashScreen .ifPresent (s -> s .setVisible (false ));
534
+ var res = JOptionPane .showConfirmDialog (null ,
535
+ "<html>Diese Version unterstützt neue Sender, die in den Einstellungen aktiviert werden müssen.<br/>" +
536
+ "Soll MediathekView einmalig alle Sender aktivieren?</html>" ,
537
+ Konstanten .PROGRAMMNAME , JOptionPane .YES_NO_OPTION , JOptionPane .QUESTION_MESSAGE );
538
+ if (res == JOptionPane .YES_OPTION ) {
539
+ logger .info ("Activating new senders..." );
540
+ SenderFilmlistLoadApprover .approveAll ();
541
+ ApplicationConfiguration .getConfiguration ().setProperty (configKey , true );
542
+ }
543
+
544
+ splashScreen .ifPresent (s -> s .setVisible (true ));
545
+ }
546
+ }
547
+
522
548
/**
523
549
* Remove modern search index when not in use.
524
550
*/
0 commit comments