Skip to content

Commit

Permalink
feat: Add support for ETA sources in notification settings
Browse files Browse the repository at this point in the history
  • Loading branch information
Clon1998 committed Jul 16, 2024
1 parent 042a5b9 commit b46be5f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mobileraker/data/dtos/mobileraker/notification_config_dto.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import Any, Dict, List, Optional
from typing import Any, Dict, List, Optional, Set

# "5f4d11e8-ad41-4126-88ff-7593b68555d9": {
# "created": "2022-11-25T23:03:47.656260",
Expand Down Expand Up @@ -108,6 +108,7 @@ def __init__(self):
self.progress_config: int = 25
self.state_config: List[str] = []
self.android_progressbar: bool = True
self.eta_sources: List[str] = ['filament','slicer']

@staticmethod
def fromJSON(json: Dict[str, Any]) -> 'NotificationSettings':
Expand All @@ -120,6 +121,7 @@ def fromJSON(json: Dict[str, Any]) -> 'NotificationSettings':
50, round(prog_float * 100)) if prog_float > 0 else -1
cfg.state_config = json['states']
cfg.android_progressbar = json['android_progressbar'] if 'android_progressbar' in json else True
cfg.eta_sources = json['eta_sources'] if 'eta_sources' in json else []

return cfg

Expand Down

0 comments on commit b46be5f

Please sign in to comment.