Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
183 commits
Select commit Hold shift + click to select a range
dc3b31c
Add custom icon support for ActionChooser
Core447 Mar 7, 2024
b7d0a5e
Remove background process bars
Core447 Mar 7, 2024
8b255f8
Fix: ControllerKey show_error using margins instead of size
Core447 Mar 7, 2024
05d62ae
Fix: Action labels not showing up
Core447 Mar 7, 2024
6aed835
Remove old comment in BackgroundGroup
Core447 Mar 7, 2024
51710a5
Hide background color reset button if color is the default
Core447 Mar 8, 2024
a413910
Hide custom pages in page manager
Core447 Mar 9, 2024
2c68430
Enable fps configuration for videos
Core447 Mar 9, 2024
9c22880
Deactivate caching in StoreBackend
Core447 Mar 9, 2024
14fc3fb
Inform plugins about uninstall
Core447 Mar 9, 2024
1b509a5
Fix: Crash on plugin uninstall
Core447 Mar 9, 2024
c6295f3
Deactivate get_manifest cache in StoreBackend
Core447 Mar 9, 2024
4985380
Add on_uninstall to PluginBase
Core447 Mar 9, 2024
2850314
Catch potential errors during PluginManager plugin load
Core447 Mar 9, 2024
a8d8ccf
Add install spinner to store previews
Core447 Mar 9, 2024
867a8be
Allow plugins to install requirements for the frontend
Core447 Mar 9, 2024
0efd4e2
SettingsManager catch corrupt deck settings
Core447 Mar 9, 2024
957cc41
Use GLin.idle_add for ui update on page_load
Core447 Mar 9, 2024
eaa4c74
Fix: Crash if key labels change during image creation
Core447 Mar 9, 2024
4c698c2
Run key action ready etc in an extra thread
Core447 Mar 9, 2024
9772800
Fix: reload_similar_pages using wrong method call
Core447 Mar 9, 2024
e1d1f6b
Add margins to backgroud groups
Core447 Mar 9, 2024
ada93c1
Add fake deck grid size configuration
Core447 Mar 9, 2024
cf2828e
Fix: All DeckStackChildren have the same size
Core447 Mar 9, 2024
efdc5f6
Update github urls to fit organization
Core447 Mar 9, 2024
a188063
Fix: Performing action ticks during screensaver
Core447 Mar 9, 2024
0c37dc0
Fix: No custom images showing
Core447 Mar 9, 2024
3f75ae1
Add option for soft version comparison
Core447 Mar 9, 2024
a2f5589
Fix: Missing button to install missing plugins
Core447 Mar 9, 2024
f7c4c22
Change signal objects to classes
Core447 Mar 9, 2024
8bb492d
Allow action reordering via up/down buttons
Core447 Mar 9, 2024
8654a76
Fix: Action remove button not reloading
Core447 Mar 9, 2024
abf72a9
Fix: DeckController set_brightness not working with floats
Core447 Mar 10, 2024
89659e7
Rename index into key_index in ActionBase
Core447 Mar 10, 2024
f18a42e
Add ui comments to actions
Core447 Mar 10, 2024
6055cb4
Refine ui by using Adw.NavigationSplitView
Core447 Mar 11, 2024
807ec8e
Add temporary page manager to the sidebar
Core447 Mar 11, 2024
5a0ae9b
Move page selector to the sidebar
Core447 Mar 11, 2024
2a660d5
Fix: Bugs in new ui layout
Core447 Mar 11, 2024
6350b1a
Add global signal manager
Core447 Mar 11, 2024
f5a69a0
Show toast notification if assets have been updated automatically
Core447 Mar 11, 2024
54ec314
Fix: background videos sometimes show their last frame in newly loade…
Core447 Mar 12, 2024
a6fa6d8
Fix: wrong attr check in update_ui_on_page_change
Core447 Mar 12, 2024
658577d
ChangePageSignal: send page_paths instead of page objects
Core447 Mar 12, 2024
64bcbc6
Fix: backgroundgroup crash if page dict has no background key
Core447 Mar 12, 2024
45f6beb
Add PageSelector to Sidebar
Core447 Mar 12, 2024
16bf0c4
Add MediaPlayerTask class
Core447 Mar 13, 2024
6630671
Fix: media_player_tasks wrong data type
Core447 Mar 13, 2024
4c00447
Remove background tiles update on key loading
Core447 Mar 13, 2024
42af6bb
Reduce play_media fps from 60 to 30
Core447 Mar 13, 2024
5e4b9a8
Add dedicated MediaPlayerThread class
Core447 Mar 13, 2024
82fb498
Fix: DeckStack on_switch wrong path to page_selector
Core447 Mar 13, 2024
1fafb0c
Fix: Crash at on the go connect and disconnect
Core447 Mar 13, 2024
e23b793
Fix: Background videos only working on 15 key decks
Core447 Mar 13, 2024
0d933ba
Add type to DeckManager deck_controller list
Core447 Mar 13, 2024
210a6ea
Add open method to FakeDeck
Core447 Mar 13, 2024
964f2ba
Return always same values for same controller in DeckStack get_page_a…
Core447 Mar 13, 2024
c6c1542
Fix: Crash if KeyGrid tasks list changes during iteration
Core447 Mar 13, 2024
ff50510
Show multi action icon for multi actions
Core447 Mar 13, 2024
6b5c934
Handle active_page==None in DeckController get_own_actions
Core447 Mar 13, 2024
e6c367f
Fix: Removing non-last actions messes comments up
Core447 Mar 13, 2024
c1c3a73
Fix: LabelEditor no longer showing the "controlled by action" warning
Core447 Mar 13, 2024
79b7bb2
Move class wide variables of ActionBase into the constructor
Core447 Mar 13, 2024
5c3c2ce
Prepare LabelEditor to check for LABELS_CAN_BE_OVERWRITTEN
Core447 Mar 13, 2024
6762043
Add ping method to PluginBase
Core447 Mar 13, 2024
a811426
Add caching to background videos
Core447 Mar 14, 2024
5ab5932
Fix: Background Video caching problems decks with more or less than 1…
Core447 Mar 14, 2024
77b4bca
Add low fps warning banner
Core447 Mar 14, 2024
1873e07
Change margins in sidebar
Core447 Mar 14, 2024
0188ba2
Add missing variables to DeckController
Core447 Mar 14, 2024
a407a82
Fix: Wrong language key for enable fps warnings
Core447 Mar 14, 2024
2200591
Fix: BackgroundVideo cache gets written multiple times
Core447 Mar 14, 2024
1e5d0be
Wait for __install__ on plugin installation
Core447 Mar 14, 2024
f3017bc
Fallback to transparent image in KeyImage
Core447 Mar 14, 2024
9f532e0
Allow None as image in ActionBase set_key
Core447 Mar 14, 2024
3010cfb
Add comment to load_from_page_dict
Core447 Mar 14, 2024
153ab5c
Add attention not to doc string of load_from_page_dict
Core447 Mar 14, 2024
b6c3987
Create action objects in threads
Core447 Mar 14, 2024
5db263a
Block image updates in set_media during on_ready of ActionBase
Core447 Mar 14, 2024
6ad2bcc
Fix: Editing label hides custom user assets
Core447 Mar 14, 2024
c74797e
Allow background videos to continue playing during page switch
Core447 Mar 15, 2024
897f314
Fix: Page add_page_callback not using new SignalManager
Core447 Mar 16, 2024
12abd78
Fix: Crash on loading empty page caused by ImageEditor
Core447 Mar 16, 2024
1bb69fb
Remove unused import of numpy.half in Sidebar
Core447 Mar 16, 2024
600b3bf
Fix: Crash if action sets key label to None
Core447 Mar 16, 2024
f04d4d8
Fix: No margin for top/bottom labels
Core447 Mar 16, 2024
b7171ab
Fix: High memory usage in get_thumbnail of MediaManager
Core447 Mar 16, 2024
ba7ad3d
Add experimental auto page switching
Core447 Mar 17, 2024
8e8a6a7
Fix: Crash during loading of cached thumbnails in MediaManager
Core447 Mar 17, 2024
57ef5b6
Improve file_in_dir helper
Core447 Mar 17, 2024
daa3e67
Use pil image context manager where not already done
Core447 Mar 17, 2024
eb4c6df
Verify pil images in KeyImage
Core447 Mar 17, 2024
fb82d72
Fix: get_own_actions crash if no page loaded
Core447 Mar 17, 2024
0c03676
Add allow_reload argument to load_page
Core447 Mar 17, 2024
cbf6cf6
Fix: Errors in edge cases where the same page is loaded on decks with…
Core447 Mar 17, 2024
78f08e3
Update setting title locales
Core447 Mar 17, 2024
c51ef93
Add ui setting to control page cache size
Core447 Mar 17, 2024
980afaf
Deactivate DesktopGrabber for now
Core447 Mar 18, 2024
0076bbf
Add MediaPlayerSetImageTask
Core447 Mar 18, 2024
95a88c8
Fix: add_tasks adds MediaPlayerThread as the DeckController
Core447 Mar 18, 2024
b61e936
Use list instead of copy in perform_media_player_tasks
Core447 Mar 18, 2024
c1649d6
Add TODO comment to load the decks brightnesses from the settings on …
Core447 Mar 18, 2024
6e33463
Use thread to tick actions instead of a timer
Core447 Mar 18, 2024
f896b9c
Stop using deprecated to_native_format function
Core447 Mar 18, 2024
0bf13d3
Print time needed to change page
Core447 Mar 18, 2024
570ef8f
Fix: Thread import missing
Core447 Mar 18, 2024
59d9381
Add concurrency to on_actions_ready
Core447 Mar 18, 2024
32d3fea
Fix: Memory leak during idle
Core447 Mar 18, 2024
4a9cf0a
MediaBase: Check if action is still valid before performing operations
Core447 Mar 18, 2024
4eb98ca
Fix: Pages dont get removed from cache
Core447 Mar 18, 2024
636282d
Freeup action_object from ActionManager row
Core447 Mar 18, 2024
5c7e492
Remove debug prints from ActionExpanderRow of ActionManager
Core447 Mar 18, 2024
4f71991
Improve background_video_cache
Core447 Mar 18, 2024
3552d92
Disable screen saver debug print after each key press
Core447 Mar 19, 2024
152807e
Fix: RGBA image fed into to_native_key_format instead of RGB
Core447 Mar 19, 2024
9a9b9c7
Disable image verification in KeyImage
Core447 Mar 19, 2024
d123a8f
Set key images per drag and drop
Core447 Mar 20, 2024
f306404
Rename Page.clear_action_index
Core447 Mar 20, 2024
6f11b08
Add key button reordering via drag and drop
Core447 Mar 20, 2024
67816a7
Fix: PageManager method call not updated to new name of clear_action_…
Core447 Mar 20, 2024
ca8c069
Add options to configure fps and looping of background videos
Core447 Mar 20, 2024
d536890
Fix: Custom assets previews stretching on assets with long names
Core447 Mar 20, 2024
a740e0c
Fix: Wrong import of Sidebar in ActionManager
Core447 Mar 20, 2024
819e9a3
Fix: Error if loading infos for newly added custom assets
Core447 Mar 20, 2024
d76ba72
Fix: Requesting custom_config_rows twice
Core447 Mar 20, 2024
a016f35
Port all trigger_signals of PageManager to SignalManager
Core447 Mar 20, 2024
0d19115
Use internal path on key asset drag and drop
Core447 Mar 21, 2024
6baf6df
Fix typo in brightness
Core447 Mar 21, 2024
197f249
Add basic support for transparent gifs
Core447 Mar 21, 2024
074dffc
Fix: Auto-update crash without internet access
Core447 Mar 22, 2024
1b65b8c
Change design of no connection error in the store
Core447 Mar 22, 2024
f9d3311
Fix: Random problems when installing and uninstalling plugins
Core447 Mar 22, 2024
178c2c0
Add confirmation dialog to delete page button in PageManager
Core447 Mar 22, 2024
fa464f2
Fix: PageManager not loading alternative page if current page gets de…
Core447 Mar 22, 2024
378c464
Update page selector on PageAdd and PageDelete signals
Core447 Mar 22, 2024
683fd42
Fix: IconSelector remove button removing actions
Core447 Mar 22, 2024
009248c
Add size and alignments to videos and gifs
Core447 Mar 22, 2024
729c685
Avoid video reloading on modification of size and alignment
Core447 Mar 22, 2024
5fd30d4
Fix: Changing labels of video key reloads video
Core447 Mar 22, 2024
6fa0fea
Fix: Deck brightness not loading on launch
Core447 Mar 23, 2024
87af591
Fix: Gif seek error if labels change
Core447 Mar 23, 2024
dc3fd81
Fix: copy paste not working in default widgets
Core447 Mar 23, 2024
d19fe57
Add option to launch backend in new window
Core447 Mar 23, 2024
c630506
Update requirements
Core447 Mar 23, 2024
08874d7
Fix: Background not displaying
Core447 Mar 23, 2024
c900aa7
Update ActionBase
Core447 Mar 23, 2024
e8965d2
Update PluginBase
Core447 Mar 23, 2024
c919102
Change default size of the main window
Core447 Mar 23, 2024
24049ae
Adding ellipse to PageSelector (wip)
Core447 Mar 23, 2024
ce2ce72
Remove moviepy dependency
Core447 Mar 23, 2024
cf02069
Update requirements.txt
Core447 Mar 23, 2024
29c2fc7
Add .flatpak-builder dir to gitignore
Core447 Mar 23, 2024
42b12a7
Store data in .var/app
Core447 Mar 23, 2024
05ac408
Update requirements
Core447 Mar 23, 2024
b087184
Fix: signal errors if no page available
Core447 Mar 23, 2024
ea876c5
Fix: NoPagesError trying to use PluginManager for plugins
Core447 Mar 23, 2024
f711015
Fix: Potential core dump on asset installation
Core447 Mar 23, 2024
d43be7a
Fix: Brightness settings error in Page DeckGroup
Core447 Mar 23, 2024
9fb1487
Set process title
Core447 Mar 23, 2024
ae2aeb0
Deactivate KeyImage.close to avoid on_closed errors
Core447 Mar 23, 2024
d33efac
Use direct callback call in SignalManager trigger_signal
Core447 Mar 23, 2024
ad9efc2
Fix: DeckGroup error if brightness not in page dict
Core447 Mar 23, 2024
1842c02
Add margins left and right to ActionChooser and Configurator
Core447 Mar 23, 2024
fafcd0a
Fix: IconSelector not always setting new image
Core447 Mar 23, 2024
1f63bb6
Fix: Possibility of core dump on asset installation
Core447 Mar 23, 2024
ee2a1bc
Make all title bars flat
Core447 Mar 23, 2024
4b44735
Set unnecessary nav buttons insensitive in DynamicFlowBox
Core447 Mar 24, 2024
e579be5
Add --ignore-installed to flatpak yml
Core447 Mar 24, 2024
411a861
ActionBase stop actions from setting images that get overwritten by t…
Core447 Mar 24, 2024
35e6782
Fix: PluginBase launch_backend wrong command
Core447 Mar 24, 2024
8cef1e9
Mark infinite threads as daemons
Core447 Mar 24, 2024
2816613
Fix: Decks not getting cleared on close
Core447 Mar 24, 2024
b1acf29
Name all threads
Core447 Mar 24, 2024
90ac484
Stop app cleanly when requested in the hamurger menu
Core447 Mar 24, 2024
f49f3dc
Update requirements
Core447 Mar 24, 2024
580d07f
Update image attribution
Core447 Mar 24, 2024
889c302
Fix: actions ticking starts in timer after thread ends
Core447 Mar 24, 2024
f451eba
Stop pyro loop in PluginManager if app closes
Core447 Mar 24, 2024
7046b23
Move flatpak yml into root dir
Core447 Mar 24, 2024
a6b6b0f
Add app screenshots
Core447 Mar 24, 2024
11671be
Bump version to 1.1.2-alpha
Core447 Mar 24, 2024
64fb993
Remove flatpak yml in flatpak folder
Core447 Mar 24, 2024
2a993ca
Resolve merge conflict
Core447 Mar 24, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -181,4 +181,6 @@ Pyro5

