Skip to content

Commit 8cd1ba4

Browse files
authored
Merge pull request #58 from melodee-project/revert-57-copilot/import-m3u-playlists
Revert "Complete M3U/M3U8 playlist import: backend services, API, Blazor UI, tests, and documentation"
2 parents 73e704a + 7499c87 commit 8cd1ba4

133 files changed

Lines changed: 19 additions & 10717 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -515,7 +515,3 @@ compose.override.yml
515515
secrets.json
516516
*.secrets.json
517517
.aider*
518-
519-
# Exclude build artifacts with unusual path separators
520-
**/bin\\*
521-
**/obj\\*

docs/pages/playlists.md

Lines changed: 0 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -73,61 +73,6 @@ You can create playlists through:
7373

7474
- **Melodee UI**: Navigate to Playlists and click "Create New Playlist"
7575
- **Music Clients**: Most Subsonic-compatible clients support playlist creation
76-
- **M3U Import**: Upload existing M3U/M3U8 playlist files (see below)
77-
78-
### Importing M3U/M3U8 Playlists
79-
80-
Melodee can import your existing M3U or M3U8 playlist files, making it easy to migrate from other music players.
81-
82-
**Supported formats:**
83-
- `.m3u` - Standard M3U playlists
84-
- `.m3u8` - UTF-8 encoded M3U playlists
85-
86-
**How it works:**
87-
88-
1. **Upload your playlist file** via the Melodee API or UI
89-
2. **Automatic song matching** - Melodee tries to match each entry to songs in your library using:
90-
- Exact file path matching (highest priority)
91-
- Filename with artist/album folder hints
92-
- Song metadata matching (title + artist + album)
93-
3. **Instant playability** - Matched songs are immediately available in your new playlist
94-
4. **Background reconciliation** - Missing songs are tracked and automatically added as you add music to your library
95-
96-
**Import via API:**
97-
```bash
98-
curl -X POST https://your-melodee-server/api/v1/playlists/import \
99-
-H "Authorization: Bearer YOUR_TOKEN" \
100-
-F "file=@my-playlist.m3u8"
101-
```
102-
103-
**Response includes:**
104-
- Playlist ID and name
105-
- Total entries found
106-
- Successfully matched songs
107-
- Missing songs (tracked for future reconciliation)
108-
109-
**Example response:**
110-
```json
111-
{
112-
"playlistId": "abc123...",
113-
"playlistName": "My Favorite Mix",
114-
"totalEntries": 25,
115-
"matchedEntries": 20,
116-
"missingEntries": 5
117-
}
118-
```
119-
120-
**Background reconciliation:**
121-
122-
Missing playlist items are automatically resolved when:
123-
- New music is added to your library
124-
- The reconciliation job runs periodically (hourly by default)
125-
126-
The reconciliation process:
127-
- Re-attempts matching for missing items
128-
- Adds newly found songs to the playlist
129-
- Maintains the original sort order
130-
- Runs idempotently (no duplicates)
13176

13277
### Managing Playlists via Clients
13378

@@ -225,13 +170,6 @@ POST /api/v1/Songs/starred/{songId}/{isStarred}
225170
226171
# Set rating
227172
POST /api/v1/Songs/setrating/{songId}/{rating}
228-
229-
# Import M3U/M3U8 playlist
230-
POST /api/v1/playlists/import
231-
Content-Type: multipart/form-data
232-
Body: file=<M3U/M3U8 file>
233-
234-
# Response includes match statistics and playlist ID
235173
```
236174

237175
## Best Practices

src/Melodee.Blazor/Components/Pages/Data/M3UPlaylistImportDialog.razor

Lines changed: 0 additions & 231 deletions
This file was deleted.

src/Melodee.Blazor/Components/Pages/Data/Playlists.razor

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,6 @@
3232
AlignItems="AlignItems.Center"
3333
JustifyContent="JustifyContent.End"
3434
Gap="0.5rem">
35-
<RadzenButton Icon="playlist_add" Text="@L("Actions.ImportM3UPlaylist")"
36-
Click="@ImportM3UPlaylistButtonClick"
37-
Size="ButtonSize.Small"
38-
ButtonStyle="ButtonStyle.Success"/>
3935
<RadzenButton Icon="upload" Text="@L("Actions.ImportDynamicPlaylist")"
4036
Click="@ImportDynamicPlaylistButtonClick"
4137
Size="ButtonSize.Small"
@@ -217,19 +213,6 @@
217213
}
218214
}
219215

220-
private async Task ImportM3UPlaylistButtonClick()
221-
{
222-
var result = await DialogService.OpenAsync<M3UPlaylistImportDialog>(
223-
L("M3UImportDialog.Title"),
224-
null,
225-
new DialogOptions { Width = "700px", Height = "auto", Resizable = true, Draggable = true });
226-
227-
if (result is true)
228-
{
229-
await _grid.RefreshDataAsync();
230-
}
231-
}
232-
233216
private async Task DeleteSelectedButtonClick()
234217
{
235218
var confirm = await DialogService.Confirm(L("Messages.ConfirmDelete"), L("Data.ConfirmDelete"), new ConfirmOptions { OkButtonText = L("Actions.Yes"), CancelButtonText = L("Actions.No") });

src/Melodee.Blazor/Controllers/Melodee/Models/PlaylistImportResponse.cs

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)