mirror of
https://github.com/zarzet/SpotiFLAC-Mobile.git
synced 2026-11-21 20:00:49 +01:00
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:
1 parent
d5ac6ecf74
commit
6431236615
3 files changed
+1
-22
No files matched your search
@@ -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,
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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(
|
||||
|
||||
Reference in new issue
Block a user