data/

vid_cache/
vid_cache/

**/.flatpak-builder/
2 changes: 1 addition & 1 deletion Assets/images/Attribution.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
- multi_action.png:
- multi_action.png & error.png:
- source: fonts.google.com
- licence: Apache License 2.0
- licence_link: https://www.apache.org/licenses/LICENSE-2.0
Binary file added Assets/images/Screenshots/Screenshot_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Assets/images/Screenshots/Screenshot_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Assets/images/Screenshots/Screenshot_3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 23 additions & 1 deletion GtkHelper/GtkHelper.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,13 @@ def reorder_child_after(self, child, after):
def remove_child(self, child:Gtk.Widget) -> None:
self.get_list_box().remove(child)

def get_index_of_child(self, child):
for i, action in enumerate(self.actions):
if action == child:
return i

raise ValueError("Child not found")


class BetterPreferencesGroup(Adw.PreferencesGroup):
def __init__(self, *args, **kwargs):
Expand Down Expand Up @@ -353,4 +360,19 @@ def set_url(self, url:str):
def on_open_clicked(self, button:Gtk.Button):
if self.get_subtitle() in [None, "N/A"]:
return
web.open(self.get_subtitle())
web.open(self.get_subtitle())


class EntryRowWithoutTitle(Adw.EntryRow):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)

