Commit Graph
58 Commits
Author SHA1 Message Date
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 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 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 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 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 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 7028ff4049 refactor(nx): app restructuring 2025-10-13 00:24:54 +02:00
4gray 99ed5df404 chore: back to electron + nx 2025-10-07 18:02:13 +02:00
4gray 0c5939ae16 feat(video-player): integrate Artplayer and remove DPlayer
- Enableplayer global config and component options:
  - set Artplayer.AUTO_PLAYBACK_TIMEOUT to 10000 to reduce autoplay
    timeouts.
  - enable autoPlayback, playsInline, airplay, backdrop, mutex and set
    theme on Artplayer instance to improve playback behaviour and UI.
  - add autoSize, autoMini, pip, screenshot, aspectRatio and fullscreen
    settings for a consistent feature set.

- Harden channel URL check to avoid null errors:
  - use optional chaining when checking channel.url for m3u8.

- Move StreamFormat import ordering and clean unused enum entry:
  - remove DPlayer from VideoPlayer enum and related commented code.
  - remove DPlayer component imports, declarations and template branch,
    simplifying player selection and eliminating dead code.

- Tidy component decorator formatting and fix template array trailing
  commas to preserve style consistency.

These changes replace the deprecated/removed DPlayer integration with a
fully configured Artplayer, improve runtime safety, and clean up unused
code.
2025-09-27 20:05:35 +02:00
4gray e338eb16dc fix(web-player): remove unused dplayer 2025-09-27 20:05:00 +02:00
4gray c01e8c204c chore(deps): bump multiple dev/prod dependency versions
Update several packages in package-lock to newer minor/patch releases
and align Angular ESLint packages with the Angular 20 toolchain. Key
changes include:
- Upgrade @rx-angular/* to 20.0.0 to match other framework updates.
- Bump runtime libs: artplayer, axios, hls.js, rxjs, semver, uuid,
  zone.js to patch/minor versions for fixes and compatibility.
- Update @angular-eslint packages to 20.3.0 to match Angular 20.x.
- Refresh eslint, @eslint/*, eslint-plugin-import, prettier, and
  semantic-release to more recent releases for linting/CI stability.
- Add explicit rxjs 7.8.1 entries under some Angular DevKit node_modules
  to ensure consistent resolution.

These updates address compatibility with Angular 20, pull in bug fixes
and security/maintenance patches, and stabilize dev tooling and CI.
2025-09-27 17:19:50 +02:00
4gray 0e2ba6b138 refactor: convert *ngFor to control-flow @for loops in channel list 2025-09-27 16:31:01 +02:00
4gray bce4717de6 fix(player): use channel URL for favorites ordering
Use channel.url instead of channel.id when updating the favorites
ordering in the playlist store. The change ensures the dispatched
setFavorites action contains the correct identifierurl) that the
store and downstream logic expect, preventing mismatches between the
UI order and persisted favorites.
2025-09-27 16:30:22 +02:00
4gray cd2dd2ede5 chore: update to angular v20
- Removed unnecessary imports from header, account-info, 
  loading-overlay, navigation-bar, season-container, serial-details, and 
  vod-details components.
- Updated template syntax to use structural directives more efficiently in mpv-player-bar, account-info, navigation-bar, season-container, serial-details, and vod-details components.
- Enhanced readability and maintainability of the code by organizing imports and using Angular's async pipe and structural directives appropriately.
- Adjusted TypeScript configuration to use "bundler" for module resolution for better compatibility with modern build tools.
2025-09-21 12:27:36 +02:00
4gray fb507b932a feat(m3u): preserve favorites list after updating playlist 2025-09-09 09:18:31 +02:00
4gray 944f69f34a chore: bump version to 1.0.0-beta.7 2025-09-08 18:14:58 +02:00
4gray 1e7a9366ce chore: update vscode config 2025-09-08 18:14:46 +02:00
4gray f1dfef6d9f feat(xtream): improvements in xtream portal UI
- Replaced the existing favorites component HTML structure with a new app-favorites-layout component for better organization and maintainability.
- Removed unused styles from favorites.component.scss.
- Updated favorites.component.ts to utilize the new layout component and streamline imports.
- Enhanced detail-view styles for improved responsiveness and layout consistency.
- Adjusted navigation component to conditionally render elements based on playlist type.
- Introduced a new NavigationItem interface for better type safety in navigation items.
- Refactored search results component to utilize new search-form and search-result-item components for cleaner code and separation of concerns.
- Updated vod-details component to handle portal ID retrieval more robustly.
- Made various style adjustments across components for improved UI consistency.
2025-09-08 18:12:16 +02:00
4gray 87807dc1e7 feat(stalker): rework stalker portal UI
- Added `StalkerSearchComponent` for searching VOD and series content.
- Integrated search form and results grid with loading states.
- Implemented item selection and details display for VOD and series.
- Created a new `StalkerShellComponent` for navigation and routing.
- Established routing for Stalker module with nested routes for VOD, series, and favorites.
- Introduced a centralized `StalkerStore` for managing state and API interactions.
- Enhanced `StalkerSeriesViewComponent` to display detailed information about selected series.
- Updated styles for improved layout and user experience.
2025-09-08 18:10:36 +02:00
4gray 4759f62f71 feat(live-stream): add MPV player bar component to live stream layout 2025-05-18 14:32:24 +02:00
4gray 4330301d32 refactor(media): enhance error handling and event emissions for MPV and VLC process launches 2025-05-04 23:07:44 +02:00
4gray fed05e1a8b fix(favorites): correct type mapping in getFavorites method 2025-05-04 23:06:54 +02:00
4gray a7f4e97f6f refactor(favorites): restructure favorites component for improved category handling and UI layout 2025-05-04 23:06:45 +02:00
4gray 818e729c75 refactor(xtream): enhance error handling for empty categories and no category selected 2025-05-04 23:06:30 +02:00
4gray c1d7a3c155 refactor(category-view): improve category selection logic and update error view titles for better localization 2025-05-04 23:06:16 +02:00
4gray 34864b76dd fix(xtream): add error handling for image loading in category and VOD details views 2025-05-04 23:05:56 +02:00
4gray d18a11fb8b refactor(navigation): update navigation links to use routerLink and streamline page switching logic 2025-05-04 23:05:16 +02:00
4gray 715c624328 refactor: change input decorator usage and improve season selection logic 2025-05-04 23:04:27 +02:00
4gray 80e1a7b1f5 feat(i18n): add new error messages for category selection and empty list view 2025-05-04 23:04:03 +02:00
4gray 13e92243e5 refactor(xtream): streamline player service integration and improve dialog handling 2025-05-04 23:03:53 +02:00
4gray 39654e7366 refactor(xtream): add stream URL construction methods and initialize streamUrl in state 2025-05-04 23:02:13 +02:00
4gray a302054af3 refactor(xtream): generalize xtream api related components 2025-04-21 23:55:11 +02:00
4gray e23c8f7eef feat(i18n): extend translation strings 2025-04-21 23:53:04 +02:00
4gray c17e157faa feat(i18n): add sidebar translations for German and English 2025-04-21 22:01:42 +02:00
4gray 5e75f2fe7d feat(selectors): add selector for playlist by ID 2025-04-21 22:01:29 +02:00
4gray c45bcb47cd refactor(i18n): update i18n 2025-04-09 20:35:57 +02:00
4gray 9f40dea806 refactor(settings): update default stream format to M3u8StreamFormat 2025-04-09 20:35:36 +02:00
4gray 13b4cf3992 refactor: update settings store 2024-12-20 22:59:22 +01:00
4gray ee490ee05a feat(tauri): add user-agent, referer, and origin properties to HTTP payload 2024-12-20 22:57:57 +01:00
4gray 1c5587b0e7 feat(interfaces): add origin property to channel HTTP interface 2024-12-20 22:57:08 +01:00
4gray a17718b1cf chore: update author email in package.json 2024-12-20 22:56:41 +01:00
4gray 079e464b98 feat(media): add support for custom user-agent, referer, and origin headers in MPV command 2024-12-20 22:56:30 +01:00
4gray 62cb231e8f refactor(xtream-tauri): implement player service to manage external player interactions 2024-12-20 22:55:47 +01:00
4gray 512211b8dc chore: remove outdated asset file 2024-12-19 21:46:49 +01:00
4gray 0076882ed8 chore: bump version to 1.0.0-beta.5 2024-12-19 21:44:28 +01:00