Commit Graph
1423 Commits
Author SHA1 Message Date
4gray b8650be90f Merge pull request #644 from 4gray/refactor/ipc-events-handling
refactor/ipc-events-handling
2025-11-08 22:46:47 +00:00
4gray 0d6e519709 chore(deps): update nx & angular packages
Update Angular in pnpm-lock to newer 20.3.x versions
and align CDK/Material specifiers to the compatible 20.2.12/20.2.12
releases. This brings core, common, compiler, platform-browser,
animations, forms and related packages to the 20.3.x series to fix
version skew and ensure dependency compatibility.

Add tsConfig for tests in libs/shared/interfaces project config so
jest runner uses the correct TypeScript spec configuration, fixing
test/compile issues for that library.

Remove husky commit-msg hooks and local pre-commit checks to avoid
running commitlint, tests and eslint on commit (CI remains unaffected).
2025-11-08 23:24:56 +01:00
4gray c4f721304f feat(m3u-state): include HTTP headers and title when opening players
Add title, user-agent, refer and origin fields to IPC payloads sent
when opening MPV/VLC players and when launching streams from effects.
Replace legacy userAgent property with standardized 'user-agent' key and
consistently include referer and origin from channel.http. This ensures
external players receive correct HTTP header metadata and stream titles
for proper request handling and display.
2025-11-08 23:02:15 +01:00
4gray 30b7cdb7c6 fix(ui): unsubscribe observable and mark DI fields readonly 2025-11-08 23:02:15 +01:00
4gray 60a06c2b60 fix(epg-list): normalize days value before subtracting 2025-11-08 23:02:15 +01:00
4gray e06c154e0f fix(mpv, electron): improve process startup & error reporting
Refine MPV/VLC launch error handling in the renderer to extract and show
error.message when available, preventing unhelpful "[object Object]"
messages in the UI.

In the Electron backend, ensure failed MPV instances fall through to
creation by commenting intent, and wrap spawn in a promise to reliably
detect startup failures. On spawn error, clear stored references and
reject with a descriptive message that includes the mpv path. Add an
exit handler, conditional storage of the process for reuse, and proc.unref
for detached runs. Use a short timeout to resolve the promise when spawn
succeeds and log startup state. Convert a silent log to console.error and
rethrow the error to surface failures to callers.

These changes make MPV startup more robust and produce clearer error
feedback for debugging and UI notifications.
2025-11-08 23:02:15 +01:00
4gray 588664c3aa refactor(player): remove unused player path args 2025-11-08 23:02:15 +01:00
4gray fbed100fb0 ci: make release step create draft prereleases for PRs
Update the GitHub release action to mark releases from pull 
request events as prerelease and to set a safe tag name when the
 is not triggered by a tag ref.

- Set prerelease to true when github.event_name == 'pull_request'
  so draft releases created during PR workflows are marked as
  prereleases.
- Use the tag name from github.ref_name when the workflow is
  triggered by a tag; otherwise generate a deterministic test tag
  "test-<sha>" to avoid using an invalid or empty tag name.

This prevents accidental full releases from PR runs and ensures the
action always has a valid tag_name value.
2025-11-08 23:02:15 +01:00
4gray ea3c2b1e45 feat(build): set deterministic artifact file names
Standardize generated installer/artifact file names across build
targets by adding explicit artifactName patterns in package.json.
Add a general artifactName at the top-level build config, ensure
linux targets (snap/deb/rpm) carry the same pattern, and set a
Windows-specific artifactName for win and nsis outputs that includes
the platform and arch.

This makes build outputs predictable for CI, releases, and automated
upload tooling by embedding name, version, OS, arch, and extension in
artifact filenames.
2025-11-08 23:02:15 +01:00
4gray 656c86dc30 refactor: rework ipc events handling 2025-11-08 23:02:15 +01:00
4gray d3fc2a5af8 feat(ui): enhance navigation sidebar visuals and tooltips
Update navigation components to improve sidebar usability and layout.
- Reformat stalker-shell navigation binding to align attributes consistently.
- Add matTooltip and matTooltipPosition to portal icon and nav items to
  surface portal status and item labels on hover.
 Rework navigation markup to use mat-nav-list, add home shortcut and dividers,
  and hide several textual labels/actions by commenting them out to create a
  more compact icon-only sidebar while preserving code for future restore.
- Collapse unused portal info/actions and library labels into comments to
  simplify DOM while keeping structure for reactivation.

These changes make the left navigation more compact, provide quick hover
context via tooltips, and prepare the UI for a condensed icon-driven layout.
2025-11-08 23:02:15 +01:00
4gray 837849ee57 refactor: code style improvements 2025-11-08 10:24:41 +01:00
4gray 1b9dc0b37e fix(ui): disable two Angular template accessibility rules 2025-11-08 10:22:57 +01:00
4gray e6aa33959e feat(deps): bump Electron to v39.x 2025-11-08 10:22:57 +01:00
4gray 6f9e8aa64e feat(player): pass playlist headers to external players 2025-11-08 10:22:27 +01:00
4gray 3eed15d806 feat(player): use user-agent, referrer, origin for vlc and mpv
Enhance MPV player IPC handler to accept and forward extra parameters
(url, path, title, userAgent, referer, origin). Attempt to reuse an
existing MPV instance when reuse is enabled and an IPC socket is
available; if reuse fails, fall back to spawning a new process.

When creating a new MPV process, generate a unique platform-aware IPC
socket path, build arguments conditionally from provided metadata
(user-agent, referrer, origin via http-header-fields, force-media-title)
and append the URL last. Improve logging for debugging and handle
process spawn errors by clearing stale process/socket references.

These changes enable smoother playback handoff, preserve headers and
title for remote resources, and make MPV invocations more robust.
2025-11-08 10:22:27 +01:00
4gray e079d268f0 docs: add CLAUDE.md with developer guidance 2025-11-08 10:22:27 +01:00
4gray f36f94675b Merge pull request #638 from 4gray/ci-add-github-actions-ui-fixes
ci-add-github-actions-ui-fixes
2025-10-31 09:42:01 +00:00
4gray 4c6ee1b75a feat(store): migrate from electron-store to electron-conf 2025-10-27 08:20:29 +01:00
4gray 3520229670 fix: correct typo in settings import path 2025-10-27 08:20:29 +01:00
4gray 681e58728f chore(config): normalize YAML quoting and indentation 2025-10-27 08:20:29 +01:00
4gray 6ac61720ad feat(ci): add GitHub Actions workflow to build and make app 2025-10-27 08:20:29 +01:00
4gray ccbb08cfb4 fix(ui): correct imports, guard checks, logging and settings handling 2025-10-27 08:20:29 +01:00
4gray 516a376dc0 chore(deps): remove Tauri packages and bump test deps 2025-10-27 08:20:29 +01:00
4gray 68ab822553 Merge pull request #637 from 4gray/chore/upgrade-videojs-and-fix-settings
chore/upgrade-videojs-and-fix-settings
2025-10-23 23:00:31 +02:00
4gray 51e04ab069 fix(settings): fix settings issues, fix ipc commands
Update channel.model to import Channel from the local interface file
instead of the package namespace. This fixes an incorrect module
resolution and keeps the codebase consistent with local typings.

Add a new SidebarView union type ('CHANNELS' | 'PLAYLISTS') to expose
possible sidebar view options for consumers of the shared interfaces.
2025-10-23 22:55:17 +02:00
4gray 2f930a6dfe chore(deps): upgrade video.js to 8
Add nested @videojs/http-streaming and related module entries (v2.16.3,
video.js 7.21.7, mpd-parser, @videojs/xhr, videojs-font, etc.) required by
the upgraded video.js ecosystem.

These changes ensure the lockfile reflects the new major video.js
version and pulls in compatible HTTP streaming and parsing libraries so
consumers get consistent, resolved dependency trees and avoid runtime
mismatches when using the newer player.
2025-10-23 22:54:22 +02:00
4gray d45f6539d5 Merge pull request #636 from 4gray/feat/epg
feat/epg
2025-10-23 22:53:21 +02:00
4gray 1b420c67de refactor: code style improvements
- Comment/test stubs in several .spec.ts to avoid importing
  heavy modules and to disable flaky tests
 (video-player.component.spec.ts, channel-list-container.component.spec.ts,
  recent-playlists.component.spec.ts).
- Replace long relative import with package alias for PlaylistsService
  to simplify module resolution (video-player.component.spec.ts).
- Add missing alt attribute to channel logo img for accessibility
  (channel-list-item.component.ts).
- Assert non-null where templates expect values by removing optional
  chaining in template bindings (video-player.component.html):
  use activeChannel.url and activeChannel.epgParams, and non-null
  assertions for playerSettings.showCaptions to avoid runtime/template
  type errors.
