chores: code cleanup

This commit is contained in:
Zhe Fang
2025-11-20 17:35:36 -05:00
parent 8f6e106282
commit a3366422a2
3 changed files with 1 additions and 8 deletions

View File

@@ -5,7 +5,6 @@ using Microsoft.UI.Xaml.Media.Imaging;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace BetterLyrics.WinUI3.Converter
{

View File

@@ -33,15 +33,9 @@ namespace BetterLyrics.WinUI3.Parsers.LyricsParser
.Where(s => s.Name.LocalName == "span")
.ToList();
var romanTextSpans = spans
.Where(s => s.Attribute(XName.Get("role", "http://www.w3.org/ns/ttml#metadata"))?.Value == "x-roman")
.ToList();
var originalTextSpans = spans
.Where(s => s.Attribute(XName.Get("role", "http://www.w3.org/ns/ttml#metadata"))?.Value == null)
.ToList();
var translationTextSpans = spans
.Where(s => s.Attribute(XName.Get("role", "http://www.w3.org/ns/ttml#metadata"))?.Value == "x-translation")
.ToList();
// 处理原文span后的空白
for (int i = 0; i < originalTextSpans.Count; i++)

View File

@@ -441,7 +441,7 @@ namespace BetterLyrics.WinUI3.ViewModels
else
{
var track = playQueueItem.Track;
var updater = _smtc.DisplayUpdater;
updater.ClearAll();