Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ ipython_config.py
/config/recordings.json
/config/cookies.json
/config/web_auth.json
/streamget/
.ruff_cache/
logs/
storage/
Expand Down Expand Up @@ -177,3 +178,5 @@ backup_config/
ffmpeg.exe
ffplay.exe
ffprobe.exe
**/.idea
bak
10 changes: 10 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions .idea/StreamCap.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/encodings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/inspectionProfiles/profiles_settings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions app/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,18 @@

from .initialization.installation_manager import InstallationManager


def _prefer_sibling_streamget() -> None:
project_root = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
sibling_streamget_root = os.path.normpath(os.path.join(project_root, "..", "Streamget"))
sibling_streamget_package = os.path.join(sibling_streamget_root, "streamget")

if os.path.isdir(sibling_streamget_package) and sibling_streamget_root not in sys.path:
sys.path.insert(0, sibling_streamget_root)


_prefer_sibling_streamget()

execute_dir = os.path.split(os.path.realpath(sys.argv[0]))[0]

__all__ = ["InstallationManager", "execute_dir"]
4 changes: 4 additions & 0 deletions app/app_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from . import execute_dir
from .core.config.config_manager import ConfigManager
from .core.config.language_manager import LanguageManager
from .core.config.proxy_manager import ProxyManager
from .core.recording.record_manager import RecordingManager
from .core.runtime.process_manager import AsyncProcessManager
from .core.update.update_checker import UpdateChecker
Expand Down Expand Up @@ -41,6 +42,7 @@ def __init__(self, page: ft.Page):
)

self.settings = SettingsPage(self)
self.proxy_manager = ProxyManager(self)
self.language_manager = LanguageManager(self)
self.language_code = self.settings.language_code
self.about = AboutPage(self)
Expand Down Expand Up @@ -92,6 +94,7 @@ async def switch_page(self, page_name):
self._loading_page = True

try:
self.page.on_resized = None
await self.clear_content_area()
if page := self.pages.get(page_name):
await self.settings.is_changed()
Expand Down Expand Up @@ -137,6 +140,7 @@ async def _check_for_updates(self):

async def start_periodic_tasks(self):
"""Start all periodic tasks"""
await self.proxy_manager.start()
await self.record_manager.setup_periodic_live_check(
int(self.record_manager.loop_time_seconds or 180)
)
Loading
Loading