- Consolidate SidebarView import with Channel from shared-interfaces to
  fix incorrect relative path (sidebar.component.ts).
- Restore or replace MomentDatePipe import usage in tests (info-overlay.spec.ts).

These changes reduce test import noise, fix template type issues,
improve accessibility, and simplify imports to match project aliases.
2025-10-23 22:52:44 +02:00
4gray 57005d4f46 refactor(epg): improve list rendering, state handling, and styles
- Track list items by start+stop to avoid incorrect reuse of DOM
  nodes when program time ranges change.
- matListItemLine with matListItemTitle and add
  program-title class to ensure proper styling and layout of titles.
- Add left margin to item label for visual spacing.
- Update imports to use shared-interfaces barrel to simplify paths.
- Remove unused OnDestroy and related ipc cleanup; epg list no longer
  manages EPG IPC listeners directly.
- Introduce setEpgAvailableFlag dispatch when handling EPG data to
  expose availability state; clear current EPG program via
  resetActiveEpgProgram when no programs are returned.
- Remove direct Store usage from EpgService and update BehaviorSubject
  flow to set epgAvailable=false on error.
- Clean up unused imports and minor formatting.

These changes fix rendering glitches, improve state clarity for EPG
availability, simplify imports, and tidy up lifecycle responsibilities.
2025-10-23 22:51:28 +02:00
4gray 8b0db47caf feat(epg): normalize channel data and fix template bindings
Convert channel structures to a consistent and adapt templates
to read new safely.

- Add accessors in EListComponent:
  - getChannelName(channel) returns first displayName or ''
  - getChannelIcon(channel) returns first icon.src or ''
  These helpers make reading channel metadata robust against missing or
  differently-shaped data.

- Build channel object with normalized fields in ngOnInit:
  - set id, displayName[], url[], icon[] rather than raw name/icon
  - ensure fallbacks to empty strings/arrays to avoid undefined values

- Update InfoOverlay template to safely access program fields:
  - use epgProgram?.icon?.[0]?.src for image source
  - use epgProgram?.title?.[0]?.value and epgProgram?.desc?.[0]?.value

- Fix MultiEpg templates for property access and tracking:
  - replace invalid template boolean expressions with safe non-null
    assertion where needed ((hourWidth$ | async)! ...)
  - use track item.id instead of track $any(item).channel
  - call getChannelIcon/getChannelName and render icon/name via helpers

These changes prevent runtime errors when fields are missing or have
array-wrapped values, improve template safety, and standardize channel
data handling across the EPG UI.
2025-10-23 21:54:11 +02:00
4gray 8e5a643fac feat(epg): worker-based EPG handlers and fetch logic 2025-10-23 21:53:51 +02:00
4gray 0ec25115e0 feat(epg): update interfaces to match epg-parser v0.4.0 2025-10-23 21:53:24 +02:00
4gray 94e8d76a36 chore(de): upgrade epg-parser to 0.4.0 and add new deps
Bump epg-parser from 0.1.6 to 0.4.0 in package.json and update
package-lock.json to reflect the new version, resolved tarball, and
integrity. Add its new runtime dependencies (dayjs ^1.11.6 and
lodash.groupby ^4.6.0) into package-lock.json and include a dayjs
entry. Also add missing license fields for some modules.

This upgrade brings epg-parser improvements and fixes, and ensures the
lockfile accurately represents the installed dependency tree.
2025-10-23 21:52:09 +02:00
4gray 04bcb522ad Merge pull request #632 from 4gray/refactor/libsql
refactor/libsql
2025-10-18 22:26:26 +02:00
4gray 461e2e2e7e feat(xtream): Xtream playlist refresh workflow
a dedicated refresh button and workflow for Xtream in the
recent playlists UI. Show a refresh icon only when the playlist has a
serverUrl. For Xtream playlists, prompt the user with a confirmation
dialog, delete locally cached categories and streams, show a toast that
the refresh started, and navigate to the playlist to trigger re-import.
Keep existing refresh IPC logic for non-Xtream (M3U/local) playlists.

Also add English translations for the Xtream refresh tooltip and dialog
messages, and surface errors via snackbar on failure.

