76 Commits

Author SHA1 Message Date
90a6e5e16b Fix version mismatch in test mode update notification
- Updated test mode to use current version number from system status
- Added version synchronization between displayed and stored values
- Enhanced forceShowUpdateButton to use the most current version
- Added version comparison to detect and fix mismatches
- Used the displayed version as the source of truth
- Implemented automatic version correction in localStorage
- Fixed hardcoded version number in test mode
- Improved version consistency across the application

🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
2025-03-10 18:49:03 +00:00
cbae1d57fe Bump version to 2.0.11 with updated documentation
- Updated version number to 2.0.11 in package.json
- Updated README.md with changelog for 2.0.11
- Updated About modal in index.html to show current version
- Added detailed version history entry in About modal
- Updated copyright and version information
- Enhanced documentation with complete feature list

🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
2025-03-10 18:46:13 +00:00
d2d2ea976b Fix conflict between test mode and actual update status
- Added automatic test mode disabling when update attempt is made
- Added clear test mode indicator in the floating notification
- Implemented automatic test mode disabling when real update check shows no update
- Added visual distinction between test and real update notifications
- Added warning message for test mode to prevent confusion
- Updated update status text to clearly indicate when in test mode
- Fixed potential conflict in test toggle handler
- Improved usability with clearer notification messages

🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
2025-03-10 18:36:58 +00:00
2705989ff6 Fix version display with direct package.json reading
- Added direct package.json file reading instead of require caching
- Enhanced system status endpoint to always return current version
- Added manual refresh button to floating notification
- Implemented aggressive cache-busting for all version checks
- Added double-check system status after update completion
- Added detailed logging for version retrieval for debugging
- Improved error handling for package.json reading
- Added immediate user feedback for refresh operations

🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
2025-03-10 18:33:53 +00:00
8589a0833e Fix update status handling with cache busting and better response parsing
- Added detection of 'already have the latest version' scenario
- Implemented proper handling when no update is available with friendly message
- Added cache busting parameters to ensure fresh data from server
- Enhanced test mode toggle to properly check real update status
- Added specific handling for the case where update script runs but no update is needed
- Improved logging to show actual update check response
- Modified reload mechanics to force cache refresh with timestamp parameter
- Added special handling to avoid unnecessary page reloads

🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
2025-03-10 18:30:40 +00:00
467979971a Fix update process to properly handle completion
- Enhanced applyUpdate function to handle both original and floating buttons
- Added immediate update notification removal after successful update
- Implemented proper countdown display on both update buttons
- Added localStorage cleanup to ensure clean page reload
- Fixed error handling to re-enable both buttons on failure
- Improved page reload with forced clean URL (no hash fragments)
- Added consistent handling across success and error cases
- Created updateCountdown function for cleaner code reuse

🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
2025-03-10 18:27:32 +00:00
5ce348d61e Implement floating notification for update alerts
- Created an entirely new floating notification system independent of the main UI
- Positioned notification as fixed element attached directly to the body
- Used bright red styling with high contrast to ensure visibility
- Added redundant notification alongside original update alert
- Implemented try/catch blocks for robust error handling
- Added event listeners for update button in floating notification
- Enhanced force show function to handle both notification types
- Applied fixed position and high z-index to ensure visibility
- Added console logging for better debugging

🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
2025-03-10 18:24:29 +00:00
dc4131f04c Add extreme measures to ensure update button visibility
- Implemented an aggressive 1-second interval to force-check & show update button
- Added bold red styling with \!important flags to make button impossible to miss
- Implemented MutationObserver to detect & counteract any hiding attempts
- Added detailed console logging for debugging visibility issues
- Applied inline styles with \!important flags to override any CSS cascades
- Increased z-index to 9999 to ensure button appears above all other elements
- Set multiple CSS properties (display, visibility, opacity) to ensure visibility

🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
2025-03-10 17:51:01 +00:00
5261f7b4f4 Fix update button persistence with more robust implementation
- Completely redesigned update notification system with dedicated functions
- Added showUpdateAlert and hideUpdateAlert functions for better control
- Improved update status persistence with namespaced localStorage keys
- Added custom CSS styles with \!important to prevent style overrides
- Modified toggle test functionality to directly show/hide the update alert
- Prevented update notifications from being cleared on errors
- Added forced display styles and higher z-index for visibility
- Added debugging logs to verify update detection

🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
2025-03-10 17:38:27 +00:00
b8818a9bec Fix browser compatibility and update button persistence
- Replaced AbortSignal.timeout() with AbortController for broader browser support
- Fixed promise chaining for proper cleanup of timeout handlers
- Added localStorage persistence for update information
- Made update button display more reliable with forced display styles
- Added ID to version elements for easier targeting
- Improved version number synchronization across UI elements

🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
2025-03-10 17:35:58 +00:00
3ff0a50553 Fix dynamic version display and update button issues
- Updated footer version to dynamically display current running version
- Fixed update button disappearing when refreshing status
- Added version tracking to prevent update button from hiding
- Updated About modal to show current version and added v2.0.10 to version history
- Fixed error handling in update check process

🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
2025-03-10 17:28:50 +00:00
c0a7362226 Fix fs references in server.js
- Updated all fs.readFile, fs.writeFile, fs.mkdir and other fs calls to use fsPromises instead
- Resolved conflict between renamed fs import and function calls
- Ensures consistent use of Promise-based fs API throughout the codebase

🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
2025-03-10 17:25:25 +00:00
dd08278e28 Fix fsPromises import in server.js
- Fixed import for fsPromises to ensure correct module is available
- Added explicit import for regular fs module for synchronous operations

🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
2025-03-10 17:24:05 +00:00
980a6ca3a4 Fix fs.existsSync error in update check
- Fixed TypeError: fs.existsSync is not a function error by using fsPromises instead of fs
- Updated version to 2.0.10
- Updated README with changelog
- Added better error handling for git repository checks
- Improved file system operations for update detection

🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
2025-03-10 17:23:07 +00:00
1ff479a3cf Fix fs.existsSync error in update check
- Correctly import both fs and fs.promises modules
- Update all fs method calls to use appropriate module
- Fix update check error by using consistent promise-based fs API

🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
2025-03-10 17:06:44 +00:00
313c85ee4b Fix Transmission installation detection in update mode
- Skip Transmission daemon installation prompt when in update mode
- Properly detect remote/local status from existing config file
- Add better logging for Transmission configuration detection

🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
2025-03-10 17:04:13 +00:00
eaed045323 Fix configuration detection in update mode
- Skip Transmission configuration prompt when updating an existing installation
- Automatically detect remote/local setting from existing config
- Properly export update-related variables to environment file
- Fix indentation issues in conditional statements

🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
2025-03-10 17:01:51 +00:00
2dcd4becef Fix update functionality and improve documentation
- Fixed update detection in install scripts
- Added Git availability checks to update system
- Improved error handling for update endpoint
- Added detailed Git requirements to README
- Added troubleshooting section for update issues

🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
2025-03-10 16:57:47 +00:00
9b45e669e2 Fix installation issue with missing server.js
Fixed a critical installation issue where server.js and server-endpoints.js were not being
copied to the install directory. This caused the service to fail with 'Cannot find module'
errors when trying to start.

Changes:
- Updated copy_module_files in file-creator-module.sh to also copy main server files
- Added error handling if server.js is missing
- Added better logging during file copying

💡 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
2025-03-07 11:51:09 +00:00
f2b217ad84 Fix syntax error in main-installer.sh
Fixed a syntax error in the update script setup section of main-installer.sh:
- Fixed incorrect brace closure (using '}' instead of 'fi')
- Fixed indentation for better code readability
- Ensured proper nesting of if conditions
- This should resolve the error during installation when copying module files

💡 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
2025-03-07 11:46:33 +00:00
5a1318bbf2 Fix syntax errors in utils-module.sh
Fixed multiple syntax errors in utils-module.sh:
- Replaced compound commands with  syntax with clearer if statements
- This addresses issues with bash syntax in older versions of bash
- Improved error handling with explicit 2 checks

💡 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
2025-03-07 11:43:28 +00:00
3aee416cda Fix syntax error in utils-module.sh
Fixed a syntax error on line 134 in utils-module.sh that was causing installation to fail when setting up with a remote Transmission server.

💡 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
2025-03-07 11:41:22 +00:00
6dc2df3cee Fix code consistency and reliability issues
This commit addresses multiple code consistency and reliability issues across the codebase:

1. Version consistency - use package.json version (2.0.9) throughout
2. Improved module loading with better error handling and consistent symlinks
3. Enhanced data directory handling with better error checking
4. Fixed redundant code in main-installer.sh
5. Improved error handling in transmission-client.js
6. Added extensive module symlink creation
7. Better file path handling and permission checks
8. Enhanced API response handling

💡 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
2025-03-07 11:38:14 +00:00
83222078d9 Fix npm installation issues during setup
- Created reusable ensure_npm_packages function for consistency
- Fixed npm install being called in wrong directory during installation
- Added proper directory context preservation for npm operations
- Ensured package.json file is always copied to installation directory
- Added checks to prevent redundant npm installations
- Improved error handling and reporting for npm operations

🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
2025-03-07 10:18:45 +00:00
16c73bca70 Fix module loading issues with require extension compatibility
- Added robust module loading in server.js with multiple fallback paths
- Created bidirectional symlinks for modules with different naming styles
- Added extension-less symlinks for Node.js CommonJS compatibility
- Updated file copying logic to create all necessary symlinks
- Added symlink creation script that runs on startup
- Improved module error reporting with detailed path information

🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
2025-03-07 10:15:47 +00:00
852de32907 Fix systemd service startup issues
- Updated test-and-start.sh to work with systemd services
- Added proper node executable path detection
- Fixed issue with shebang line in startup script
- Updated service module to use absolute paths correctly
- Improved robustness of startup script with better error handling

🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
2025-03-07 10:11:20 +00:00
35420335d7 Fix data directory creation issue on clean install
- Added improved data directory handling in RSSFeedManager
- Added synchronous creation of data directory in constructor
- Created test-and-start.sh script to ensure data directory exists
- Updated service module to use the startup script
- Added fallback methods for data directory creation

🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
2025-03-07 09:31:19 +00:00
302c75c534 Bump version to 2.0.9 and update README
- Updated version to 2.0.9
- Added new changelog entries for all fixes
- Documented remote connection fixes
- Documented update button and status endpoint additions

🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
2025-03-07 09:25:19 +00:00
8887f6fda1 Add system status and update endpoints
- Added /api/system/status endpoint to report application status
- Added /api/system/check-updates endpoint to check for updates via git
- Added /api/system/update endpoint for applying updates
- Fixed update button in dashboard
- Added proper error handling for git operations

🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
2025-03-07 09:24:27 +00:00
70ccb8f4fd Fix Transmission connection testing and API compatibility
- Updated TransmissionClient to use correct method names from transmission-promise
- Changed sessionGet to session() and sessionSet to sessionUpdate()
- Added robust error handling in connection test
- Improved logging for connection debugging
- Fixed error handling in TransmissionClient constructor

🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
2025-03-07 09:19:27 +00:00
301684886f Fix Transmission remote connection issues
- Prevent remote host from defaulting to localhost
- Preserve remote connection settings during config updates
- Handle empty values correctly to avoid overriding good config

🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
2025-03-07 09:16:28 +00:00
f28d49284e Fix module import issues on fresh installations
- Ensure server.js uses consistent .js extensions for module imports
- Create compatibility symlinks for different module naming styles
- Update file-creator-module.sh to handle module paths correctly
- Bump version to 2.0.8

🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
2025-03-07 09:13:02 +00:00
54871518fc Fix module import issue on fresh installs
- Added create_directories function to properly set up directory structure
- Added copy_module_files function to ensure JS modules are copied correctly
- Updated server.js to handle module imports more resiliently
- Fixed imports to work with both .js and no extension module references

🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
2025-03-07 08:59:01 +00:00
72d230706a Fix log command not found error in main-installer
- Move utils-module.sh sourcing before any log function calls
- Remove duplicate sourcing line

🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
2025-03-07 08:44:00 +00:00
0bce35d899 Fix installation directory handling and clarify defaults
- Fixed bootstrap-installer to prompt for installation directory with /opt/trans-install as default
- Updated main-installer to detect and use existing installation path from service file
- Modified config-module to use installation directory from environment or default to /opt/trans-install
- Updated README with clear information about the default installation path
- Bumped version to 2.0.7

🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
2025-03-07 08:38:55 +00:00
484a021936 Fix version check in server.js template with error handling
Added robust error handling for dynamic version retrieval in the server.js template:
- Added try/catch block around package.json require
- Added fallback version if package.json can't be loaded
- Ensures server will start even if there's an issue loading the version

This prevents connection errors related to the version check functionality.

🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
2025-03-05 10:33:01 +00:00
16a7c0c0b6 Make version number dynamic in server.js template
Instead of hardcoding the version number in the server.js template,
this change reads the version dynamically from package.json.
This ensures that the dashboard always displays the correct version
number without requiring manual updates to the template file.

🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
2025-03-05 10:28:36 +00:00
e7076859b7 Fix version display for fresh installs
The server.js template in file-creator-module.sh had a hardcoded version of 1.2.0,
causing fresh installations to display the wrong version number on the dashboard.
Updated to display 2.0.6.

🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
2025-03-05 10:26:50 +00:00
4196914fbd Update version number to 2.0.6 across codebase
- Fix version inconsistencies in server.js API status endpoint
- Update User-Agent string in RSS feed manager
- Update version in config file templates
- Update dashboard display with version 2.0.6
- Add version 2.0.6 to version history with changelog

🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
2025-03-05 10:16:48 +00:00
36ac18c998 Update README with known issue about remote config
- Adjust changelog to be more accurate about remote configuration
- Add 'Known Issues' section to README.md
- Document issue with remote settings not being applied in update mode
- Provide workaround by suggesting manual configuration via web interface
2025-03-05 10:03:25 +00:00
626b24d35e Bump version to 2.0.6 and update changelog
- Update version in package.json to 2.0.6
- Add changelog entries for the latest fixes:
  - Remote configuration settings properly collected and applied
  - Remote host and credentials now correctly stored in config
  - Non-interactive mode support for scripted installations
  - Better handling of piped input for remote configuration
  - Added debug output to help troubleshoot configuration issues
2025-03-05 10:02:42 +00:00
a5afa1bb80 Improve environment variable handling in main installer
- Add logic to set input_remote based on TRANSMISSION_REMOTE from environment
- Add detailed debug logging for environment variables
- Ensure consistent behavior between direct mode and piped input
- Fix issue where environment variables weren't correctly propagating

This ensures that when remote mode is selected in install-script.sh, it's correctly respected in the main installer even when running in update mode.
2025-03-05 10:02:23 +00:00
40878c7d3a Fix non-interactive mode for remote Transmission configuration
- Save all piped input to a temporary file for sequential processing
- Read remote mode selection from first line of input
- Use remaining lines for remote Transmission configuration details
- Add proper handling of defaults for empty or missing values
- Improve debug output for configuration parameters

This allows users to pipe all configuration values to the installer in a single command, without requiring interactive prompt responses.
2025-03-05 10:01:27 +00:00
588ba1ea01 Collect Transmission remote details in install-script.sh
- Move Transmission remote details collection to install-script.sh
- Pass all remote details to main-installer.sh via environment file
- Avoid duplicate prompting for remote details
- Improve non-interactive mode with proper default values
- Add check in main-installer.sh to use provided remote details

This solves the problem where remote Transmission details were collected in install-script.sh but not properly used in the main installer when updating an existing installation.
2025-03-05 10:00:25 +00:00
a3924912f1 Improve handling of non-interactive and piped input
- Add detection for non-interactive terminal (piped input)
- Properly read input from pipe in install-script.sh
- Use pre-set environment variables when available
- Add better fallbacks for script usage
- Fix syntax error in main installer script
- More detailed logging of input handling process

This ensures the installer can be used both interactively and in scripts/automated setups.
2025-03-05 09:59:41 +00:00
4e4fd09811 Fix input handling for remote Transmission selection
- Add debug logging to track input values
- Replace regex matching with direct string comparison for better reliability
- Add explicit checks for 'y' and 'Y' input values
- This fixes an issue where remote mode wasn't correctly detected from user input
2025-03-05 09:58:50 +00:00
8af47ed35c Fix remote transmission configuration in update mode
This commit addresses an issue where the remote Transmission settings weren't properly applied when running in update mode:

1. Add prompt for remote Transmission details in update mode
2. Add code to modify the config.json file directly with the user's remote Transmission settings
3. Set default CONFIG_DIR and USER variables early in the script
4. Add detailed configuration dialog including:
   - Remote host and port
   - Username and password
   - RPC path
   - Directory mapping between remote and local paths

This ensures that users selecting remote Transmission mode will always be prompted for the connection details, even when updating an existing installation.
2025-03-05 09:57:30 +00:00
1c16243a2d Bump version to 2.0.5 and update changelog
- Update version number in package.json to 2.0.5
- Add changelog entry for version 2.0.5 with recent fixes:
  - Config file properly stored in /etc/transmission-rss-manager
  - Fixed remote Transmission detection in install-script.sh
  - Enhanced symlink handling between installation and config directories
  - Better environment variable passing between install scripts
2025-03-05 09:49:30 +00:00
306049abdd Fix config directory handling in install script
- Ensure CONFIG_DIR exists during installation
- Create proper symlink from INSTALL_DIR/config.json to CONFIG_DIR/config.json
- Use CONFIG_DIR instead of INSTALL_DIR for configuration files
- Add code to move existing config file to CONFIG_DIR if needed

This fixes the issue where the config.json file was not being created in /etc/transmission-rss-manager, even though the directory was created.
2025-03-05 09:47:29 +00:00
1d99962024 Remove debug code and fix duplicate lines 2025-03-05 09:40:10 +00:00