Commit Graph
1552 Commits
Author SHA1 Message Date
4gray 57246c421d fix: timezone handling
* EPG data is stored with ISO 8601 format including timezone offset
(e.g., 2025-12-26T16:00:00+01:00)
* When displayed, moment(isoString)
parses it correctly and converts to the user's local timezone
automatically
* No settings needed — times always show in the user's
machine timezone
2026-01-05 21:52:45 +01:00
4gray ad9bf45518 Merge pull request #709 from 4gray/feat/improve-stalker-support
feat/improve-stalker-support
2026-01-05 21:51:10 +01:00
4gray 16baf54b16 feat(stalker): support ministra shows under VOD content type
Update translations and refactor StalkerPortalImportComponent to use
Angular signals and readonly/dependency-injected readonly properties.
- Add new i18n keys: LOADING_SEASONS and NO_EPISODES; adjust
  PLAYBACK_ERROR punctuation.
- Replace EventEmitter @Output with a signals-based readonly output and
  mark form, constants and flags as readonly.
- Switch to inject() style for services and mark many injected fields
  private/readonly to clarify intent.
- Replace DataService import with STALKER_SERIAL_NUMBER token import.
- Improve logging formatting, whitespace and minor code cleanup.
- Minor template/style whitespace fixes.

These changes modernize the component for better immutability,
improve DX with clearer logging, and add missing user-facing
translation strings.
2026-01-05 21:44:29 +01:00
4gray 61eef5e00d feat(stalker): feat: add auth for stalker portal, expend portal import UI
Refactor stalker-series-view template to guard fields with conditionals
so that only available metadata is displayed. Replace selectedItem() with
displayItem() to use the updated selection accessor. Add checks for
director, actors, year/release date, genre/genres_str, imdb and kinopoisk
ratings to avoid showing empty labels.

Enhance stalker-portal-import component by adding reactive form fields
for serial/device IDs and signatures, importing MatProgressSpinnerModule,
and wiring TranslateService and StalkerSessionService into the component.
Include a small loading-container style. These changes prepare the UI for
improved import UX and safer rendering of optional series metadata.
2026-01-04 19:07:37 +01:00
4gray 6c17980175 Merge pull request #708 from 4gray/chore/update-nx
chore: update nx dependencies
2026-01-04 19:07:27 +01:00
4gray 747e602ed2 chore: update nx dependencies 2026-01-04 19:06:32 +01:00
4gray 2e2bf7b84e Merge pull request #706 from 4gray/refactor/streaming-sax-epg-parser
refactor/streaming-sax-epg-parser
2026-01-03 00:28:45 +01:00
4gray 943a55585b chore: add saxes, remove epg-parser 2026-01-02 17:22:09 +01:00
4gray 99b5ad161f feat(ui): improve info overlay and add EPG header search styles
Update info-overlay template to read simplified EPG fields and
avoid indexing into arrays for title, icon and description so bindings
are resilient and clearer:
- Use epgProgram?.iconUrl instead of epgProgram?.icon?.[0]?.src
- Use epgProgram?.title instead of epgProgram?.title?.[0]?.value
- Use epgProgram?.desc instead of epgProgram?.desc?.[0]?.value
- Guard description rendering with epgProgram?.desc

Adjust multi-epg header layout and add search UI styles to support
desktop window chrome and draggable regions:
- Add left padding to #epg-navigation for macOS traffic lights, enable
  backdrop drag via -webkit-app-region: drag and set z-index to keep
  header above content.
- Exclude interactive elements (buttons, search inputs) from drag by
  applying -webkit-app-region: no-drag to maintain native interactions.
- Add extensive styles for a channel search container (search input,
  icons, clear button, filter count, animations) and scaffold a program
  search container.

These changes improve robustness of EPG data rendering and add styled
search controls while ensuring proper window dragging behavior on
desktop builds.
2026-01-02 17:22:09 +01:00
4gray 895a269200 feat(db): add EPG schema and IPC handlers for EPG storage
Add tables, indexes, FTS5 virtual table, and triggers to support EPG
(electronic program guide) data in the shared SQLite connection. The
changes introduce epg_channels and epg_programs tables, multiple
indexes for efficient lookups (by source, name, channel, start, and
time range), and an epg_programs_fts virtual table with triggers to
keep the full-text index synchronized with epg_programs.

Register EPG database event handlers in the Electron backend and
add an IPC handler for bulk-saving channels. The handler deletes
existing channels for a source and inserts new channels in chunks to
avoid large single inserts, returning the inserted count.

