Import playlists recursively #90

Merged
Ciluvien merged 3 commits from import_recursive into main 2025-04-18 18:04:42 +03:00
Ciluvien commented 2025-04-17 21:31:58 +03:00 (Migrated from github.com)

Summary
This pull request enhances the import functionality to include m3u playlist files from subdirectories.

Current Behavior
When selecting a directory, only the m3u files in that directory are available for import. For example, in the following directory structure:

parentDir
│
├── playlist1.m3u
│
└── subDir
    │
    └── playlist2.m3u

Only playlist1.m3u would appear when selecting parentDir.

Proposed Changes

This pull request addresses this limitation by recursively calling listSafFiles for all subdirectories.
To avoid interfering with the existing sync feature, I created two new functions. The original function remains unchanged for sync operations. A new function, listSafFilesRecursive, is introduced for importing m3u files from both the selected directory and its subdirectories.

**Summary** This pull request enhances the import functionality to include m3u playlist files from subdirectories. **Current Behavior** When selecting a directory, only the m3u files in that directory are available for import. For example, in the following directory structure: ``` parentDir │ ├── playlist1.m3u │ └── subDir │ └── playlist2.m3u ``` Only playlist1.m3u would appear when selecting parentDir. **Proposed Changes** This pull request addresses this limitation by recursively calling listSafFiles for all subdirectories. To avoid interfering with the existing sync feature, I created two new functions. The original function remains unchanged for sync operations. A new function, listSafFilesRecursive, is introduced for importing m3u files from both the selected directory and its subdirectories.
TJYSunset commented 2025-04-18 17:04:37 +03:00 (Migrated from github.com)

Do you think it's better to import subdir/playlist.m3u as a playlist named playlist or subdir/playlist?

Do you think it's better to import `subdir/playlist.m3u` as a playlist named `playlist` or `subdir/playlist`?
Ciluvien commented 2025-04-18 17:09:14 +03:00 (Migrated from github.com)

I would generally prefer playlist. The only case in which I would choose subdir/playlist would be when there are multiple playlists with the same filename.

I would generally prefer ```playlist```. The only case in which I would choose ```subdir/playlist``` would be when there are multiple playlists with the same filename.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
novvux/Blissid!90
No description provided.