Add Music Videos directory setting for Plex music video support
New configurable path for storing music videos separately from audio files, following Plex's global music video folder convention. - Settings: library.music_videos_path (default: ./MusicVideos) - UI: Music Videos Dir field on Settings Downloads tab with lock/unlock - Docker: /app/MusicVideos volume mount in Dockerfile and docker-compose - Added 'library' to settings save whitelist (was missing — music_paths also wasn't persisting through main settings save) - No download functionality yet — path infrastructure only
This commit is contained in:
parent
5be6a46fb0
commit
1f0ef08b48
6 changed files with 19 additions and 6 deletions
|
|
@ -35,7 +35,7 @@ COPY . .
|
|||
|
||||
# Create necessary directories with proper permissions
|
||||
# NOTE: /app/data is for database FILES, /app/database is the Python package
|
||||
RUN mkdir -p /app/config /app/data /app/logs /app/downloads /app/Transfer /app/scripts && \
|
||||
RUN mkdir -p /app/config /app/data /app/logs /app/downloads /app/Transfer /app/MusicVideos /app/scripts && \
|
||||
chown -R soulsync:soulsync /app
|
||||
|
||||
# Create defaults directory and copy template files
|
||||
|
|
@ -47,7 +47,7 @@ RUN mkdir -p /defaults && \
|
|||
|
||||
# Create volume mount points
|
||||
# NOTE: Changed /app/database to /app/data to avoid overwriting Python package
|
||||
VOLUME ["/app/config", "/app/data", "/app/logs", "/app/downloads", "/app/Transfer", "/app/scripts"]
|
||||
VOLUME ["/app/config", "/app/data", "/app/logs", "/app/downloads", "/app/Transfer", "/app/MusicVideos", "/app/scripts"]
|
||||
|
||||
# Copy and set up entrypoint script
|
||||
COPY entrypoint.sh /entrypoint.sh
|
||||
|
|
|
|||
|
|
@ -461,7 +461,8 @@ class ConfigManager:
|
|||
"poll_interval": 30
|
||||
},
|
||||
"library": {
|
||||
"music_paths": []
|
||||
"music_paths": [],
|
||||
"music_videos_path": "./MusicVideos"
|
||||
},
|
||||
"scripts": {
|
||||
"path": "./scripts",
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@ services:
|
|||
- ./logs:/app/logs
|
||||
- ./downloads:/app/downloads
|
||||
- ./Staging:/app/Staging
|
||||
- ./MusicVideos:/app/MusicVideos
|
||||
- ./scripts:/app/scripts
|
||||
# Use named volume for database persistence (separate from host database)
|
||||
# NOTE: Changed from /app/database to /app/data to avoid overwriting Python package
|
||||
|
|
|
|||
|
|
@ -5184,7 +5184,7 @@ def handle_settings():
|
|||
if 'active_media_server' in new_settings:
|
||||
config_manager.set_active_media_server(new_settings['active_media_server'])
|
||||
|
||||
for service in ['spotify', 'plex', 'jellyfin', 'navidrome', 'soulseek', 'download_source', 'settings', 'database', 'metadata_enhancement', 'file_organization', 'playlist_sync', 'tidal', 'tidal_download', 'qobuz', 'hifi_download', 'deezer_download', 'listenbrainz', 'acoustid', 'lastfm', 'genius', 'import', 'lossy_copy', 'listening_stats', 'ui_appearance', 'youtube', 'content_filter', 'itunes', 'm3u_export', 'musicbrainz', 'deezer', 'audiodb', 'metadata', 'hydrabase', 'security', 'discogs']:
|
||||
for service in ['spotify', 'plex', 'jellyfin', 'navidrome', 'soulseek', 'download_source', 'settings', 'database', 'metadata_enhancement', 'file_organization', 'playlist_sync', 'tidal', 'tidal_download', 'qobuz', 'hifi_download', 'deezer_download', 'listenbrainz', 'acoustid', 'lastfm', 'genius', 'import', 'lossy_copy', 'listening_stats', 'ui_appearance', 'youtube', 'content_filter', 'itunes', 'm3u_export', 'musicbrainz', 'deezer', 'audiodb', 'metadata', 'hydrabase', 'security', 'discogs', 'library']:
|
||||
if service in new_settings:
|
||||
for key, value in new_settings[service].items():
|
||||
config_manager.set(f'{service}.{key}', value)
|
||||
|
|
|
|||
|
|
@ -4595,6 +4595,14 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Music Videos Dir:</label>
|
||||
<div class="path-input-group">
|
||||
<input type="text" id="music-videos-path" placeholder="./MusicVideos" readonly>
|
||||
<button class="browse-button locked" onclick="togglePathLock('music-videos', this)">Unlock</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Download Source:</label>
|
||||
<select id="download-source-mode" class="form-select"
|
||||
|
|
|
|||
|
|
@ -5899,6 +5899,7 @@ async function loadSettingsData() {
|
|||
document.getElementById('download-path').value = settings.soulseek?.download_path || './downloads';
|
||||
document.getElementById('transfer-path').value = settings.soulseek?.transfer_path || './Transfer';
|
||||
document.getElementById('staging-path').value = settings.import?.staging_path || './Staging';
|
||||
document.getElementById('music-videos-path').value = settings.library?.music_videos_path || './MusicVideos';
|
||||
|
||||
// Populate Download Source settings
|
||||
document.getElementById('download-source-mode').value = settings.download_source?.mode || 'soulseek';
|
||||
|
|
@ -7153,7 +7154,8 @@ async function saveSettings(quiet = false) {
|
|||
allow_explicit: document.getElementById('allow-explicit').checked
|
||||
},
|
||||
library: {
|
||||
music_paths: collectMusicPaths()
|
||||
music_paths: collectMusicPaths(),
|
||||
music_videos_path: document.getElementById('music-videos-path').value || './MusicVideos'
|
||||
},
|
||||
import: {
|
||||
replace_lower_quality: document.getElementById('import-replace-lower-quality').checked
|
||||
|
|
@ -8204,7 +8206,8 @@ async function logoutQobuz() {
|
|||
const PATH_INPUT_IDS = {
|
||||
download: 'download-path',
|
||||
transfer: 'transfer-path',
|
||||
staging: 'staging-path'
|
||||
staging: 'staging-path',
|
||||
'music-videos': 'music-videos-path'
|
||||
};
|
||||
|
||||
function togglePathLock(pathType, btn) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue