feat(search): WebDAV 文件夹内搜索
- 列表页右上角「全部播放」换成搜索(刷新保留) - 新页面 WebDAVSearchPage:输入关键字实时过滤当前文件夹的歌曲 - 匹配范围:文件名、元数据标题、艺术家(大小写不敏感) - 结果显示封面/标题/艺术家,点击从该首开始播放并返回列表 - 空状态分两种:未输入提示、无结果提示 真机验证:搜索 "forza" 命中 2 首,一条显示标签标题、一条显示文件名。
This commit is contained in:
@@ -10,6 +10,7 @@ import '../services/audio_service.dart';
|
||||
import '../services/metadata_events.dart';
|
||||
import '../widgets/song_artwork.dart';
|
||||
import '../widgets/add_to_playlist_sheet.dart';
|
||||
import 'webdav_search_page.dart';
|
||||
|
||||
class WebDAVFileListPage extends StatefulWidget {
|
||||
final String currentPath;
|
||||
@@ -278,9 +279,17 @@ class _WebDAVFileListPageState extends BaseState<WebDAVFileListPage> {
|
||||
),
|
||||
actions: [
|
||||
IconButton(
|
||||
icon: const Icon(Icons.playlist_play),
|
||||
onPressed: _playAll,
|
||||
tooltip: '全部播放',
|
||||
icon: const Icon(Icons.search),
|
||||
onPressed: () => Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (_) => WebDAVSearchPage(
|
||||
directoryPath: _currentPath,
|
||||
items: _items,
|
||||
),
|
||||
),
|
||||
),
|
||||
tooltip: '搜索本文件夹',
|
||||
),
|
||||
IconButton(
|
||||
icon: const Icon(Icons.refresh),
|
||||
|
||||
Reference in New Issue
Block a user