86 Commits

Author SHA1 Message Date
kingchenc
75ac9d6e2e fix: resolve "undefined" server display on Samsung TVs and add mDNS (.local) warning
Fixes #319 — Server appears as "undefined" on Samsung TV after network interruptions
when using mDNS (.local) hostnames.

Root cause:
The injected jellyfin_credentials in localStorage were missing the `Name` property.
When the TV couldn't reach the server (mDNS resolution failure), Jellyfin Web had
no cached server name to display, resulting in literal "undefined".

Changes:
- Add `Name` property to injected auto-login credentials using the real ServerName
  from /System/Info/Public, with fallback to the server URL
- Store JellyfinServerName in AppSettings (fetched during server validation and
  authentication, cleared on logout)
- Add the server's LocalAddress (IP-based) as a fallback entry in config.json so
  the TV can still connect when mDNS resolution fails
- Add a visible warning banner in the UI when a .local hostname is detected,
  advising users to use a direct IP address instead
- Add lblMdnsWarning localization key to all 28 language files (translated for
  da, nl, en, fr, de, pt, tr — English fallback for remaining languages)
2026-04-16 04:51:00 +02:00
PatrickSt1991
d7424138c6 Clear CustomWgt path after install 2026-04-11 14:06:56 +02:00
Patrick Stel
d822bd2e9f Feature: Save NetworkInterface
Improvement: Subnet check and IP Search
2026-04-10 11:27:58 +02:00
Dávid Balatoni
f6c6ff074c feat: add GitHub PAT input UI to settings 2026-03-25 19:39:49 +01:00
PatrickSt1991
78d0ede171 Added litefin and filter for wgt and tpk in selected releases 2026-03-21 07:56:12 +01:00
Patrick
3d0f89e6a8 Add fetch call for LiteFinRelease 2026-03-21 07:02:11 +01:00
Patrick
116351376a Add Moonlite to jellyfinOverrides dictionary 2026-03-21 06:57:38 +01:00
PatrickSt1991
5ed25031ca Place CustomWGT in try catch #285
Always add Custom WGT option also when rate limit is hit #287
2026-03-03 08:59:50 +01:00
Patrick
030cf24786 Add TransportTycoonDeluxe preview image 2026-02-21 15:41:03 +01:00
PatrickSt1991
2c2bb5de80 Package required version check with Tizen OS 2026-02-18 12:02:39 +01:00
Patrick
1643ea5758 Update BuildInfoViewModel.cs 2026-02-10 12:50:53 +01:00
PatrickSt1991
c4a4e947ba App preview added 2026-01-29 19:34:02 +01:00
PatrickSt1991
9879412518 fetchReleases instead of release
Added prefix option and int to tell how much releases to fetch
2026-01-27 20:57:47 +01:00
PatrickSt1991
d4fc9b6071 new finding 2026-01-26 21:11:43 +01:00
PatrickSt1991
867c7c2c6e Added default for Github Assets 2026-01-23 16:12:14 +01:00
PatrickSt1991
e1b9d5b03d possible null references popping up in github action 2026-01-21 13:34:00 +01:00
PatrickSt1991
2adebebb74 Fixed DeletePreviousInstall setting
Forcefully delete previous installation if tryOverwrite is true but Author certificate mismatch
2026-01-21 08:31:01 +01:00
PatrickSt1991
6a0a6df965 Moved Jellyfin config guard up to installerService
NetworkInterfaces as selectable instead of automatic
2026-01-19 20:05:42 +01:00
kingchenc
9c38699702 Add cancellation token to stop background tasks when update dialog shows
Description

  Fixed UI freeze when update dialog appears during startup. Previously, network scanning and GitHub release loading continued running in the background while the update dialog was displayed, causing the window to freeze.

Changes:
  - Added _initializationCts to cancel initialization tasks
  - Pass cancellation token to LoadReleasesAsync() and LoadDevicesAsync()
  - Cancel background tasks before showing update dialog
  - Resume initialization after user dismisses dialog (Cancel/Skip/Manual)
  - Added cancellation check in DeviceHelper.ScanForDevicesAsync() loop
2026-01-19 13:38:51 +01:00
kingchenc
0f68d108b1 Add auto-updater with GitHub Atom feed (no rate limit)
Summary
  - Add auto-update checker using GitHub Atom feed (bypasses API rate limits)
  - Show update dialog on startup with two options: "Open Releases" (manual) or "Update Now" (automatic)
  - Automatic updates: download, extract, replace files, restart app
  - Support for Windows, Linux, and macOS

