refactor(services): remove unused folder and taste helpers

libraryFolderTracks and trainAutoplayTasteDartInBackground had no
caller in lib or test. The doc comment of audioCompareMeasureWindows
said the engine used it on excerpts, but the engine measures windows
with FFmpeg; only tests call it, as the reference for that pass.
This commit is contained in:
zarzet committed 2026-11-16 16:03:33 +07:00
1 parent d5ac6ecf74
commit 6431236615
3 files changed
+1 -22

No files matched your search

+1 -1
View File
@@ -763,7 +763,7 @@ class _HighPass {
/// Measures the residual windows directly from decoded samples, as the
/// FFmpeg pass does for whole songs: `reference - gain * other`, with the
/// other file shifted by [offsetFrames] and silent outside its length.
/// Used on excerpts and as the reference implementation in tests.
/// Only tests call it, as the reference the FFmpeg pass is checked against.
List<AudioCompareWindow> audioCompareMeasureWindows({
required Float32List reference,
required Float32List other,
-9
View File
@@ -276,15 +276,6 @@ Future<AutoplayTasteModel> trainAutoplayTasteInBackground(
List<AutoplayTastePlay> plays,
) async => (await _trainNativePackedTaste(plays)).model;
@visibleForTesting
Future<AutoplayTasteModel> trainAutoplayTasteDartInBackground(
List<AutoplayTastePlay> plays,
) async => (await compute(
_trainPackedTaste,
plays,
debugLabel: 'autoplay-taste',
)).model;
class _Position {
_Position(this.song, this.artist, this.weight);
final String song, artist;
-12
View File
@@ -249,18 +249,6 @@ List<LibraryFolder> _groupFolders(
({List<LibraryFilePathRow> rows, Map<String, String> sourceNames}) request,
) => groupLibraryFolderTree(request.rows, sourceNames: request.sourceNames);
/// The tracks of [folder] in [sortFolderItems] order.
Future<List<Track>> libraryFolderTracks(
LibraryFolder folder,
LibraryDatabase library,
) async {
final rows = await library.getByIds(folder.ids);
final items = sortFolderItems([
for (final row in rows) LocalLibraryItem.fromJson(row),
]);
return [for (final item in items) _localTrack(item)];
}
/// Every Library track inside [root] and all of its subfolders, however
/// deep. Only files already in the Library are found.
Future<LibraryFolder> libraryFolderTree(