# Make title invisible
child:Gtk.Box = self.get_child() # Box
prefix_box:Gtk.Box = child.get_first_child()
gizmo = prefix_box.get_next_sibling()
empty_title = gizmo.get_first_child()
title = empty_title.get_next_sibling()

empty_title.set_visible(False)
title.set_visible(False)
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ modules:
build-commands:
- cp . /app/bin/StreamController -r

- "pip install -r requirements.txt --prefix=/app"
- "pip install -r requirements.txt --ignore-installed --prefix=/app"

- install -D flatpak/launch.sh /app/bin/launch.sh
- chmod +x /app/bin/launch.sh
- install -D flatpak/icon_256.png /app/share/icons/hicolor/256x256/apps/com.core447.StreamController.png
- install -D flatpak/launch.desktop /app/share/applications/com.core447.StreamController.desktop
sources:
- type: git
url: https://github.com/Core447/StreamController.git
url: https://github.com/StreamController/StreamController.git
branch: dev # or use 'commit' or 'tag' to pin to a specific version

build-options:
Expand Down
20 changes: 15 additions & 5 deletions globals.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@
from typing import TYPE_CHECKING
import argparse

DATA_PATH = os.path.join(os.getenv("XDG_CONFIG_HOME", os.path.expanduser("~/.config")), "StreamController")
DATA_PATH = "data"
DATA_PATH = os.path.join(os.path.expanduser("~"), ".var", "app", "com.core447.StreamController", "data")
# DATA_PATH = "data"

