Commit Graph
49 Commits
Author SHA1 Message Date
4gray 53cbd64575 feat(header): add home styling, search output and host binding
Enhance the header component to support a distinct "home" appearance
and emit search updates. Add a HostBinding that toggles a home-header
class from the isHome flag so styles can target the home state.
Expose a searchQuery output and wire an onSearchQueryUpdate method to
emit the search text, enabling parent components to react to user
searches.
Refactor imports to include HostBinding and output. Tidy toolbar metrics
and adjust element sizing for a compact brand block and pulsing logo.
Introduce comprehensive SCSS for the home header:
- gradient background, animated glow overlay, and edge accent
- brand block styling with blur, border, hover states and box-shadow
- logo sizing, pulse animation and responsive tweaks
- reduced toolbar height and overall visual polish
These changes separate home-specific styling from the default header
appearance and provide a programmatic hook for search interactions.
2025-12-06 21:44:25 +01:00
4gray 7ee2cc4eea feat(db): add API to delete all playlists and related rows
Add a new IPC handler_DELETE_ALL_PLAYLIST that removes all
and related data from the SQLite database in a safe order that respects
foreign key relationships. The handler deletes favorites and recently
viewed entries first, then content, categories, and finally playlists.
Errors are logged and propagated.

Expose the new operation in the renderer preload API as
dbDeleteAllPlaylists() to allow UI code to invoke the purge. This
provides a single-call way to clear playlists and their dependent
records for testing or user-driven reset.
2025-12-06 14:46:37 +01:00
4gray f05469cc44 feat(ui): extract channel list item template and add EPG dialog 2025-11-27 08:20:54 +01:00
4gray 008f267808 feat(ui/epg-list): replace mat-list with custom markup and add progress
Refactor EPG list template to remove Material selection list and 
dividers, replacing them with plain markup and CSS-friendly elements. 
Key changes: - Replace <mat-divider> with .header-divider for consistent
styling. - Replace mat-selection-list/mat-list-option with plain divs 
(.program-item,   .program-meta, .program-title) to allow richer DOM 
structure and avoid   Material selection semantics.
- Use track $index in ngFor to stabilize rendering and avoid using 
program   start/stop concatenation as key.
- Render live progress bar inside program items when a program is 
playing,   using calculateProgress(program) to set width.
- Convert empty-state <p> to .epg-not-available div for layout 
consistency. - Add clickable class and active class binding to 
interactive items. Code changes and cleanup:
- Update component imports to use ChangeDetectionStrategy and
  ChangeDetectorRef and remove unused Material imports (MatDivider, 
MatListModule)   from the component file.
- Adjust template bindings: use [innerHTML] and class bindings instead 
of   matList directives.
Why:
- Remove heavy dependency on Material selection list to gain finer 
control   over DOM and styles, enable custom progress UI and clickable 
behavior,
  and simplify template for better performance and maintainability.
2025-11-24 22:29:42 +01:00
4gray 573ca01925 fix(artplayer): manage Hls instance and centralize player teardown
Add a dedicated hls field and a destroyPlayer() helper to ensure Hls
instances are properly destroyed when the component is torn down or
re-initialized. Replace inline Hls creation with a guarded pattern that
destroys any existing hls before creating a new one, preventing leaks or
duplicate attachments. Use destroyPlayer() from ngOnDestroy and when the
channel input changes to centralize teardown logic and keep lifecycle
handling consistent.
2025-11-23 21:53:01 +01:00
4gray e279172dfe fix(ui): correct fonts, semicolons and preload target
- Add missing semicolon in apps/web/src/styles.scss to fix invalid CSS
  that could break style parsing for .scroll-viewport.
- Change preconnect in apps/web/src/index.html from fonts.gstatic.com to
  fonts.googleapis.com and consolidate multiple Google Fonts links into 
  a single stylesheet URL to reduce redundant requests and ensure 
  Material Icons and selected font families load together.
  Remove duplicated @import of Outfit in
  
  libs/ui/components/src/lib/multi-epg/multi-epg-container.component.scss, 
  switch component font-family to Roboto (with fallback) and update 
  button font to match, ensuring consistent typography and avoiding 
  external import duplication across components. ese changes fix a 
  ntax error, optimize font loading, and standardize