These changes enable storing, querying, and full-text searching EPG
data and prepare backend IPC endpoints for importing program guide
data.
2026-01-02 17:22:09 +01:00
4gray 87bf0f6178 feat(ui): add EPG import progress panel component
Introduce a standalone EpgProgressPanelComponent with template and
bindings to show active, completed and queued EPG imports. The new
component:
- provides a header with title and optional "dismiss all" button when
  multiple imports exist.
- lists active/completed imports with status icon, URL display,
  dismiss button, and conditional progress bar for loading state.
- shows stats (channels/programs) or error text when available.
- renders a queued section with positions and dismiss controls.
- wires to EpgProgressService observables (imports, visibility and
  counts) and implements helper getters (activeImports).

This adds UI for import progress feedback and controls so users can
monitor and manage EPG import operations. Files added:
- epg-progress-panel.component.ts
- epg-progress-panel.component.html
2026-01-02 01:02:20 +01:00
4gray a6ad3fce14 feat(epg): add indexing and cleanup for faster lookups and memory
Introduce a lowercase display name index (Map) to allow O(1) resolution
from display name to channel id. Rebuild the index during merged-data
rebuild and use it in channel lookups to avoid expensive full scans.
Add a fallback partial-match pass only when the index lookup fails.

Add automatic and manual cleanup of expired programs:
- Add cleanupExpiredPrograms(hoursToKeep) to remove programs older
  than the specified number of hours from epgDataMerged.
- Invoke cleanup after worker fetches (auto-cleanup with 24 hours).
- Expose an IPC handler EPG_CLEANUP_EXPIRED to trigger cleanup on
  demand.

Other changes:
- Clear epgData.programs after merging to free memory.
- Log merged data rebuild and cleanup counts for observability.

These changes improve performance of channel resolution, reduce memory
usage by pruning stale program entries, and provide a manual hook for
on-demand maintenance.
2025-12-26 01:48:15 +01:00
4gray fe8e907e9f refactor(epg): implement streaming SAX-based EPG parser and batching
Replace full-file parsing with a streaming SAX parser to avoid loading
entire XMLTV payloads into memory. Add support for gzipped feeds by
using streaming gunzip (createGunzip) and piping into a SaxesParser,
allowing incremental processing of channels and programmes.

Introduce:
- StreamingEpgParser class that incrementally builds channel and program
  objects and emits batches.
- parseXmltvDate helper to normalize XMLTV datetimes to ISO strings.
- batching constants and response types for channel/program batches and
  progress reporting.
- use of Readable/Saxes for streaming parsing and reduced memory use.

This change improves performance and memory usage for large EPG files,
enables progress reporting and batch emission to the main thread, and
prepares for handling very large or gzipped EPG sources.
2025-12-26 01:32:51 +01:00
4gray a2240fcc88 Merge pull request #703 from 4gray/refactor-move-global-favorites-to-header
refactor: move global favorites to header
2025-12-26 01:32:07 +01:00
4gray fce4d8798e Merge pull request #702 from 4gray/refactor/restructure-database-events
refactor(electron-backend): split DB event handlers into modules
2025-12-26 01:02:24 +01:00
4gray 81bdcd644c refactor: move global favorites to header 2025-12-26 00:53:14 +01:00
4gray 1265059c41 refactor(electron-backend): split DB event handlers into modules 2025-12-26 00:52:28 +01:00
4gray 45b3a8be22 Merge pull request #701 from 4gray/refactor/database-library
feat(db): add shared database library with sql config
2025-12-26 00:52:04 +01:00
4gray 223ce7a0e9 chore(config): normalize coderabbit config and add labeling
Normalize .coderabbit.yaml structure and add automatic issue
labeling. Move auto_review under the top-level reviews key to match
expected nesting and restore YAML schema comment. Introduce
issue_enrichment.labeling with auto_apply_labels and detailed
labeling_instructions for bug, enhancement, and documentation so
issues are categorized automatically and consistently. Fix minor
formatting and spacing to improve readability and tooling support.
2025-12-26 00:35:07 +01:00
4gray 815279f49f feat(db): add shared database library with sql config
Introduce a shared database schema library for Drizzle ORM and
configure its TypeScript build settings. Move the canonical schema
into libs/shared/database/src/lib/schema.ts and expose strong
typing and table definitions for playlists, categories, content,
recently_viewed and favorites. Add tsconfig.lib.json to set
outDir, declaration output and node types for the shared lib.

Keep apps/electron-backend compatibility by re-exporting the
schema and types from the new shared library (apps/electron-backend
now imports the shared definitions rather than duplicating them).