This enables safe re-importing of remote Xtream playlists while preserving
favorites and recent items.
2025-10-18 21:55:48 +02:00
4gray 0a934d2ac6 refactor(electron): migrate from tauri/plugin-sql to libsql 2025-10-18 21:31:29 +02:00
4gray 6dcbbadda8 refactor(app): replace TauriService with ElectronService usage 2025-10-18 13:05:26 +02:00
4gray 03268ab8c5 Merge pull request #631 from 4gray/refactor-add-mpv-reuse-ipc
refactor-add-mpv-reuse-ipc
2025-10-18 12:02:42 +02:00
4gray e04cb113dd refactor(epg): simplify EPG availability dispatch 2025-10-18 11:57:43 +02:00
4gray 7c42c1b6fc feat(settings): add mpvReuseInstance setting to store and i18n
Add MPV_REUSE_INSTANCE key to the electron backend store service and
include mpvReuseInstance in the shared settings interface so the new
boolean setting is persisted and available across renderer and main
processes.

Also update English i18n JSON formatting and expand the HOME section
translations (reformatting and adding nested playlist-related keys)
to ensure the UI strings remain consistent after changes.
2025-10-18 11:57:20 +02:00
4gray d9cbb1ce87 refactor(player,epg): add MPV reuse, IPC commands, and EPG handlers
Introduce MPV process reuse and IPC control, and add basic EPG IPC
handlers.

- Add GET_CHANNEL_PROGRAMS and FETCH_EPG ipc handlers to epg.events.ts
  to expose fetching EPG data by channel or URLs.
- Rework player.events.ts:
  - Export proper bootstrap and add module-level mpvProcess and
    mpvSocketPath to track a reusable MPV instance.
  - Add sendMpvCommand helper to communicate with MPV via its IPC socket.
  - Implement OPEN_MPV_PLAYER handler that:
    - Reads MPV path and MPV_REUSE_INSTANCE setting from store.
    - Attempts to reuse an existing MPV process by sending loadfile
      command over the socket when reuse is enabled.
    - Falls back to spawning a new mpv process, creating a unique IPC
      socket path, and storing the process/socket when reuse is enabled.
    - Adds error and exit handlers to clear stored references.
  - Add necessary imports (ChildProcess, existsSync, createConnection).
  - Remove/comment unused import block for shared-interfaces and adapt
    existing code to the new flow.

Why:
- Enable reusing a single MPV instance to improve resource usage and
  provide faster playback switching.
- Add IPC endpoints for EPG to support frontend requests for program
  data.
2025-10-18 11:53:57 +02:00
4gray b61530f279 feat(preloadtauri): add external player IPC and playlist auto-update
MPV/VLC launch and playlist auto-update from the Electron preload
and migrate Tauri invoke calls to use the exposed window.electron API.

- Add openInMpv, openInVlc and autoUpdatePlaylists to the preload API,
  forwarding parameters to ipcRenderer for native handling.
- Replace tauri invoke('open_in_mpv') and invoke('open_in_vlc') calls
  with window.electron.openInMpv / openInVlc in tauri.service to use the
  unified Electron IPC surface.
- Replace file-based AUTO_UPDATE_PLAYLISTS handling with a call to
  window.electron.autoUpdatePlaylists and remove legacy file parsing
  code (now commented) so the main process owns playlist refresh logic.
- Import shared AUTO_UPDATE_PLAYLISTS/Playlist types into preload.

This centralizes native player launching and playlist updates through the
preload IPC bridge, simplifying web service code and moving file I/O to
the native/main layer for better security and separation of concerns.
2025-10-15 23:31:08 +02:00
4gray 6b693b3237 refactor: convert to standalone api 2025-10-15 23:12:19 +02:00
4gray 3186d022e2 Merge pull request #629 from 4gray/refactor/remove-packages-fix-build
refactor/remove-packages-fix-build
2025-10-15 08:55:25 +02:00
4gray bc3c9ce8cc feat(electron-backend): add IPC event scaffolding and persistent store 2025-10-15 08:55:03 +02:00
4gray 7487738a7d refactor(nx): remove packages, fix build issues 2025-10-14 23:44:33 +02:00
4gray ad75cb2f1a Merge pull request #628 from 4gray/refactor(nx)-more-app-restructuring
refactor(nx): app restructuring
2025-10-14 09:01:42 +02:00
4gray 260f3b3da7 refactor(nx): app restructuring 2025-10-14 09:00:31 +02:00
4gray af55372655 Merge pull request #625 from 4gray/app-restructuring
refactor(nx): add restructuring
2025-10-13 01:34:10 +02:00