Changes
  - New services: `UpdaterService`, `UpdateDialogService`
  - New dialog: `UpdateDialog` with version info and release notes
  - New settings: `CheckForUpdatesOnStartup`, `SkippedUpdateVersion`
  - Localization: All 6 languages (EN, DE, NL, FR, DA, TR)

Technical Details
  - Uses `/releases.atom` endpoint instead of REST API (no rate limit)
  - Falls back to API only for download URLs when update is available
  - Update script handles file replacement while app is closed
  - Version comparison with semver support
2026-01-18 15:03:23 +01:00
PatrickSt1991
750f571cf4 code clean up and testin github action 2026-01-18 12:53:22 +01:00
PatrickSt1991
196fe4e89b - GitHub rate limit catched on sdb check
- Developer vs host ip subnet check
- Localization for subnet
2026-01-18 10:03:52 +01:00
kingchenc
9c4c802d6d Fix: Add "IP : Port : Path" server input mode for base path configurations
Users with Jellyfin servers configured with a base path (e.g., http://ip:8096/jellyfin/)
were unable to authenticate. The "IP : Port / Full URL" mode didn't include a base path field, and
while "Full URL" mode worked, it wasn't intuitive for this use case.

The server validation (/System/Info/Public) succeeded, but authentication failed with:
'<' is an invalid start of a value - indicating the API returned HTML instead of JSON
because the base path was missing from the auth endpoint URL.

Fix: Added a third server input mode "IP : Port : Path" that allows users to enter
protocol, IP, port, and base path separately.
2026-01-17 22:11:16 +01:00
PatrickSt1991
1f4032602e v2 release 2026-01-17 14:07:44 +01:00
PatrickSt1991
d19ad9e600 youtube fix 2026-01-15 21:00:32 +01:00
PatrickSt1991
62ea3023ef fix tv debug button
youtube fix
2026-01-15 20:24:28 +01:00
kingchenc
179a6b5785 UI improvements: clickable theme previews, round dark mode toggle, localization fixes
CSS Style Tab
  - Theme preview images are now clickable - opens the theme's GitHub README page
  - Clear button now also resets the theme preview

Settings
  - Fixed dark mode toggle to be round (matching main window style)
2026-01-12 14:48:31 +01:00
kingchenc
2192fede6a Add Dark Mode toggle with dynamic theme switching
Summary

  - Add dark mode toggle icon (☀️/🌙) to main window and settings header for quick theme switching
  - Create ThemeService for centralized theme management with save/load from settings
  - Replace all hardcoded colors with DynamicResource for proper theme support
  - Synchronize theme state between MainWindow and Settings via ThemeChanged event
  - Update Buttons, TextBlocks, and ComboBoxes styles to be theme-aware
  - Fix dark mode for all modal dialogs (BuildInfo, InstallationComplete, Installing, IpInput, TvLogs)
  - Update DialogService to use theme-aware colors from FluentTheme resources
2026-01-12 14:24:49 +01:00
PatrickSt1991
ab61755609 bitmap fix 2026-01-12 13:58:48 +01:00
PatrickSt1991
f5c18ac044 Merge branch 'ps/refactor' of https://github.com/PatrickSt1991/Samsung-Jellyfin-Installer into ps/refactor 2026-01-12 13:51:32 +01:00
PatrickSt1991
22f684275c previewer 2026-01-12 13:51:19 +01:00
kingchenc
0ff3130107 Remove UpdateMode dropdown and User Tab (settings now via JS injection)
Summary
  - Remove UpdateMode dropdown from Server tab - settings are now always applied via JS injection
  - Remove User Tab completely - these settings are default in Jellyfin and API calls are unnecessary
  - Simplify JellyfinPackagePatcher to always apply server settings when JellyfinIP is configured
  - Remove UpdateUserConfigurationsAsync API method and InjectUserSettingsAsync HTML injection
  - Clean up related constants, AppSettings properties, and localization strings (6 languages)

Removed
  - ConfigUpdateModes constants and ConfigUpdateMode setting
  - User settings: AutoPlayNextEpisode, RememberAudioSelections, RememberSubtitleSelections, PlayDefaultAudioTrack, UserAutoLogin
  - 8 localization keys across all language files
2026-01-12 13:33:00 +01:00
PatrickSt1991
4237d3a9db Removed RememberIps
Renamed Force Samsung Login label
Renamen Right-to-left label
2026-01-12 13:06:47 +01:00
kingchenc
16fa6f73e9 Add JellyThemes quick-insert buttons to CSS Style tab
Summary
  - Add JellyThemes section to CSS Style tab with 6 pre-configured themes (Obsidian, Solaris, Nebula, Ember, Void, Phantom)
  - Clicking a theme button inserts the CSS @import statement and auto-validates
  - Add "GitHub JellyThemes" link button to open the theme repository
  - Add localization strings for all 6 languages (en, de, nl, da, fr, tr)

New Files
  - Models/JellyTheme.cs - Theme model with metadata (name, icon, color, CSS URL)

Modified Files
  - ViewModels/JellyfinConfigViewModel.cs - JellyThemes collection and commands
  - Views/JellyfinConfigView.axaml - Theme buttons UI with WrapPanel layout
  - All localization JSON files - Added lblJellyThemes and lblJellyThemesHint
2026-01-12 06:20:54 +01:00
kingchenc
c193ccedd2 Refactor: Consolidate helpers, standardize JSON library, and improve code organization
Summary
  - Introduced centralized helper classes to eliminate code duplication and improve maintainability
  - Standardized JSON serialization from Newtonsoft.Json to System.Text.Json
  - Refactored large methods into focused, testable units
  - Added pre-compiled regex patterns for better performance

New Helper Classes

  | File | Purpose |
  |------|---------|
  | Helpers/Core/Constants.cs | Centralized magic strings, error codes, ports, app identifiers |
  | Helpers/Core/UrlHelper.cs | URL normalization (NormalizeServerUrl, CombineUrl, IsValidHttpUrl) |
  | Helpers/Core/PlatformService.cs | Cross-platform OS detection and platform-specific operations |
  | Helpers/Core/RegexPatterns.cs | Pre-compiled regex patterns for version parsing, Tizen capabilities, HTML, etc. |
  | Helpers/Core/JsonSerializerOptionsProvider.cs | Centralized JsonSerializerOptions configurations |

Key Changes

TizenInstallerService Refactoring
  Split 215-line InstallPackageAsync into focused methods:
  - PrepareDeviceAsync() – Device preparation and diagnostics
  - GetDeviceInfoAsync() – Device information collection
  - HandleCertificateAsync() – Certificate handling logic
  - ApplyConfigurationAsync() – Configuration application
  - HandleInstallationResultAsync() – Result processing

JSON Library Migration
  Migrated from Newtonsoft.Json to System.Text.Json:
  - Models/GitHubRelease.cs
  - Helpers/Core/AddLatestRelease.cs
  - Helpers/API/TizenApiClient.cs
  - Services/SamsungLoginService.cs
  - Services/TizenInstallerService.cs
  - ViewModels/MainWindowViewModel.cs

Code Quality Improvements
  - Replaced 13× duplicate TrimEnd('/') calls with UrlHelper
  - Unified OS detection via PlatformService (previously mixed OperatingSystem.* and RuntimeInformation.*)
  - Used Random.Shared instead of new Random() for thread safety
  - Eliminated magic strings/numbers via Constants class
2026-01-11 22:32:13 +01:00
kingchenc
0cc084aef6 Add Admin Multi-User Support & Refresh Users Button
Summary
  - Added admin detection during authentication - checks User.Policy.IsAdministrator from Jellyfin API
  - Admin users can now select multiple Jellyfin users to configure during installation
  - Non-admin users only configure their own account (single-user mode)
  - Added "Refresh" button to reload user list without logout/login
  - Added hint text explaining that selected users will be configured during installation

Changes
  - JellyfinApiClient: Extended AuthenticateAsync() to return isAdmin, added LoadUsersAsync() method
  - AppSettings: Added IsJellyfinAdmin and SelectedUserIds properties
  - JellyfinConfigViewModel: Added admin state, user collections, refresh command
  - JellyfinConfigView.axaml: Added multi-select ListBox for users (admin only), refresh button, hint text
  - TizenInstallerService: Updated to use selected user IDs when admin, single user ID otherwise
  - Localization: Added lblRefreshUsers and lblUserSelectionHint (6 languages)

Behavior
  - Admin login: Shows user list with multi-select, "Refresh" button, configures all selected users
  - Normal user login: No user selection UI, only own account is configured
  - Auth status shows "Authenticated (Admin)" or "Authenticated"
2026-01-10 16:46:01 +01:00
kingchenc
71fdbf8785 Remove Legacy API Key System & Fix Server Input Mode Persistence
Summary
  - Removed obsolete Legacy API Key system - authentication now uses AccessToken from username/password login exclusively
  - Removed user dropdown (LoadUsersAsync, AvailableJellyfinUsers, SelectedJellyfinUser) - no longer needed since you authenticate AS a specific user
  - Removed "everyone" code path from TizenInstallerService
  - Fixed server input mode not persisting after restart (Full URL mode would reset to IP:Port)
  - Added Logout button to allow switching Jellyfin accounts

Changes
  - JellyfinApiClient: Removed `LoadUsersAsync()`, updated auth to use AccessToken
  - JellyfinConfigViewModel: Removed user collections, selection handlers, and LoadJellyfinUsersAsync
  - JellyfinConfigView.axaml: Simplified Auto-Login section, removed user ComboBox
  - AppSettings: Removed `JellyfinApiKey`, added `ServerInputMode` for persistence
  - TizenInstallerService: Simplified to use single authenticated UserId
  - Localization: Cleaned up obsolete labels (6 languages)
2026-01-10 16:23:10 +01:00
kingchenc
9cd31c48c4 Merge Settings UI into Jellyfin Config with new Main Settings tab
Description:
  Consolidates the separate Settings window into the Jellyfin Config window, now renamed to "Settings".

Changes:
  - Added new "Main" tab containing all application settings (Language, Certificate, Local IP, installation options)
  - Merged SettingsViewModel into JellyfinConfigViewModel
  - Updated navigation to open unified Settings window directly from MainWindow
  - Removed obsolete SettingsView and SettingsViewModel files
  - Added localization support for new tab in all 6 languages (EN, DE, DA, FR, NL, TR)

  The Settings window now has 5 tabs: Main, Server, Playback, User, CSS Style
2026-01-10 15:31:55 +01:00
PatrickSt1991
d515779e17 github releases fetch fix 2026-01-09 22:15:09 +01:00
PatrickSt1991
fbe05e662f github releases helper preventing code duplication 2026-01-09 21:51:59 +01:00
PatrickSt1991
5316c4d609 Refactoring helpers 2026-01-09 18:41:21 +01:00
kingchenc
f3571d6298 Fix installation complete modal closing entire application
Fixed bug where closing the success modal after installation would shut down the entire app instead of just the modal window.

  - Changed CloseWindow() from desktop.Shutdown() to RequestClose event
  - Window now properly subscribes to RequestClose and calls Close()
2026-01-09 01:33:00 +01:00
kingchenc
5f66f952aa Add Custom CSS injection with validation support
Summary:
  - Add new "CSS Style" tab in Jellyfin Config for custom CSS/theme injection
  - Support for inline CSS and @import rules (e.g., ElegantFin, Ultrachromic themes)
  - CSS validation button that tests @import URL reachability and syntax errors
  - Custom CSS is injected as <style> tag into Jellyfin web app during installation

Changes:
  - AppSettings.cs: Add CustomCss property
  - JellyfinConfigViewModel.cs: Add CustomCss observable, validation logic, URL extraction
  - JellyfinConfigView.axaml: New CSS Style tab with multiline TextBox and Validate button
  - JellyfinHtmlPatcher.cs: Add InjectCustomCssAsync() method
  - JellyfinWebPackagePatcher.cs: Call CSS injection during package patching
  - Localization: Add CSS translations for all 6 languages (en, de, fr, nl, tr, da)

Features:
  - Validates @import URLs are reachable before installation
  - Basic CSS syntax validation (balanced braces/parentheses)
  - Button disabled when CSS field is empty
  - Status display with color feedback (green=valid, red=error)
2026-01-09 00:32:12 +01:00
kingchenc
17128965d3 Reorganized the Jellyfin Config Server tab layout for better UX flow and moved legacy features to a dedicated section.
Server Tab now has 3 sections:
  1. Server Settings - Update Mode, Input Mode, Server URL/IP, Connection Status
  2. Auto-Login Settings - User, Password, Authentication
  3. Advanced Settings - TV Debug, Server Scripts, YouTube Fix

User Tab addition:
  - Added "Legacy API Key System" section at bottom
  - Moved API Key field and Jellyfin User(s) dropdown here
  - These are legacy features from WPF era, kept for backward compatibility
2026-01-09 00:32:12 +01:00
kingchenc
063a7e2750 Fix ServerMismatch bug, reorganize Jellyfin Config UI with tabs, and improve auto-login flow
### Bug Fixes:

- Fixed ServerMismatch breaking auto-login - The auto-login credentials were using a fake server ID derived from the URL (serverUrl.replace(/[^a-zAZ0-9]/g, '')). Now fetches the real server GUID from /System/Info/Public endpoint and stores it in AppSettings.JellyfinServerId for correct localStorage credential injection.
- Fixed URL handling for reverse proxy setups - URLs without explicit ports (e.g., https://xx.seedhost.eu/xxx/jellyfin/) now work correctly. Default ports (443 for HTTPS, 80 for HTTP) are no longer included in the stored URL.
- Auto-enable config patching on login - When authentication succeeds and Update Mode is "None", it automatically switches to "Server Settings" to enable
config patching. Removed the unused EnableAutoLoginConfigCommand button.

### UI Improvements:

- Reorganized UI with TabControl - Split settings into 3 tabs:
  - Server: Server settings + Auto-login settings
  - Playback: Browser/playback preferences
  - User: User-specific settings
- Server Input Mode selector - Users can choose between:
  - IP : Port mode - Enter protocol, IP, and port separately
  - Full URL mode - Paste complete URL (auto-parses all fields)
- Removed Base Path field - No longer needed since Full URL mode handles paths automatically
- Improved button consistency - Test Server and Test Login buttons now have matching sizes and styling
- Label updates:
  - "Status" → "Server Status"
  - "Test" button → "Test Server"
  - "Login" button → "Test Login"

### Localization:

Added/updated translations for all 6 languages (en, de, fr, nl, tr, da):
 - lblTabServer, lblTabPlayback, lblTabUser
 - lblServerInputMode, lblServerUrl, lblConnectionStatus
 - lblAutoLoginUser, lblTestServer (updated)

### Modified files:

 - JellyfinConfigView.axaml - Complete UI restructure with tabs
 - JellyfinConfigViewModel.cs - New properties, auto-validation logic, server ID fetching
 - JellyfinHtmlPatcher.cs - Fixed auto-login to use real server ID
 - JellyfinPluginPatcher.cs - Exposed API client
 - AppSettings.cs - Added JellyfinServerId, JellyfinServerLocalAddress
 - All localization JSON files - New translation keys
2026-01-07 22:00:17 +01:00
kingchenc
5530092a60 Add reverse proxy path support and auto-login credentials injection
Add support for Jellyfin servers behind reverse proxies (e.g., seedhost) and automatic login credential injection for Samsung TV installations.

Features:
  - Add Base Path field for reverse proxy URLs (e.g., /xxx/jellyfin)
  - Add JellyfinFullUrl property that combines host:port with base path
  - Add username/password authentication with access token storage
  - Add auto-login injection that pre-populates localStorage credentials
  - Add "Test Connection" button to verify server reachability
  - Add "Login" button to authenticate and store access token

Modified files:
  - Helpers/AppSettings.cs: New properties for base path and credentials
  - Helpers/JellyfinApiClient.cs: AuthenticateAsync() and TestServerConnectionAsync()
  - Helpers/JellyfinHtmlPatcher.cs: InjectAutoLoginAsync() for credential injection
  - Helpers/JellyfinWebPackagePatcher.cs: Integrate auto-login during packaging
  - ViewModels/JellyfinConfigViewModel.cs: UI bindings and commands
  - Views/JellyfinConfigView.axaml: New Auto-Login Settings section
  - Assets/Localization/*.json: Added translations (en, de, fr, nl, da)

Fix for Add reverse proxy path support and auto-login credentials injection
2026-01-07 00:25:33 +01:00
PatrickSt1991
0a1946f692 YouTube Patch preventing Error 153
Jellyfin Plugin improvements
2026-01-02 17:56:28 +01:00
PatrickSt1991
60c2c8a7cf WS Fix 2026-01-01 22:01:12 +01:00
PatrickSt1991
ed87ff9be6 Added error codes 118012 and 118, -12
Fixed AppName for InstallationCompleted view
UX Fix for version
2026-01-01 21:06:40 +01:00
PatrickSt1991
c30656a0d7 removed dev stop 2026-01-01 13:47:29 +01:00