mirror of
https://github.com/jayfunc/BetterLyrics.git
synced 2026-01-12 19:24:55 +08:00
32 lines
885 B
C#
32 lines
885 B
C#
using BetterLyrics.WinUI3.Helper;
|
|
using BetterLyrics.WinUI3.Services.LocalizationService;
|
|
using CommunityToolkit.Mvvm.DependencyInjection;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
|
|
namespace BetterLyrics.WinUI3.Models.Lyrics
|
|
{
|
|
public class LyricsData
|
|
{
|
|
public List<LyricsLine> LyricsLines { get; set; } = [];
|
|
public string? LanguageCode
|
|
{
|
|
get => field ?? LanguageHelper.DetectLanguageCode(WrappedOriginalText);
|
|
set => field = value;
|
|
}
|
|
public bool AutoGenerated { get; set; } = false;
|
|
public string WrappedOriginalText => string.Join(StringHelper.NewLine, LyricsLines.Select(line => line.PrimaryText));
|
|
|
|
public LyricsData()
|
|
{
|
|
}
|
|
|
|
public LyricsData(List<LyricsLine> lyricsLines)
|
|
{
|
|
LyricsLines = lyricsLines;
|
|
}
|
|
|
|
}
|
|
}
|