File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 111111 <entry name =" LastVideoDay" type =" String" >
112112 <default ></default >
113113 </entry >
114- <entry name =" LastVideoDayPosition" type =" Int" >
115- <default >0</default >
116- </entry >
117114 <entry name =" LastVideoNight" type =" String" >
118115 <default ></default >
119116 </entry >
120- <entry name =" LastVideoNightPosition" type =" Int" >
121- <default >0</default >
122- </entry >
123117 <!-- Mute audio
124118 0: when maximized or full-screen windows
125119 1: when a visible window is active
Original file line number Diff line number Diff line change @@ -49,18 +49,10 @@ WallpaperItem {
4949 }
5050
5151 function getLastVideo () {
52- let lastVideo = main .configuration .LastVideo ;
5352 if (dayNightCycle) {
54- lastVideo = main .configuration [isDay ? " LastVideoDay" : " LastVideoNight" ];
53+ return main .configuration [isDay ? " LastVideoDay" : " LastVideoNight" ];
5554 }
56- return lastVideo;
57- }
58- function getLastVideoPosition () {
59- let lastVideoPosition = main .configuration .LastVideoPosition ;
60- if (dayNightCycle) {
61- lastVideoPosition = main .configuration [isDay ? " LastVideoDayPosition" : " LastVideoNightPosition" ];
62- }
63- return lastVideoPosition;
55+ return main .configuration .LastVideo ;
6456 }
6557 function getLastVideoIndex () {
6658 const lastVideo = getLastVideo ();
@@ -365,7 +357,7 @@ WallpaperItem {
365357 id: player
366358 anchors .fill : parent
367359 muted: main .muteAudio
368- lastVideoPosition: main .getLastVideoPosition ()
360+ lastVideoPosition: main .configuration . LastVideoPosition
369361 visible: main .videosConfig .length !== 0
370362 onSetNextSource: {
371363 main .nextVideo ();
@@ -548,7 +540,6 @@ WallpaperItem {
548540 main.configuration.LastVideoPosition = player.lastVideoPosition;
549541 if(dayNightCycle) {
550542 main.configuration[main.isDay ? "LastVideoDay" : "LastVideoNight"] = main.currentSource.filename;
551- main.configuration[main.isDay ? "LastVideoDayPosition" : "LastVideoNightPosition"] = player.lastVideoPosition;
552543 }
553544 main.configuration.writeConfig();
554545 printLog("Bye!");
You can’t perform that action at this time.
0 commit comments