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>
This commit is contained in:
parent
54871518fc
commit
f28d49284e
@ -1,9 +1,15 @@
|
|||||||
# Transmission RSS Manager v2.0.7
|
# Transmission RSS Manager v2.0.8
|
||||||
|
|
||||||
A comprehensive web-based tool to automate and manage your Transmission torrent downloads with RSS feed integration, intelligent media organization, and enhanced security features. Now with automatic updates and easy installation!
|
A comprehensive web-based tool to automate and manage your Transmission torrent downloads with RSS feed integration, intelligent media organization, and enhanced security features. Now with automatic updates and easy installation!
|
||||||
|
|
||||||
## Changelog
|
## Changelog
|
||||||
|
|
||||||
|
### v2.0.8 (2025-03-07)
|
||||||
|
- **Fixed**: Module import issues on fresh installations with proper file extension handling
|
||||||
|
- **Fixed**: Adding compatibility symlinks for different module naming styles
|
||||||
|
- **Improved**: Server.js now uses consistent module import paths with .js extensions
|
||||||
|
- **Improved**: More robust module file handling in the installer
|
||||||
|
|
||||||
### v2.0.7 (2025-03-07)
|
### v2.0.7 (2025-03-07)
|
||||||
- **Fixed**: Installation directory handling with prompt for choosing install path
|
- **Fixed**: Installation directory handling with prompt for choosing install path
|
||||||
- **Fixed**: Bootstrap-installer now defaults to /opt/trans-install with user configuration option
|
- **Fixed**: Bootstrap-installer now defaults to /opt/trans-install with user configuration option
|
||||||
|
@ -136,8 +136,9 @@ const cors = require('cors');
|
|||||||
const Transmission = require('transmission');
|
const Transmission = require('transmission');
|
||||||
|
|
||||||
// Import custom modules
|
// Import custom modules
|
||||||
const PostProcessor = require('./modules/postProcessor');
|
const PostProcessor = require('./modules/post-processor.js');
|
||||||
const RssFeedManager = require('./modules/rssFeedManager');
|
const RssFeedManager = require('./modules/rss-feed-manager.js');
|
||||||
|
const TransmissionClient = require('./modules/transmission-client.js');
|
||||||
|
|
||||||
// Initialize Express app
|
// Initialize Express app
|
||||||
const app = express();
|
const app = express();
|
||||||
@ -1823,6 +1824,20 @@ function copy_module_files() {
|
|||||||
echo "Copying module: $module_name"
|
echo "Copying module: $module_name"
|
||||||
cp "$js_file" "$INSTALL_DIR/modules/$module_name"
|
cp "$js_file" "$INSTALL_DIR/modules/$module_name"
|
||||||
|
|
||||||
|
# Create symlinks for alternative module names that might be referenced
|
||||||
|
base_name=$(basename "$module_name" .js)
|
||||||
|
case "$base_name" in
|
||||||
|
"rss-feed-manager")
|
||||||
|
ln -sf "$INSTALL_DIR/modules/$module_name" "$INSTALL_DIR/modules/rssFeedManager.js"
|
||||||
|
;;
|
||||||
|
"post-processor")
|
||||||
|
ln -sf "$INSTALL_DIR/modules/$module_name" "$INSTALL_DIR/modules/postProcessor.js"
|
||||||
|
;;
|
||||||
|
"transmission-client")
|
||||||
|
ln -sf "$INSTALL_DIR/modules/$module_name" "$INSTALL_DIR/modules/transmissionClient.js"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
# Set permissions
|
# Set permissions
|
||||||
chown "$USER:$USER" "$INSTALL_DIR/modules/$module_name"
|
chown "$USER:$USER" "$INSTALL_DIR/modules/$module_name"
|
||||||
chmod 644 "$INSTALL_DIR/modules/$module_name"
|
chmod 644 "$INSTALL_DIR/modules/$module_name"
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "transmission-rss-manager",
|
"name": "transmission-rss-manager",
|
||||||
"version": "2.0.7",
|
"version": "2.0.8",
|
||||||
"description": "A comprehensive web-based tool to automate and manage your Transmission torrent downloads with RSS feed integration and intelligent media organization",
|
"description": "A comprehensive web-based tool to automate and manage your Transmission torrent downloads with RSS feed integration and intelligent media organization",
|
||||||
"main": "server.js",
|
"main": "server.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
19
server.js
19
server.js
@ -18,37 +18,26 @@ const bcrypt = require('bcrypt');
|
|||||||
// Try to import with .js extension first, then fallback to no extension for better compatibility
|
// Try to import with .js extension first, then fallback to no extension for better compatibility
|
||||||
let RssFeedManager, TransmissionClient, PostProcessor;
|
let RssFeedManager, TransmissionClient, PostProcessor;
|
||||||
|
|
||||||
|
// Always use explicit .js extension when importing our own modules
|
||||||
try {
|
try {
|
||||||
RssFeedManager = require('./modules/rss-feed-manager.js');
|
RssFeedManager = require('./modules/rss-feed-manager.js');
|
||||||
} catch (e) {
|
} catch (err) {
|
||||||
try {
|
|
||||||
RssFeedManager = require('./modules/rss-feed-manager');
|
|
||||||
} catch (err) {
|
|
||||||
console.error('Failed to load RssFeedManager module:', err);
|
console.error('Failed to load RssFeedManager module:', err);
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
TransmissionClient = require('./modules/transmission-client.js');
|
TransmissionClient = require('./modules/transmission-client.js');
|
||||||
} catch (e) {
|
} catch (err) {
|
||||||
try {
|
|
||||||
TransmissionClient = require('./modules/transmission-client');
|
|
||||||
} catch (err) {
|
|
||||||
console.error('Failed to load TransmissionClient module:', err);
|
console.error('Failed to load TransmissionClient module:', err);
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
PostProcessor = require('./modules/post-processor.js');
|
PostProcessor = require('./modules/post-processor.js');
|
||||||
} catch (e) {
|
} catch (err) {
|
||||||
try {
|
|
||||||
PostProcessor = require('./modules/post-processor');
|
|
||||||
} catch (err) {
|
|
||||||
console.error('Failed to load PostProcessor module:', err);
|
console.error('Failed to load PostProcessor module:', err);
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Constants and configuration
|
// Constants and configuration
|
||||||
|
Loading…
x
Reference in New Issue
Block a user