typography across the UI.
2025-11-23 18:50:46 +01:00
4gray 09ad2c3b1b refactor(ui): tidy imports, simplify cleanup, and format styles 2025-11-23 18:50:46 +01:00
4gray 6a8ea69492 feat(multi-epg): redesign multi-EPG styles with modern dark theme
Revamp the Multi-EPG component stylesheet to introduce a polished,
broadcast-control-room inspired dark theme and improved layout
styling.

- Add Google fonts (Outfit, JetBrains Mono) for a clean UI and mono
  date display.
- Introduce color variables, gradients and accents for consistent
  theming and easier maintenance.
- Rework base container (.parent) with subtle grid overlay and updated
  typography.
- Implement a frosted glass navigation bar (#epg-navigation) with
  blur, glow, and accessible button styles.
- Add today-date styling using a monospace font and glowing accent.
- Expand channels column width, update background, borders, shadows,
  and hover transitions for clearer channel separation.
- Replace many hard-coded colors with variables and add transitions
  for smoother interactions.
- Add utility classes for navigation buttons and improved disabled/
  hover states.

These changes improve visual hierarchy, accessibility, and maintainabiity
of the EPG UI while setting up a consistent design system for further
enhancements.
2025-11-22 11:40:16 +01:00
4gray 9073bf1bb3 feat(m3u): add compact mode and conditional EPG display
Add compact layout support for channel list items and make EPG
display conditional based on runtime environment and stored settings.

- Introduce .compact styles in channel-list-item.component.scss to
  reduce item height, padding, and logo size when EPG is hidden.
- Add StorageMap injection and read STORE_KEY.Settings in
  ChannelListContainerComponent to determine whether EPG is configured
  (only enable EPG in Electron when epgUrl exists; disable in PWA).
- Expose shouldShowEpg flag and itemSize getter to switch virtual
  scroll item size between 68 and 48 pixels.
- Bind [class.compact] on channel list item and wire [showEpg] input
  to channel-list-item components so item rendering adapts to mode.
- Replace hardcoded itemSize in cdk-virtual-scroll-viewport with
  dynamic [itemSize] to match compact/expanded layouts.

This reduces visual clutter and avoids showing EPG in environments
(where it is not configured or supported), improving UX and resource
usage.
2025-11-22 11:40:16 +01:00
4gray 5cf96d7112 feat(video-player): add channel number overlay UI
Add a transient channel number overlay to the video player UI so users
see the numeric channel feedback when entering or changing channels.

- Insert conditional overlay markup in the video-player template that
  renders when showChannelNumberOverlay is true and displays the
  channelNumberInput value.
- Add styles for .channel-number-overlay and
  .channel-number-display to center the overlay, style the numeric
  display (large bold font, dark translucent background, rounded
  corners, shadow) and include a brief scale-in animation.
- Keep overlay pointer-events disabled so it doesn't block player input.

This improves user experience by giving clear visual confirmation of
channel changes.
2025-11-22 11:40:16 +01:00
4gray 34ef9c57d1 fix: preserve favorites after auto-refresh 2025-11-22 11:40:16 +01:00
4gray 592f6e34f9 feat(toolbar): add info button and overlay toggle
Add "Show program info (Press I)" translation and an info icon
button to the video player toolbar. Emit an infoOverlayClicked event
from the toolbar and expose isLeftDrawerOpened to control the menu
icon state. Update the menu icon to reflect drawer open/closed state.

Implement showOverlay() on the info overlay component to toggle
visibility and auto-hide after 10 seconds when shown. This enables
manual toggling of the program info overlay via the new toolbar
button or keyboard shortcut, improving discoverability and user
control of program information.
2025-11-22 11:40:16 +01:00
4gray d564a0d564 feat(m3u): show current EPG program in channels list
Reset EPG fields when epgProgram becomes null to avoid stale
displayed durations and ensure consistent behavior when no program
is available.

Improve channel list container and item styling:
- hide horizontal overflow to prevent unexpected scrollbars
  (scroll-viewport, #all-channels, .channel-list).
- add empty-favorites layout and hint styles for clearer empty
  state presentation.
- refactor channel-list-item SCSS: introduce structured layout
  (.channel-list-item, .channel-content, .channel-logo,
  .channel-details), apply responsive truncation rules and font
  imports, add hover/active visuals and dark-theme support, and
  tweak drag-icon spacing.

These changes fix UI glitches (stale EPG, horizontal scrollbars)
and modernize the channel list presentation for better readability
and theming.
2025-11-22 11:40:16 +01:00
4gray 3bf328343b style(ui/info-overlay): redesign EPG layout and styles
Refactor the info-overlay template to introduce a structured EPG
layout: replace the previous flat channel-logo + content structure with
an .epg-layout wrapper that groups .channel-logo and a richer .content
area. Split content into .content-header (separate program title and
channel name), conditional program description rendering, and a
program-timeline containing explicit start/end times and a progress
track. Remove fixed image width attribute and rely on responsive CSS.

Revamp component SCSS: import refined fonts, increase overlay max-height,
add horizontal padding, and add new styles for .epg-layout, .channel-logo,
.content, .content-header, .program-title and related elements. Add
animations, improved image handling (object-fit + drop shadow), and
layout spacing to support varying content lengths and improve visual
hierarchy.

These changes improve responsiveness, accessibility of EPG text
display, and visual polish of the overlay.
2025-11-22 11:40:16 +01:00
4gray ce6aa1b3d1 feat(info-overlay): add no-EPG layout and gradient blur
Introduce a separate no-EPG presentation and move backdrop blur
into an isolated pseudo-element to avoid visual bleed and improve
layout control.

- Replace direct backdrop-filter on the overlay with a ::before
  pseudo-element that applies backdrop-filter and mask-image
  gradients (with -webkit- prefixed fallbacks) for a smoother
  gradient blur effect.
- Add isolation on the overlay to contain stacking context and set
  z-index of the pseudo-element to -1 to keep content above the blur.
- Add .no-epg modifier on the overlay and new .no-epg-layout,
  .channel-logo-large and .channel-name-large styles to provide a
  centered, accessible layout when no EPG data is available.
- Update template to render two distinct layouts: one when
  epgProgram exists (original detailed view) and one fallback view
  when epgProgram is missing, including larger channel logo and
  centered channel name.

These changes improve visual fidelity of the blur effect and add a
clear fallback UI for channels without EPG data.
2025-11-22 11:40:16 +01:00
4gray c8961c94d5 feat: use signal for active channel + listen for remote control events
- Replace local selected state with store signal (selectActive) in the
  channel list container so templates bind to activeChannel()?.url
  instead of comparing selected?.id. This unifies selection handling
  with the global store and prevents stale local state.
- Update selectChannel to dispatch setActiveChannel instead of mutating
  local selected property; keep EPG lookup behavior intact.
- Import selectActive alongside other selectors from m3u-state and
  remove unused local InjectionToken in video player.
- Add remote control listener in VideoPlayer (Electron) to handle
  channel up/down events and wire a new handleRemoteChannelChange
  method skeleton. Use combineLatest/take to safely read required
  observables for channel switching.
- Minor rxjs import and formatting adjustments.

These changes centralize active channel state in the store, simplify
template logic, and add support for remote channel changes on desktop.
2025-11-22 11:26:22 +01:00
4gray 79b1e991ef feat(remote-control): add remote control UI library
Add a new library libs/ui/remote-control including component, template,
Jest setup, and project configuration to provide a remote-control UI
component.

- Add RemoteControlComponent implemented with inject-based service
  usage, loading and error state, and async channelUp/channelDown handlers.
  This centralizes remote control logic and handles errors for the UI.
- Add HTML template for the remote-control touchpad, buttons, error
  display, and basic branding markup.
- Add Jest config (jest.config.ts) and tsconfig.spec.json configured for
  unit tests with jest-preset-angular to enable testing of Angular
  components.
- Add Nx project configuration (project.json) with test and lint
  targets so the library is discoverable and runnable by the workspace.

These changes scaffold the remote-control feature as a reusable UI
library and enable testing and linting within the monorepo.
2025-11-22 11:26:22 +01:00
4gray 028ccf1580 feat(ui/components): export and reuse overlay injection token
Introduce a shared InjectionToken for OverlayRef used by the multi-EPG
overlay component and export it from the components module.

- Add overlay-ref.token.ts defining COMPONENT_OVERLAY_REF to provide
  OverlayRef for dynamically created overlay components.
- Replace a locally created InjectionToken with an injected
  COMPONENT_OVERLAY_REF in multi-epg-container.component to avoid
  token duplication and ensure consistent DI across modules.
- Export the token from libs/ui/components/src/index.ts so other
  consumers can import and use the same token.

This reduces duplicated token definitions, fixes DI inconsistencies,
and makes the overlay ref reusable by external components.
2025-11-22 11:26:22 +01:00
4gray c34bdf73e1 feat(xtream): show category page info and preserve page state
Update category header and list views to provide clearer context
and improve navigation state handling.

- Display category name with current page/total pages when viewing a
  category (non-detail) so users see which page they're on.
- Add i18n "PAGE" key and fill "SELECT_CATEGORY" in translations for
  en/de/ru to support the new page label and existing messaging.
- Tidy live-stream layout template formatting and fix filter pipe
  spacing for consistency.
- Change no-channel-selected fallback to use the translated
  "PORTALS.SELECT_CATEGORY" string.
- Preserve category selection state on CategoryContentView init:
  only set selected category when the route category differs from
  the current selection to keep paging/scroll position when returning
  from a detail view.

These changes improve UX by making pagination explicit and avoiding
unnecessary state resets when navigating between list and detail.
2025-11-15 17:36:58 +01:00
4gray 730200f704 feat(xtream): preserve user Xtream data during refresh
Save and restore favorited and recently viewed Xtream items when
deleting and re-importing playlist content.

- Return favoritedXtreamIds and recentlyViewedXtreamIds from
  deleteXtreamPlaylistContent so callers can capture user data before
 .
- Add restoreXtreamUserData to the database service to allow restoring
  favorites and recently viewed entries after a refresh.
- Query and collect xtreamIds and timestamps for favorites and recently
  viewed items in the backend before deleting content.
- Persist the captured user data to localStorage in the recent playlists
  component so it can be used to restore state after re-importing the
  playlist.
- Keep existing playlist metadata update flow intact.

This prevents loss of user-specific favorites and recent history when
refreshing Xtream playlists.
2025-11-13 19:26:37 +01:00
4gray 487b721d7c refactor: replace shared COMPONENT_OVERLAY_REF with local tokens 2025-11-11 08:24:30 +01:00
4gray aee5d93118 refactor(interfaces): remove angular dep (InjectionToken) from shared lib
Remove the COMPONENT_OVERLAY_REF InjectionToken and its export from the
shared interfaces library. The token was unused in the codebase, so
deleting it cleans up dead code and reduces API surface area exposed by
libs/shared/interfaces. This simplifies imports and avoids maintaining an
unneeded token definition.
2025-11-11 08:24:12 +01:00
4gray a06c642eef feat(recent-playlists): show auto-refresh indicator on playlist items
Add a compact auto-refresh icon to playlist items to indicate when a
playlist has auto-refresh enabled. Move existing upload-type icons into
an .icon-container so the auto-refresh indicator can be positioned
absolutely beside them.

- Add .auto-refresh-indicator styles to position and size the indicator,
  match colors, and center the icon.
- Wrap mat-icon elements in .icon-container and render an additional
  mat-icon when item.autoRefresh is true for URL and file playlists.
- Keep tooltips for the auto-refresh icon to explain its meaning.

This improves UX by making auto-refresh state visible at a glance.
2025-11-11 08:23:27 +01: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 588664c3aa refactor(player): remove unused player path args 2025-11-08 23:02:15 +01:00
4gray 656c86dc30 refactor: rework ipc events handling 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 6f9e8aa64e feat(player): pass playlist headers to external players 2025-11-08 10:22:27 +01:00
4gray ccbb08cfb4 fix(ui): correct imports, guard checks, logging and settings handling 2025-10-27 08:20:29 +01: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 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 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 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 7487738a7d refactor(nx): remove packages, fix build issues 2025-10-14 23:44:33 +02:00
4gray 260f3b3da7 refactor(nx): app restructuring 2025-10-14 09:00:31 +02:00
4gray 2d4fdcfc1b refactor(nx): add restructuring 2025-10-13 01:33:50 +02:00
4gray 7028ff4049 refactor(nx): app restructuring 2025-10-13 00:24:54 +02:00
4gray 920afa6850 refactor(nx): created shared and m3u-utils library 2025-10-10 11:49:35 +02:00