if TYPE_CHECKING:
from src.app import App
from locales.LocaleManager import LocaleManager
from src.backend.AssetManager import AssetManager
from src.backend.AssetManagerBackend import AssetManagerBackend
from src.windows.AssetManager.AssetManager import AssetManager
from src.backend.MediaManager import MediaManager
from src.backend.PageManagement.PageManager import PageManager
from src.backend.SettingsManager import SettingsManager
Expand All @@ -18,11 +19,15 @@
from src.backend.IconPackManagement.IconPackManager import IconPackManager
from src.backend.WallpaperPackManagement.WallpaperPackManager import WallpaperPackManager
from src.windows.Store.StoreBackend import StoreBackend
from src.Signals.SignalManager import SignalManager
from src.backend.DesktopGrabber import DesktopGrabber


top_level_dir:str = os.path.dirname(__file__)
lm:"LocaleManager" = None
media_manager:"MediaManager" = None #MediaManager
asset_manager:"AssetManager" = None #AssetManager
asset_manager_backend:"AssetManagerBackend" = None #AssetManager
asset_manager: "AssetManager" = None
page_manager:"PageManager" = None #PageManager
settings_manager:"SettingsManager" = None #SettingsManager
app:"App" = None #App
Expand All @@ -34,7 +39,12 @@
wallpaper_pack_manager: "WallpaperPackManager" = None
store_backend: "StoreBackend" = None
pyro_daemon: Pyro5.api.Daemon = None
app_version: str = "1.0.0-alpha" # In breaking.feature.fix-state format
signal_manager: "SignalManager" = None
dekstop_grabber: "DesktopGrabber" = None


