Add playlist import/export functionality for JSON and M3U8#28
Open
Add playlist import/export functionality for JSON and M3U8#28
Conversation
- Add PlaylistJSON Codable struct for portable JSON representation - Add toJSON/importFromJSON methods on Playlist for JSON round-tripping - Add toM3U8/fromM3U8 methods with relative-paths-only support - Add export menu (JSON/M3U8) to PlaylistDetailView toolbar - Add import button to PlaylistsView supporting .json/.m3u8/.m3u files - Add ShareSheet UIKit wrapper for export sharing - Add localized strings for export/import UI in all supported languages https://claude.ai/code/session_014fUoyswmhgqTqc4bjYWAkv
- Remove SwiftData dependency entirely (no @model, @query, modelContainer) - Playlists are now Codable structs stored as .melodee JSON files in folders - Use relative file paths instead of URL bookmarks for portability - Add PlaylistManager with static methods for load/save/create - Add .playlist file type to FileType enum and FilesystemManager - Add "+" toolbar button in FolderView to create playlists (Apple Music-style sheet) - CreatePlaylistSheet with album art, name field, and selectable song list - Remove Playlists tab from MainTabView (playlists now live in folders) - Remove PlaylistsView and PlaylistRow (replaced by folder-based browsing) - PlaylistDetailView now loads from .melodee file with relative path resolution - Add FBPlaylistFileRow for playlist file navigation in folder browser - Keep M3U8/JSON export in PlaylistDetailView toolbar - Add localized strings for SelectAll, Songs in all supported languages https://claude.ai/code/session_014fUoyswmhgqTqc4bjYWAkv
- '+' button always enabled in FolderView toolbar (no longer requires audio in current folder) - CreatePlaylistSheet now enumerates all audio files recursively from the scope root (On My Device, iCloud Drive, or external folder) - File selection shows relative path from scope root for disambiguation - PlaylistManager.create computes proper relative paths from playlist save location to each selected file (supports files in subdirectories via ../ paths) - Add "No Audio Files" empty state in CreatePlaylistSheet - Add localized strings for NoAudioFiles.Title and NoAudioFiles.Description https://claude.ai/code/session_014fUoyswmhgqTqc4bjYWAkv
- Remove Japanese メロディー translations from CFBundleDisplayName and CFBundleName in InfoPlist.xcstrings - Replace dynamic CFBundleDisplayName lookups with hardcoded "Melodee" in FSFile.swift and MediaPlayerManager.swift - Replace メロディー with Melodee in Japanese help text strings https://claude.ai/code/session_014fUoyswmhgqTqc4bjYWAkv
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
This PR adds comprehensive import and export functionality for playlists, supporting both JSON and M3U8 formats. Users can now export playlists to portable formats and import them back, with full localization support across 6 languages.
Key Changes
toJSON(),importFromJSON(),toM3U8(), andfromM3U8()methods to thePlaylistmodel to handle serialization and deserialization of playlists in both formatsPlaylistJSONcodable struct to represent playlists in a portable JSON format with file metadata and ordering informationShareSheetview controller wrapper to enable native iOS sharing functionalityPlaylists.Export,Playlists.Export.JSON,Playlists.Export.M3U8,Playlists.Import,Playlists.Import.Error) with translations in English, Japanese, Korean, Vietnamese, Simplified Chinese, and Traditional ChineseNotable Implementation Details
#PLAYLIST:metadata and uses relative paths for portabilityhttps://claude.ai/code/session_014fUoyswmhgqTqc4bjYWAkv