These changes centralize the database schema as a single source
of truth, prevent duplication, and enable read-only consumers
(e.g. agent-backend) to depend on compiled type declarations.
2025-12-26 00:35:07 +01:00
4gray 65b21aa0f2 Merge pull request #698 from 4gray/refactor/mpv-vlc-error-handling
chore: improve player error handling
2025-12-25 23:54:18 +01:00
4gray e6ad644ee8 chore: improve player error handling
App imports and streams
capture MPV stdout/stderr now
friendly errors sent
2025-12-25 23:33:21 +01:00
4gray 13e3ef96e0 Merge pull request #694 from 4gray/refactor/playlist-filter
refactor/merge-playlist-filter-and-sort-into-one-menu
2025-12-21 01:04:12 +01:00
4gray a874db0b41 feat(ui): add filter and sort menu to header and clean styles
Add a new mat-menu component for filtering and sorting playlists in the
header area. The filter section iterates playlistTypes and allows toggling
type selection with visual check state. The sort section adds options for
name (asc/desc) and date added (newest/oldest) with active-state visuals
and click handlers that call setSortOptions. A close button is also
included.

Remove unused/duplicate CSS rules from header styles: drop .filter-
container and obsolete .dropdown-menu-header rules to avoid styling
conflicts and reduce dead code. Adjust surrounding selector formatting.
2025-12-21 00:42:48 +01:00
4gray c84b42284a style(settings): adjust settings container height to account for header
Reduce the settings page container height calculation from
calc(100vh - 100px) to calc(100vh - 70px) so the content fits the
visible viewport when the header height is 70px. This prevents
unnecessary vertical overflow and avoids extra whitespace at the
bottom of the settings page.
2025-12-21 00:42:48 +01:00
4gray 3772d5c0cf feat(i18n): add filter/sort labels and playlist types
Update English, German, and Russian locale files to improve playlist
UI text and provide explicit playlist type labels.

- Rename and adjust several labels: change FILTER_BY_TYPE to a more
  descriptive "Playlist Types" and add a new FILTER_AND_SORT string.
- Normalize capitalization for SORT_BY ("Sort By") in en.json.
- Add PLAYLIST_TYPES object with keys for M3U, XTREAM, and STALKER,
  providing localized descriptions for each language.
- Keep existing sorting options and parsing messages intact.

These changes make filtering, sorting, and playlist source options
clearer to users in multiple locales and prepare the UI for showing
playlist type choices.
2025-12-21 00:42:48 +01:00
4gray ac31cf18e5 refactor(web): replace individual action imports with namespaced
imports and update dispatch calls

Replace multiple direct or wildcard imports for actions with
namespaced action groups from 'm3u-state' (e.g. PlaylistActions,
ChannelActions, EpgActions). Update dispatch calls to use the
namespaced action creators (for example, setAdjacentChannelAsActive,
setEpgAvailableFlag, resetActiveEpgProgram, setCurrentEpgProgram,
setActiveEpgProgram, addPlaylist).

This cleans up imports, improves tree-shaking and readability,
and standardizes how actions are referenced across components. It
also fixes inconsistent import styles (wildcard vs. named) and
prepares the codebase for clearer action organization.
2025-12-21 00:42:48 +01:00
4gray 68b87040ad feat(m3u-state): reducers and add selectors
Move playlist reducers into a dedicated reducers module and re-export a
composed playlistReducer built from smaller reducer arrays (epg,
channel, playlist, favorites, filter). This extracts and organizes the
previously monolithic reducer implementation into focused reducer files,
improving modularity and maintainability.

Add simple selectors in the new reducers index for commonly accessed
pieces of PlaylistState (playlists, selected playlist id, epg availability,
active channel, current EPG program, channels list, playlists loaded flag,
current playlist id) so callers can import them from a single place.

These changes make reducer logic easier to reason about, enable
incremental testing and extension of individual reducer groups, and
centralize basic selectors for consistent usage across the app.
2025-12-20 23:59:40 +01:00
4gray d391514015 Merge pull request #688 from 4gray/fix/playlist-use-file-basename-title
fix(playlist): use file basename as playlist title
v0.17.1
2025-12-14 17:55:31 +01:00
4gray f10c8b5990 fix(playlist): use file basename as playlist title
Extract the file's basename and strip common playlist extensions
before passing it as the playlist title when loading from a selected
file. This replaces the previous hardcoded "from file" title with a
cleaner, context-aware name derived from the file path.