app_version: str = "1.1.2-alpha" # In breaking.feature.fix-state format
exact_app_version_check: bool = False
argparser: argparse.ArgumentParser = None
logs: list[str] = []

Expand Down
19 changes: 16 additions & 3 deletions locales/de_DE.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,14 @@
"deck-switcher-no-decks": "Keine Decks Erkannt",
"open-settings": "Einstellungen öffnen",
"settings-emulate-at-double-click": "Bei Doppelklick klick auf Gerät simulieren",
"settings-dev-settings-title": "Entwicklereinstellungen",
"settings-dev-settings-title": "Entwickler",
"settings-fake-decks-header": "Fake Decks",
"settings-number-of-fake-decks": "Anzahl der Fake Decks",
"settings-number-of-fake-decks-hint": "Für Testzwecke (App muss mölicherweise neugestartet werden)",
"settings-store-settings-title": "Store",
"settings-store-settings-header": "Store",
"settings-store-settings-auto-update": "Automatische Aktualisierung der Assets",
"settings-ui-settings-title": "UI Einstellungen",
"settings-ui-settings-title": "UI",
"settings-ui-settings-key-grid-header": "Tastenraster",
"open-about": "Über",
"store.plugins.section": "Plugins",
Expand Down Expand Up @@ -102,5 +102,18 @@
"right-area.image-editor.layout.subtitle": "Layout für diese Taste (nur bei benutzerdefinierten Medien)",
"right-area.image-editor.layout.size.label": "Größe (%)",
"right-area.image-editor.layout.valign.label": "VAlign",
"right-area.image-editor.layout.halign.label": "HAlign"
"right-area.image-editor.layout.halign.label": "HAlign",
"deck.fake-deck-group.title": "Fake Deck",
"deck.fake-deck-group.description": "Konfiguration des Fake Decks",
"deck.fake-deck-group.layout.columns.label": "Spalten",
"deck.fake-deck-group.layout.rows.label": "Zeilen",
"warning.low-fps": "Niedrige FPS erkannt. Dies kann durch Hintergrundvideos verursacht werden. Nach dem Caching kann diese Warnung verschwinden.",
"warning.low-fps.fix": "Deaktivieren",
"warning.dismiss": "Verwerfen",
"settings.enable-fps-warnings": "FPS Warnungen aktivieren",
"settings.performance.title": "Performance",
"settings.performance.header": "Performance & Optimierungen",
"settings.performance.n-cached-pages.title": "Anzahl der zu cachenden Seiten",
"settings.performance.n-cached-pages.subtitle": "Anzahl der Seiten, die im Caching gespeichert werden sollen",
"settings.performance.n-cached-pages.tooltip": "Eine höhere Zahl bedeutet mehr Speicherverbrauch aber schnellere Seitenladezeit."
}
19 changes: 16 additions & 3 deletions locales/en_US.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,14 @@
"deck-switcher-no-decks": "No Decks Detected",
"open-settings": "Open Settings",
"settings-emulate-at-double-click": "Emulate button press on double click",
"settings-dev-settings-title": "Developer Settings",
"settings-dev-settings-title": "Developer",
"settings-fake-decks-header": "Fake Decks",
"settings-number-of-fake-decks": "Number of fake decks",
"settings-number-of-fake-decks-hint": "For testing purposes (might require restart of the app)",
"settings-store-settings-title": "Store",
"settings-store-settings-header": "Store",
"settings-store-settings-auto-update": "Auto-update assets",
"settings-ui-settings-title": "UI Settings",
"settings-ui-settings-title": "UI",
"settings-ui-settings-key-grid-header": "Key Grid",
"open-about": "About",
"store.plugins.section": "Plugins",
Expand Down Expand Up @@ -103,5 +103,18 @@
"right-area.image-editor.layout.subtitle": "Layout for this key (only affecting custom media)",
"right-area.image-editor.layout.size.label": "Size (%)",
"right-area.image-editor.layout.valign.label": "VAlign",
"right-area.image-editor.layout.halign.label": "HAlign"
"right-area.image-editor.layout.halign.label": "HAlign",
"deck.fake-deck-group.title": "Fake Deck",
"deck.fake-deck-group.description": "Configure fake deck settings",
"deck.fake-deck-group.layout.columns.label": "Columns",
"deck.fake-deck-group.layout.rows.label": "Rows",
"warning.low-fps": "Low FPS detected. This might be caused by your background video. This may dissapear after the caching is finished.",
"warning.low-fps.fix": "Deactivate",
"warning.dismiss": "Dismiss",
"settings.enable-fps-warnings": "Enable FPS warnings",
"settings.performance.title": "Performance",
"settings.performance.header": "Performance & Optimizations",
"settings.performance.n-cached-pages.title": "Number of cached pages",
"settings.performance.n-cached-pages.subtitle": "Number of pages to keep in cache",
"settings.performance.n-cached-pages.tooltip": "A higher number means more memory usage but faster page loading"
}
15 changes: 14 additions & 1 deletion locales/fr_FR.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,5 +92,18 @@
"right-area.image-editor.layout.subtitle": "Layout pour cette touche (les médias utilisés par défaut ne sont pas modifiables)",
"right-area.image-editor.layout.size.label": "Taille (%)",
"right-area.image-editor.layout.valign.label": "VAlign",
"right-area.image-editor.layout.halign.label": "HAlign"
"right-area.image-editor.layout.halign.label": "HAlign",
"deck.fake-deck-group.title": "Fake Deck",
"deck.fake-deck-group.description": "Configuration du Fake Deck",
"deck.fake-deck-group.layout.columns.label": "Colonnes",
"deck.fake-deck-group.layout.rows.label": "Rangees",
"warning.low-fps": "Faible FPS détecté. Peut-être dû à votre vidéo d'arrière-plan. Le problème pourrait disparaître après mise en cache.",
"warning.low-fps.fix": "Désactiver",
"warning.dismiss": "Décrisser",
"settings.enable-fps-warnings": "Activer les avertissements FPS",
"settings.performance.title": "Performance",
"settings.performance.header": "Performance & Optimisations",
"settings.performance.n-cached-pages.title": "Nombre de pages en cache",
"settings.performance.n-cached-pages.subtitle": "Nombre de pages à garder en cache",
"settings.performance.n-cached-pages.tooltip": "Un nombre plus élevé signifie une utilisation de mémoire plus importante mais un chargement de page plus rapide."
}
36 changes: 29 additions & 7 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
along with this program. If not, see <https://www.gnu.org/licenses/>.
"""
# Import Python modules
import setproctitle
setproctitle.setproctitle("StreamController")

import sys
from loguru import logger as log
import os
Expand All @@ -32,15 +35,17 @@
from src.backend.DeckManagement.DeckManager import DeckManager
from locales.LocaleManager import LocaleManager
from src.backend.MediaManager import MediaManager
from src.backend.AssetManager import AssetManager
from src.backend.AssetManagerBackend import AssetManagerBackend
from src.backend.PageManagement.PageManager import PageManager
from src.backend.SettingsManager import SettingsManager
from src.backend.PluginManager.PluginManager import PluginManager
from src.backend.DeckManagement.HelperMethods import get_sys_args_without_param
from src.backend.IconPackManagement.IconPackManager import IconPackManager
from src.backend.WallpaperPackManagement.WallpaperPackManager import WallpaperPackManager
from src.windows.Store.StoreBackend import StoreBackend
from src.windows.Store.StoreBackend import StoreBackend, NoConnectionError
from autostart import setup_autostart
from src.Signals.SignalManager import SignalManager
from src.backend.DesktopGrabber import DesktopGrabber

# Import globals
import globals as gl
Expand Down Expand Up @@ -89,10 +94,12 @@ def create_global_objects():
gl.argparser.add_argument("-b", help="Open in background", action="store_true")
gl.argparser.add_argument("app_args", nargs="*")

gl.settings_manager = SettingsManager()

gl.signal_manager = SignalManager()

gl.media_manager = MediaManager()
gl.asset_manager = AssetManager()
gl.settings_manager = SettingsManager()
gl.asset_manager_backend = AssetManagerBackend()
gl.page_manager = PageManager(gl.settings_manager)
gl.icon_pack_manager = IconPackManager()
gl.wallpaper_pack_manager = WallpaperPackManager()
Expand All @@ -105,6 +112,9 @@ def create_global_objects():
gl.plugin_manager.load_plugins()
gl.plugin_manager.generate_action_index()


# gl.dekstop_grabber = DesktopGrabber()

def update_assets():
settings = gl.settings_manager.load_settings_from_file(os.path.join(gl.DATA_PATH, "settings", "settings.json"))
auto_update = settings.get("store", {}).get("auto-update", True)
Expand All @@ -114,8 +124,20 @@ def update_assets():

log.info("Updating store assets")
start = time.time()
asyncio.run(gl.store_backend.update_everything())
log.info(f"Updating store assets took {time.time() - start} seconds")
number_of_installed_updates = asyncio.run(gl.store_backend.update_everything())
if isinstance(number_of_installed_updates, NoConnectionError):
log.error("Failed to update store assets")
if hasattr(gl.app, "main_win"):
gl.app.main_win.show_error_toast("Failed to update store assets")
return
log.info(f"Updating {number_of_installed_updates} store assets took {time.time() - start} seconds")

if number_of_installed_updates <= 0:
return

# Show toast in ui
if hasattr(gl.app, "main_win"):
gl.app.main_win.show_info_toast(f"{number_of_installed_updates} assets updated")

@log.catch
def reset_all_decks():
Expand Down Expand Up @@ -158,7 +180,7 @@ def reset_all_decks():

create_global_objects()
create_cache_folder()
threading.Thread(target=update_assets).start()
threading.Thread(target=update_assets, name="update_assets").start()
load()


Expand Down
23 changes: 23 additions & 0 deletions notifications.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import gi
from gi.repository import GLib
import dbus
from dbus.mainloop.glib import DBusGMainLoop

def print_notification(bus, message):
keys = ["app_name", "replaces_id", "app_icon", "summary",
"body", "actions", "hints", "expire_timeout"]
args = message.get_args_list()
if len(args) == 8:
notification = dict([(keys[i], args[i]) for i in range(8)])
print(notification["summary"], notification["body"])
else:
print("Unknown notification")
print(args)


loop = DBusGMainLoop(set_as_default=True)
session_bus = dbus.SessionBus()
session_bus.add_match_string("type='method_call',interface='org.freedesktop.Notifications',member='Notify'")
session_bus.add_message_filter(print_notification)

GLib.MainLoop().run()
Loading