mirror of
https://github.com/MasterAcnolo/Freedom-Loader.git
synced 2026-07-29 18:25:47 +02:00
Feat: Implement playlist download count tracking during downloads with UI updates
This commit is contained in:
@@ -74,7 +74,7 @@ function createPlaylistFolder(basePath, playlistTitle) {
|
||||
}
|
||||
}
|
||||
|
||||
function fetchDownload(options, listeners, speedListeners, stageListeners) {
|
||||
function fetchDownload(options, listeners, speedListeners, stageListeners, playlistInfoListeners) {
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
logger.info(`CONFIG createPlaylistFolders: ${configFeatures.createPlaylistFolders}`);
|
||||
@@ -152,6 +152,13 @@ function fetchDownload(options, listeners, speedListeners, stageListeners) {
|
||||
}
|
||||
}
|
||||
|
||||
// Playlist item tracking
|
||||
const itemMatch = line.match(/Downloading\s+(?:item|video)?\s*(\d+)\s+of\s+(\d+)/i);
|
||||
if (itemMatch) {
|
||||
const itemInfo = `Item ${itemMatch[1]} of ${itemMatch[2]}`;
|
||||
playlistInfoListeners.forEach(fn => fn(itemInfo));
|
||||
}
|
||||
|
||||
// Stage messages
|
||||
if (line.includes("[Merger]")) {
|
||||
stageListeners.forEach(fn => fn("Merging formats..."));
|
||||
|
||||
Reference in New Issue
Block a user