aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDavid <daullmer@gmail.com>2021-01-23 18:06:26 +0100
committerDavid <daullmer@gmail.com>2021-01-23 18:06:26 +0100
commit454d82c52ca884649cf62e5a583a601225a844ec (patch)
treecce0050ca754e63e11075a4fa04916135408296c /tests
parent828b0be2543d065c80dceb008a41a7a1f25c8cef (diff)
Process actor type in nfo files
Diffstat (limited to 'tests')
-rw-r--r--tests/Jellyfin.XbmcMetadata.Tests/Parsers/MovieNfoParserTests.cs6
-rw-r--r--tests/Jellyfin.XbmcMetadata.Tests/Test Data/Justice League.nfo5
2 files changed, 10 insertions, 1 deletions
diff --git a/tests/Jellyfin.XbmcMetadata.Tests/Parsers/MovieNfoParserTests.cs b/tests/Jellyfin.XbmcMetadata.Tests/Parsers/MovieNfoParserTests.cs
index e1f50876f..765464ece 100644
--- a/tests/Jellyfin.XbmcMetadata.Tests/Parsers/MovieNfoParserTests.cs
+++ b/tests/Jellyfin.XbmcMetadata.Tests/Parsers/MovieNfoParserTests.cs
@@ -60,7 +60,7 @@ namespace Jellyfin.XbmcMetadata.Tests.Parsers
Assert.Equal(new TimeSpan(0, 0, 6268).Ticks, item.RunTimeTicks);
Assert.True(item.HasSubtitles);
- Assert.Equal(18, result.People.Count);
+ Assert.Equal(19, result.People.Count);
var writers = result.People.Where(x => x.Type == PersonType.Writer).ToArray();
Assert.Equal(2, writers.Length);
@@ -82,6 +82,10 @@ namespace Jellyfin.XbmcMetadata.Tests.Parsers
Assert.Equal(5, aquaman!.SortOrder);
Assert.Equal("https://m.media-amazon.com/images/M/MV5BMTI5MTU5NjM1MV5BMl5BanBnXkFtZTcwODc4MDk0Mw@@._V1_SX1024_SY1024_.jpg", aquaman!.ImageUrl);
+ var lyricist = result.People.FirstOrDefault(x => x.Type == PersonType.Lyricist);
+ Assert.NotNull(lyricist);
+ Assert.Equal("Test Lyricist", lyricist!.Name);
+
Assert.Equal(new DateTime(2019, 8, 6, 9, 1, 18), item.DateCreated);
}
diff --git a/tests/Jellyfin.XbmcMetadata.Tests/Test Data/Justice League.nfo b/tests/Jellyfin.XbmcMetadata.Tests/Test Data/Justice League.nfo
index f838af8d0..6e6da25d3 100644
--- a/tests/Jellyfin.XbmcMetadata.Tests/Test Data/Justice League.nfo
+++ b/tests/Jellyfin.XbmcMetadata.Tests/Test Data/Justice League.nfo
@@ -221,6 +221,11 @@
<order>14</order>
<thumb>https://m.media-amazon.com/images/M/MV5BOTFjOTFhNTgtZjk3Ny00MTNjLWE3MWUtMWI3ZWM5NDljZjQwXkEyXkFqcGdeQXVyMjQwMDg0Ng@@._V1_SX1024_SY1024_.jpg</thumb>
</actor>
+ <actor>
+ <name>Test Lyricist</name>
+ <type>Lyricist</type>
+ <order>15</order>
+ </actor>
<resume>
<position>0.000000</position>
<total>0.000000</total>