mirror of
https://github.com/johrpan/musicus_mobile.git
synced 2025-10-26 18:57:25 +01:00
Tracks editor: Use relative paths
They are based on the current music library path.
This commit is contained in:
parent
090c4501b1
commit
febcf29cf1
1 changed files with 5 additions and 1 deletions
|
|
@ -1,4 +1,5 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:path/path.dart' as p;
|
||||
|
||||
import '../backend.dart';
|
||||
import '../database.dart';
|
||||
|
|
@ -66,7 +67,10 @@ class _TracksEditorState extends State<TracksEditor> {
|
|||
if (paths != null) {
|
||||
setState(() {
|
||||
for (final path in paths) {
|
||||
tracks.add(TrackModel(path));
|
||||
tracks.add(TrackModel(p.relative(
|
||||
path,
|
||||
from: backend.musicLibraryPath,
|
||||
)));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue