proper folder ui system

This commit is contained in:
Boof2015
2026-07-01 19:01:20 -04:00
parent 4d67e52f2e
commit 2016a0037d
9 changed files with 867 additions and 128 deletions
+2 -14
View File
@@ -10,22 +10,10 @@ import {
writeAsStringAsync,
} from 'expo-file-system/legacy';
import type { DbTrack } from '@/types/library';
import { decodedSafDocumentPath } from './folderTree';
import { parseM3u, serializeM3u, type M3uEntry, type M3uExportEntry } from '@/lib/m3u';
/** "content://…/document/primary%3AMusic%2FA%2Ff.flac" -> "Music/A/f.flac" */
export function decodedDocPath(contentUri: string): string | null {
const marker = '/document/';
const idx = contentUri.indexOf(marker);
if (idx < 0) return null;
let docId: string;
try {
docId = decodeURIComponent(contentUri.slice(idx + marker.length));
} catch {
return null;
}
const colon = docId.indexOf(':');
return colon >= 0 ? docId.slice(colon + 1) : docId;
}
export const decodedDocPath = decodedSafDocumentPath;
// --- Import matching ---------------------------------------------------------