+ The file name format has changed. Click "Reorganize Files" to move existing files + to match the new format. +
++ Configure which browser SingleFile uses to create archives. + These settings only apply to native deployments (Raspberry Pi/Debian). +
+ ++ {fetchingReorgCount + ? 'Checking for domains that need reorganization...' + : <> + {domainsNeedingReorg} domain{domainsNeedingReorg !== 1 ? 's' : ''} + {domainsNeedingReorg > 0 + ? ' have files that do not match the current file name format.' + : '. All domains are organized correctly.'} + > + } +
+ ++ The file name format has changed. Click "Reorganize Files" to move existing files + to match the new format. +
+%(upload_year)s - Upload year (YYYY)
%(upload_month)s - Upload month (01-12)%(id)s - Video ID%(ext)s - File extension%(channel)s - Channel name%(duration)s - Duration in seconds%(playlist_index)s - Playlist index%(ext)s - File extension (required, must be at end)See yt-dlp docs for all variables. Subdirectories supported.
>} @@ -279,6 +291,25 @@ function VideoFileNameForm({form}) { function VideosSettingsPage() { useTitle('Videos Settings'); + const [batchModalOpen, setBatchModalOpen] = useState(false); + const [channelsNeedingReorg, setChannelsNeedingReorg] = useState(0); + const [fetchingReorgCount, setFetchingReorgCount] = useState(true); + + // Check how many channels need reorganization on mount + useEffect(() => { + setFetchingReorgCount(true); + previewBatchReorganization('channel') + .then(data => { + setChannelsNeedingReorg(data.total_collections || 0); + }) + .catch(() => { + setChannelsNeedingReorg(0); + }) + .finally(() => { + setFetchingReorgCount(false); + }); + }, []); + const emptyFormData = { video_resolutions: ['1080p', '720p', '480p', 'maximum'], yt_dlp_options: { @@ -337,10 +368,11 @@ function VideosSettingsPage() { popupContent='Always download videos with the selected browser profile. This is risky, and therefore discouraged.' />; - return+ {fetchingReorgCount + ? 'Checking for channels that need reorganization...' + : <> + {channelsNeedingReorg} channel{channelsNeedingReorg !== 1 ? 's' : ''} + {channelsNeedingReorg > 0 + ? ' have files that do not match the current file name format.' + : '. All channels are organized correctly.'} + > + } +
+ ++ {preview.total_collections} {kindLabelPlural.toLowerCase()} need reorganization, + with {preview.total_files_needing_move} total files to move. +
++ New format: +
++ ...and {preview.collections.length - 10} more {kindLabelPlural.toLowerCase()} +
+ )} +All {kindLabelPlural.toLowerCase()} are already organized according to the current format.
++ Overall Status: {status.status} +
+ Overall Progress: + ++ {status.completed_collections || 0} of {status.total_collections || 0} {kindLabelPlural.toLowerCase()} completed +
++ {currentCollection.completed || 0} of {currentCollection.total || 0} files +
+All {kindLabelPlural.toLowerCase()} have been reorganized successfully.
++ Failed on {kindLabel.toLowerCase()}: {status.failed_collection.name} +
+ {status.error &&Error: {status.error}
} +{error}
++ This collection's format matches the current configuration, but + {' '}{preview.files_needing_move} files don't match the expected layout. + This can happen if a previous reorganization was interrupted. +
++ {preview.files_needing_move} of {preview.total_files} files + will be reorganized. +
+ {preview.current_file_format && ( +
+ Current format: {preview.current_file_format}
+
+ New format: +
++ ...and {preview.files_needing_move - preview.sample_moves.length} more files +
+ )} +All files are already organized according to the current format.
++ Status: {status.status} +
+ ++ {status.completed || 0} of {status.total || 0} files processed +
+All files have been reorganized successfully.
+{error}
+