- import basename from node:path
- compute filename and remove .m3u, .m3u8, .pls, .txt extensions
- fall back to "from file" if resulting title is empty

This improves UX by giving imported playlists meaningful names.
2025-12-14 17:53:54 +01:00
4gray ebc085cb4e Merge pull request #687 from 4gray/fix/ui-fixes
fix/ui-fixes
2025-12-14 17:30:33 +01:00
4gray a5685ef27d feat(ui): re-enable input selection and add context menu
Re-enable user selection for input and textarea elements so users
can select and copy text in form fields. Add an Electron context
menu handler that shows a focused edit menu only for recognized
text input types or editable fields. The menu includes Cut, Copy,
Paste and Select All and respects the editFlags to enable actions.

This restores native editing UX in the renderer while avoiding
global context menus elsewhere in the app.
2025-12-14 17:11:12 +01:00
4gray c2c06a99be fix(video-player): ignore hotkeys when typing in search input
Prevent global hotkeys from triggering while the user is typing in
input or textarea fields. Add a private isTypingInInput(event) helper
and short-circuit key handlers (info key and digit keys) to return
early when the event target is an input or textarea.

This avoids interfering with normal text entry (e.g., entering numbers
in forms) and prevents accidental overlay toggles or channel changes
while the user is focused on a form field.
2025-12-14 17:01:02 +01:00
4gray 8482e7c76a style: remove redundant light-theme CSS block from playlist item
Delete an unnecessary media query that set `.meta` color for the
light color scheme in the recent-playlists playlist-item stylesheet.
The rule duplicated default styling and added extra specificity,
so removing it simplifies the CSS and avoids redundant overrides.

This reduces stylesheet size and potential maintenance confusion while
preserving visual behaviour across themes.
2025-12-14 17:01:02 +01:00
4gray ba9932aa4d Merge pull request #678 from 4gray/ci/macos-arch-runners-update
ci/macos-arch-runners-update
2025-12-14 16:50:47 +01:00
4gray 7fa7143868 build: update snap description in electron-builder 2025-12-14 14:14:03 +01:00
4gray 54b8d3a18b ci: move env variable to step header 2025-12-14 13:03:13 +01:00
4gray cf5d88a4b4 docs: add troubleshooting section for macOS & Linux
Add a Troubleshooting section to the README covering two common
platform-specific launch issues and how to resolve them.

- macOS: document Gatekeeper "App is damaged and can't be opened"
  and show how to clear the quarantine flag with xattr.
- Linux: document chrome-sandbox SUID permission error and provide
  two solutions — fix permissions (chown/chmod) for packaged installs,
  or run with --no-sandbox by editing the desktop launcher or using the
  command line.

These instructions reduce user confusion and support requests by
providing clear, actionable steps to get IPTVnator running on affected
systems.
2025-12-14 12:31:00 +01:00
4gray c714996ce0 feat(electron): refine Linux sandbox handling and format copy filter
Improve sandbox handling on Linux by detecting Snap, Flatpak,
and AppImage environments and applying appropriate Chromium
command-line switches:

- If running in Snap or Flatpak, disable Chromium's sandbox
  (--no-sandbox) to avoid conflicts with the distribution's
  own sandboxing.
- Otherwise (traditional packages and AppImage), disable the
  SUID sandbox and prefer the user namespace sandbox
  (--disable-setuid-sandbox). This avoids requiring a SUID
  chrome-sandbox binary and aligns with modern Linux best
  practices.

Also adjust apps/electron-backend/src/main.ts to only apply
these changes on Linux (process.platform === 'linux').

Minor formatting: expand the package.json copy "filter" array
to a multiline style for readability.
2025-12-14 12:31:00 +01:00
4gray d7bfd2648c feat(ci): add GitHub Action job to publish Snap on tags
Add a publish-snap job to the CI workflow that runs after build and
only triggers for version tags (refs/tags/v*). The job downloads the
linux build artifacts, installs snapcraft, locates the generated .snap
file and uploads it to the Snapcraft Store releasing to the stable
channel. It validates the presence of a snap file and fails if none is
found.

This enables automated Snap distribution for tagged releases using the
SNAPCRAFT_STORE_CREDENTIALS secret.
2025-12-14 12:31:00 +01:00
4gray 568a5feac3 fix(ci): use different runners for macos arm and intel arch
Update GitHub Actions workflow to support multiple OS runners and CPU
architectures, standardize matrix keys, and adjust platform-specific
steps and artifact names.

- Replace simple os matrix with include entries specifying os, runner,
  and arch to allow macOS x64/arm64 separation and explicit runners for
  linux/windows.
- Use runner matrix value for runs-on and change timeout/strategy
  accordingly.
- Adjust conditional checks to use normalized os values (linux, macos,
  windows) rather than platform-specific runner labels.
- Install Linux system deps only when os == 'linux' and keep Flatpak
  setup for electron-builder.
- Add a macOS-specific make step that passes the architecture to the
  electron make command, while keeping a combined make step for
  non-macOS builds.
- Upload macOS artifacts per architecture and rename artifact paths to
  include arch; update release files list to include both macOS x64 and
  arm64 artifact patterns.

These changes enable reliable, architecture-aware macOS builds,
prevent native module conflicts across runners, and ensure artifacts
are labeled and uploaded correctly.
2025-12-12 22:22:31 +01:00
4gray ddc87e95a7 chore(package): bump version to 0.17.1 2025-12-12 21:25:36 +01:00
4gray a20143ce17 Merge pull request #674 from 4gray/fix/remote-control-bundle-fix
feat(package): include built remote-control-web in packaged app
2025-12-12 21:06:27 +01:00
4gray a80f3b925f feat(package): include built remote-control-web in packaged app
Add a packaging rule to copy the built remote-control-web output from
dist/apps/remote-control-web into the installer as remote-control-web.
Previously the repository included the raw source pattern
remote-control-web/**/* which did not reflect the compiled build output.
By pointing files to the dist build and filtering all files, the packaged
app now contains the production web assets instead of source files.

This fixes missing runtime assets in releases and ensures the packaged
installer includes the correct built web app for remote control.
2025-12-09 16:43:25 +01:00
4gray 6b0436e788 Merge pull request #672 from 4gray/style/improve-start-page
style/improve-start-page
v0.17.0 test-8d5537370ebf2f95d84122b2351763c2d3ef9579
2025-12-06 22:05:38 +01:00
4gray 3e2afe11e3 feat(ui): add remote-control URLs + fix header typos and env
Add support for displaying local remote-control URLs and QR code in the
Settings UI, including styles for URL list, row layout, monospaced links,
and a QR container. Expose a new global API signature getLocalIpAddresses
for retrieving local IPs.

Fix several UI issues:
- Correct typo in header method name (opedAddPlaylistDialog -> openAddPlaylistDialog).
- Fix malformed GitHub URL and collapse img tag formatting.
- Reformat imports and viewChild usage for readability.

Change local development backend URL to localhost:3000 in the local
environment to point to the running local API during development.

These changes improve developer ergonomics (local backend), add a remote
control discovery UX for users on the same network, and tidy up header
bugs and formatting.
2025-12-06 21:46:35 +01:00
4gray 7e4732a1bf chore: add angularx-qrcode and tidy package-lock entries 2025-12-06 21:45:51 +01:00
4gray aba6ef024f feat(ui): enable XC refresh only in Electron environment
Add an isElectron flag to PlaylistItemComponent and conditionally
render the refresh button only when running inside Electron.
This prevents exposing the server refresh action in non-Electron
(environments like the browser) where window.electron is unavailable
and the feature is not supported.

Update ensures safer behavior by checking !!window.electron in the
component and using that value in the template to guard the UI.
2025-12-06 21:44:50 +01:00
4gray 4437d2c2cd feat(i18n): add new translations strings
Add new English keys for remote control URL and QR code to support
remote-control features in the settings UI. Extend French locale with
many missing and corrected translations: add "Playlists" root entry,
Xtream/Stalker import labels, UI copy improvements (e.g. "Chaînes",
grammar fixes), new playlist export/copy messages, search/auto-refresh
labels, and removal success message. Fix several typos and phrasing in
French strings (IPTV, chaînes, ajouter(e), requièrent).

These changes enable new remote-control functionality and improve UX
for French users by completing and correcting the translations.
2025-12-06 21:44:25 +01:00
4gray ccc50573d4 feat(ui): add app-region drag/no-drag and tweak styles
Add app-region: drag to container and header elements and app-region:
no-drag to interactive controls multiple components so the
Tauri window dragging behaves correctly while keeping buttons and form
controls clickable. Expand header search max width from 500px to 800px
to give more room on larger screens. Clean up and restyle video-player
toolbar toolbar primary colors and unify toolbar spacing.

Files changed include navigation, sidebar, header, main containers,
live-stream layout, navigation-bar, stalker container, and video-player
toolbar. These changes improve window drag UX on desktop and refine
toolbar/header appearance.
2025-12-06 21:44:25 +01:00