fix lrc file supporting bug

This commit is contained in:
Zhe Fang
2025-06-04 23:04:12 -04:00
parent a3b250dd46
commit b2319e7983
6 changed files with 10 additions and 7 deletions

View File

@@ -48,7 +48,7 @@
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
</Content>
<Content Update="Assets\TestMusic.mp3">
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>

View File

@@ -33,8 +33,8 @@ namespace BetterLyrics.WinUI3.Helper {
// Base Folders
private static string LocalFolder => ApplicationData.Current.LocalFolder.Path;
private static string CacheFolder => ApplicationData.Current.LocalCacheFolder.Path;
public static string AssetsFolder => Path.Combine(AppContext.BaseDirectory, "Assets");
public static string CacheFolder => ApplicationData.Current.LocalCacheFolder.Path;
public static string AssetsFolder => Path.Combine(Package.Current.InstalledPath, "Assets");
// Data Files
private static string DatabaseFileName => "database.db";

View File

@@ -35,8 +35,8 @@ namespace BetterLyrics.WinUI3.Services.Database {
var track = new Track(file);
_connection.Insert(new MetadataIndex {
Path = file,
Title = track.Title,
Artist = track.Artist,
Title = track.Title == "" ? file : track.Title,
Artist = track.Artist == "" ? file : track.Artist,
});
}
}
@@ -46,7 +46,7 @@ namespace BetterLyrics.WinUI3.Services.Database {
public Track? GetMusicMetadata(string? title, string? artist) {
var founds = _connection.Table<MetadataIndex>()
.Where(m => m.Title == title && m.Artist == artist).ToList();
.Where(m => m.Title.Contains(title) && m.Artist.Contains(artist)).ToList();
if (founds == null || founds.Count == 0) {
return null;
} else {

View File

@@ -5,6 +5,7 @@ using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
using System;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using Windows.ApplicationModel.Core;

View File

@@ -35,10 +35,12 @@ We provide more than one setting item to better align with your preference
- Language (English, Simplified Chinese, Traditional Chinese)
## Demonstration video
## Live demonstration
![alt text](Screenshots/Beelink-SER-8-Moonlight2025-06-0318-35-35-ezgif.com-video-to-gif-converter.gif)
![alt text](Screenshots/BetterLyrics.WinUI3_igDdnc4rzW.gif)
Or watch our introduction video「BetterLyrics 阶段性开发成果展示」(uploaded on 31 May 2025) on Bilibili below (click the cover image to watch):
[![Bilibili](https://i1.hdslb.com/bfs/archive/75a7a1a3803b617574090a91c59785b6c40d0fe5.jpg@672w_378h_1c.avif)](https://b23.tv/QjKkYmL)

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 MiB