LyricSearchResultItem.cs 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. using System;
  2. using System.Collections.Generic;
  3. using BeatLyrics.Common.Models;
  4. using BeatLyrics.Tool.Models;
  5. using BeatLyrics.Tool.Utils;
  6. namespace BeatLyrics.Tool.DataProvider.OnlineLyric.Models
  7. {
  8. public class LyricSearchResultItem
  9. {
  10. public LyricSearchResultItem(string providerName)
  11. {
  12. ProviderName = providerName;
  13. }
  14. public string ProviderName { get; }
  15. public string Id { get; set; }
  16. public string Name { get; set; }
  17. public int Duration { get; set; }
  18. public string DurationText
  19. {
  20. get
  21. {
  22. var timeSpan = TimeSpan.FromMilliseconds(Duration);
  23. return timeSpan.FormatToTotalMinuteAndSeconds();
  24. }
  25. }
  26. public string Remarks { get; set; }
  27. public string Artists { get; set; }
  28. public bool IsDetailsLoaded { get; set; }
  29. public List<LyricDetailExt> Details { get; set; }
  30. public List<LyricDetailExt> DetailsTranslated { get; set; }
  31. public string DetailsText { get; set; }
  32. public string DetailsTranslatedText { get; set; }
  33. public override string ToString()
  34. {
  35. return $"{Name} - {Artists} [{DurationText}] #{Id} {Remarks}";
  36. }
  37. }
  38. }