Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New release #1333

Merged
merged 225 commits into from
Aug 20, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
225 commits
Select commit Hold shift + click to select a range
87a23e2
New translations base.json (German)
mregni Aug 8, 2020
dcd0a66
New translations base.json (German)
mregni Aug 8, 2020
bfc87f4
New translations base.json (German)
mregni Aug 8, 2020
da9e688
New translations base.json (German)
mregni Aug 8, 2020
f9bf953
New translations base.json (German)
mregni Aug 8, 2020
33a1de8
New translations base.json (English)
mregni Aug 8, 2020
ba89558
New translations base.json (German)
mregni Aug 8, 2020
9f15228
New translations base.json (German)
mregni Aug 8, 2020
3eb596a
New translations base.json (German)
mregni Aug 8, 2020
7d462af
New translations base.json (German)
mregni Aug 8, 2020
12e5095
New translations base.json (English)
mregni Aug 8, 2020
cff8ab9
Merge pull request #1292 from mregni/l10n_develop
mregni Aug 8, 2020
c3c724b
Updating translation keys #1293
mregni Aug 8, 2020
d5d81be
New translations base.json (English)
mregni Aug 8, 2020
72ec166
New translations base.json (English)
mregni Aug 8, 2020
b32ac52
New translations base.json (German)
mregni Aug 8, 2020
1f27b36
New translations base.json (English)
mregni Aug 8, 2020
ef13870
Added filters to translation file #1293
mregni Aug 9, 2020
2b8862c
Added filter tests and debug logging on http calls
mregni Aug 9, 2020
41e759c
Merge pull request #1297 from mregni/l10n_develop
mregni Aug 9, 2020
b28e7cf
Fixing unit tests
mregni Aug 9, 2020
bb7bbf4
Merge branch 'develop' into features/1293
mregni Aug 9, 2020
f71a84a
Merge pull request #1299 from mregni/features/1293
mregni Aug 9, 2020
2069003
New translations base.json (Romanian)
mregni Aug 9, 2020
5beac38
New translations base.json (Dutch)
mregni Aug 9, 2020
7b0a1b8
New translations base.json (English)
mregni Aug 9, 2020
ca4c38d
New translations base.json (Chinese Simplified)
mregni Aug 9, 2020
69aa6eb
New translations base.json (Swedish)
mregni Aug 9, 2020
386d629
New translations base.json (Portuguese)
mregni Aug 9, 2020
a958fd4
New translations base.json (Polish)
mregni Aug 9, 2020
0dbd81b
New translations base.json (Norwegian)
mregni Aug 9, 2020
a8ae817
New translations base.json (Italian)
mregni Aug 9, 2020
60f27f9
New translations base.json (French)
mregni Aug 9, 2020
7b7b856
New translations base.json (Hungarian)
mregni Aug 9, 2020
14fb624
New translations base.json (Finnish)
mregni Aug 9, 2020
088001a
New translations base.json (Greek)
mregni Aug 9, 2020
de8333a
New translations base.json (German)
mregni Aug 9, 2020
2fef4c9
New translations base.json (Danish)
mregni Aug 9, 2020
6d2dfee
New translations base.json (Spanish)
mregni Aug 9, 2020
15b3945
New translations base.json (Portuguese, Brazilian)
mregni Aug 9, 2020
dfa579c
Added titles to translation files #1293
mregni Aug 9, 2020
61746ea
Merge pull request #1303 from mregni/features/1293
mregni Aug 9, 2020
dc4d22f
New translations base.json (Romanian)
mregni Aug 9, 2020
f8906d4
New translations base.json (Dutch)
mregni Aug 9, 2020
08a5769
New translations base.json (English)
mregni Aug 9, 2020
975e681
New translations base.json (Chinese Simplified)
mregni Aug 9, 2020
b6296f6
New translations base.json (Swedish)
mregni Aug 9, 2020
3552475
New translations base.json (Portuguese)
mregni Aug 9, 2020
ef46101
New translations base.json (Polish)
mregni Aug 9, 2020
a6d88e7
New translations base.json (Norwegian)
mregni Aug 9, 2020
41b2d80
New translations base.json (Italian)
mregni Aug 9, 2020
cfeb56f
New translations base.json (French)
mregni Aug 9, 2020
71cfc2c
New translations base.json (Hungarian)
mregni Aug 9, 2020
339096f
New translations base.json (Finnish)
mregni Aug 9, 2020
c0c77a0
New translations base.json (Greek)
mregni Aug 9, 2020
64513cd
New translations base.json (German)
mregni Aug 9, 2020
f088e5b
New translations base.json (Danish)
mregni Aug 9, 2020
6115f96
New translations base.json (Spanish)
mregni Aug 9, 2020
91a6873
New translations base.json (Portuguese, Brazilian)
mregni Aug 9, 2020
f7f6a02
Fixing small translation issues
mregni Aug 9, 2020
f9f3803
Merge pull request #1304 from mregni/features/1293
mregni Aug 9, 2020
3fe6d0b
Merge branch 'develop' into l10n_develop
mregni Aug 9, 2020
e01288d
New translations base.json (Romanian)
mregni Aug 9, 2020
4b0483d
New translations base.json (Dutch)
mregni Aug 9, 2020
9c25a21
New translations base.json (English)
mregni Aug 9, 2020
9bc37e1
New translations base.json (Chinese Simplified)
mregni Aug 9, 2020
03be412
New translations base.json (Swedish)
mregni Aug 9, 2020
1da62b0
New translations base.json (Portuguese)
mregni Aug 9, 2020
609daa5
New translations base.json (Polish)
mregni Aug 9, 2020
a9b6d91
New translations base.json (Norwegian)
mregni Aug 9, 2020
a3d53db
New translations base.json (Italian)
mregni Aug 9, 2020
5444133
New translations base.json (French)
mregni Aug 9, 2020
88602e8
New translations base.json (Hungarian)
mregni Aug 9, 2020
9b037e6
New translations base.json (Finnish)
mregni Aug 9, 2020
6bdb578
New translations base.json (Greek)
mregni Aug 9, 2020
80ff0e2
New translations base.json (German)
mregni Aug 9, 2020
e5135d8
New translations base.json (Danish)
mregni Aug 9, 2020
e949404
New translations base.json (Spanish)
mregni Aug 9, 2020
cd02f84
New translations base.json (Portuguese, Brazilian)
mregni Aug 9, 2020
048baf8
Merge pull request #1302 from mregni/l10n_develop
mregni Aug 9, 2020
2bf48f7
Added deleted service parameter #1301
mregni Aug 9, 2020
85b6d71
Fixing typo #1293
mregni Aug 9, 2020
f04b8c7
Merge pull request #1305 from mregni/features/ES-1301
mregni Aug 9, 2020
acb1389
Merge branch 'develop' into features/1293
mregni Aug 9, 2020
4cd1b80
Merge pull request #1306 from mregni/features/1293
mregni Aug 9, 2020
7c3ba73
New translations base.json (Romanian)
mregni Aug 9, 2020
13c8d67
New translations base.json (Dutch)
mregni Aug 9, 2020
a813dea
New translations base.json (English)
mregni Aug 9, 2020
05d2bd0
New translations base.json (Chinese Simplified)
mregni Aug 9, 2020
530ec07
New translations base.json (Swedish)
mregni Aug 9, 2020
cad9580
New translations base.json (Portuguese)
mregni Aug 9, 2020
5706054
New translations base.json (Polish)
mregni Aug 9, 2020
7d2790d
New translations base.json (Norwegian)
mregni Aug 9, 2020
711e654
New translations base.json (Italian)
mregni Aug 9, 2020
703ac78
New translations base.json (French)
mregni Aug 9, 2020
20c35b8
New translations base.json (Hungarian)
mregni Aug 9, 2020
7c8d3e6
New translations base.json (Finnish)
mregni Aug 9, 2020
0653a7b
New translations base.json (Greek)
mregni Aug 9, 2020
8c6b237
New translations base.json (German)
mregni Aug 9, 2020
29b029d
New translations base.json (Danish)
mregni Aug 9, 2020
471b5b7
New translations base.json (Spanish)
mregni Aug 9, 2020
191c0a3
New translations base.json (Portuguese, Brazilian)
mregni Aug 9, 2020
02f3813
Merge pull request #1307 from mregni/l10n_develop
mregni Aug 9, 2020
b717b92
New translations base.json (German)
mregni Aug 9, 2020
355f44b
New translations base.json (German)
mregni Aug 9, 2020
7407f50
New translations base.json (English)
mregni Aug 9, 2020
8f7a71d
Fixing log download #1294
mregni Aug 9, 2020
3f82fbb
Updating windows docker image #1294
mregni Aug 9, 2020
30749b2
Added ENV variables #1294
mregni Aug 10, 2020
6660472
Fixing startup options #1294
mregni Aug 10, 2020
4339036
Updating docker container builds #1294
mregni Aug 10, 2020
038c286
Fixing typo in base.json file
mregni Aug 10, 2020
29bfeb5
Removing if in YAML
mregni Aug 10, 2020
539a617
Fixing unit tests
mregni Aug 10, 2020
6a977b1
Merge pull request #1309 from mregni/features/ES-1294
mregni Aug 10, 2020
51c31b8
New translations base.json (Romanian)
mregni Aug 10, 2020
48922b0
New translations base.json (Dutch)
mregni Aug 10, 2020
d1f4ff9
New translations base.json (English)
mregni Aug 10, 2020
dcb6d2e
New translations base.json (Chinese Simplified)
mregni Aug 10, 2020
37cf39d
New translations base.json (Swedish)
mregni Aug 10, 2020
2b72793
New translations base.json (Portuguese)
mregni Aug 10, 2020
f1cf867
New translations base.json (Polish)
mregni Aug 10, 2020
81c0b07
New translations base.json (Norwegian)
mregni Aug 10, 2020
98d4f15
New translations base.json (Italian)
mregni Aug 10, 2020
0f27133
New translations base.json (French)
mregni Aug 10, 2020
fe8fd70
New translations base.json (Hungarian)
mregni Aug 10, 2020
c0aa86f
New translations base.json (Finnish)
mregni Aug 10, 2020
55c6d74
New translations base.json (Greek)
mregni Aug 10, 2020
d9e0fc9
New translations base.json (German)
mregni Aug 10, 2020
a456502
New translations base.json (Danish)
mregni Aug 10, 2020
1d73931
New translations base.json (Spanish)
mregni Aug 10, 2020
d0876d4
New translations base.json (Portuguese, Brazilian)
mregni Aug 10, 2020
227c48e
Fixing docker build
mregni Aug 10, 2020
886064d
Fixing copy powershell script
mregni Aug 10, 2020
e12d661
Fixing docker manifest files
mregni Aug 10, 2020
0c265bd
Fixing default startup options
mregni Aug 10, 2020
397d139
Updating NuGet packages
mregni Aug 10, 2020
d243b88
Reverting LiteDB update
mregni Aug 10, 2020
49eea55
Reverting test nuget packages
mregni Aug 10, 2020
e17ac4c
Merge branch 'develop' into l10n_develop
mregni Aug 10, 2020
63fe760
Merge pull request #1308 from mregni/l10n_develop
mregni Aug 10, 2020
1842ebb
Removing emby from image urls #1298
mregni Aug 10, 2020
c006ee4
Merge branch 'develop' into features/ES-1298
mregni Aug 10, 2020
bfd84f6
Merge pull request #1310 from mregni/features/ES-1298
mregni Aug 10, 2020
56a5e53
Added dropdown to select other URL if needed in wizard #1298
mregni Aug 11, 2020
183ab01
Fixing small title length bug in top card
mregni Aug 11, 2020
b71e86e
Merge branch 'develop' into features/ES-1298
mregni Aug 11, 2020
f9287e6
Merge pull request #1311 from mregni/features/ES-1298
mregni Aug 11, 2020
e911a0a
New translations base.json (Romanian)
mregni Aug 11, 2020
8a4e441
New translations base.json (Dutch)
mregni Aug 11, 2020
dd5f763
New translations base.json (English)
mregni Aug 11, 2020
d1d2104
New translations base.json (Chinese Simplified)
mregni Aug 11, 2020
6bdab84
New translations base.json (Swedish)
mregni Aug 11, 2020
71eddaf
New translations base.json (Portuguese)
mregni Aug 11, 2020
4a6aa28
New translations base.json (Polish)
mregni Aug 11, 2020
53b2aaa
New translations base.json (Norwegian)
mregni Aug 11, 2020
b714169
New translations base.json (Italian)
mregni Aug 11, 2020
74f7195
New translations base.json (French)
mregni Aug 11, 2020
77cf41b
New translations base.json (Hungarian)
mregni Aug 11, 2020
486b4e6
New translations base.json (Finnish)
mregni Aug 11, 2020
7ade6c5
New translations base.json (Greek)
mregni Aug 11, 2020
78a7980
New translations base.json (German)
mregni Aug 11, 2020
e30dc0c
New translations base.json (Danish)
mregni Aug 11, 2020
692732a
New translations base.json (Spanish)
mregni Aug 11, 2020
392dfe5
New translations base.json (Portuguese, Brazilian)
mregni Aug 11, 2020
a8a1705
Fixing tests
mregni Aug 11, 2020
ef5e640
Removed console.logs everywhere
mregni Aug 11, 2020
dd7d1ae
Fixing a baseUrl issue #1295
mregni Aug 11, 2020
d61292f
Merge pull request #1312 from mregni/l10n_develop
mregni Aug 11, 2020
f4425db
docs: update README.md [skip ci]
allcontributors[bot] Aug 11, 2020
da1b19e
docs: update .all-contributorsrc [skip ci]
allcontributors[bot] Aug 11, 2020
6070327
Merge pull request #1313 from mregni/all-contributors/add-n00b42
mregni Aug 11, 2020
ff560dd
Fixing base url naming issue
mregni Aug 11, 2020
a1e839c
Trying to add a fallback when settings is null #1295
mregni Aug 11, 2020
8dd0b63
Merge branch 'develop' into features/ES-1295
mregni Aug 11, 2020
a2c2c8a
Merge pull request #1314 from mregni/features/ES-1295
mregni Aug 11, 2020
3d3b027
Enabled show sync again in media sync job
mregni Aug 12, 2020
8ac2bd2
Added new general show page
mregni Aug 12, 2020
9cbb373
New translations base.json (German)
mregni Aug 12, 2020
703b70a
Merge pull request #1322 from mregni/l10n_develop
mregni Aug 13, 2020
0288fdb
Removed hardcoded user id #1266
mregni Aug 14, 2020
e2b9154
Fixing typo (one of many) #1266
mregni Aug 14, 2020
f584ebe
Fixed unit tests
mregni Aug 14, 2020
261facf
Merge pull request #1324 from mregni/feature/ES-1266
mregni Aug 14, 2020
8394e39
Added fallback data if http calls fail #1266
mregni Aug 14, 2020
0bd563b
Merge pull request #1325 from mregni/feature/ES-1266
mregni Aug 14, 2020
d5b92d4
Added support for / baseurl (removing the string) #1266
mregni Aug 15, 2020
e817fb5
Merge branch 'develop' into feature/ES-1266
mregni Aug 15, 2020
3d1c582
Fixed unit tests #1266
mregni Aug 16, 2020
447e6a1
Merge branch 'feature/ES-1266' into develop
mregni Aug 16, 2020
42aa8a9
Merge branch 'develop' into feature/ES-1266
mregni Aug 16, 2020
64db510
Fixed undefined url to item detail page #1327
mregni Aug 16, 2020
f62b3ed
Fix null ref isue with userid
mregni Aug 16, 2020
50eb1ef
Fixed issue with undefined baseURL #1266
mregni Aug 16, 2020
25959ad
Merge pull request #1326 from mregni/feature/ES-1266
mregni Aug 16, 2020
ac59808
Merge branch 'develop' into features/shows
mregni Aug 16, 2020
913a993
Added general show page
mregni Aug 16, 2020
a40d82a
Added extra column in movie table #1328
mregni Aug 18, 2020
ecf507d
Added video range column #1328
mregni Aug 19, 2020
17c1353
Added show pages
mregni Aug 19, 2020
fa3f4c1
Fixing unit tests
mregni Aug 19, 2020
a5c3a94
Fixed null ref exception on convert
mregni Aug 19, 2020
5b6c581
Fixing unit tests
mregni Aug 19, 2020
525b374
Added some extra unit tests
mregni Aug 20, 2020
d808cf1
Merge pull request #1329 from mregni/features/shows
mregni Aug 20, 2020
fde048d
New translations base.json (Romanian)
mregni Aug 20, 2020
5338810
New translations base.json (Dutch)
mregni Aug 20, 2020
83cf667
New translations base.json (English)
mregni Aug 20, 2020
84b4097
New translations base.json (Chinese Simplified)
mregni Aug 20, 2020
27d75a9
New translations base.json (Swedish)
mregni Aug 20, 2020
e138224
New translations base.json (Portuguese)
mregni Aug 20, 2020
f4668f6
New translations base.json (Polish)
mregni Aug 20, 2020
dc31cfb
New translations base.json (Norwegian)
mregni Aug 20, 2020
3f2b5f6
New translations base.json (Italian)
mregni Aug 20, 2020
00f8fb6
New translations base.json (French)
mregni Aug 20, 2020
35005f2
New translations base.json (Hungarian)
mregni Aug 20, 2020
f17ecf6
New translations base.json (Finnish)
mregni Aug 20, 2020
7e6e9ec
New translations base.json (Greek)
mregni Aug 20, 2020
167ebdb
New translations base.json (German)
mregni Aug 20, 2020
f64436f
New translations base.json (Danish)
mregni Aug 20, 2020
2eec89f
New translations base.json (Spanish)
mregni Aug 20, 2020
76f2482
New translations base.json (Portuguese, Brazilian)
mregni Aug 20, 2020
2f22149
Added extra debug info #1295
mregni Aug 20, 2020
47626ef
Merge pull request #1331 from mregni/features/ES-1295
mregni Aug 20, 2020
6d6184c
Merge pull request #1330 from mregni/l10n_develop
mregni Aug 20, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,23 @@
"contributions": [
"design"
]
},
{
"login": "n00b42",
"name": "n00b42",
"avatar_url": "https://avatars0.githubusercontent.com/u/6792900?v=4",
"profile": "https://github.com/n00b42",
"contributions": [
"translation",
"userTesting",
"bug"
]
}
],
"contributorsPerLine": 7,
"projectName": "EmbyStat",
"projectOwner": "mregni",
"repoType": "github",
"repoHost": "https://github.com"
"repoHost": "https://github.com",
"skipCi": true
}
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/Bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ If applicable, add screenshots to help explain your problem.
- OS: [e.g. Windows, Ubuntu]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
- Media server type [e.g. Emby/Jellyfin]

**Additional context**
Add any other context about the problem here.
31 changes: 22 additions & 9 deletions EmbyStat.Clients.Base/Converters/BoxSetConverter.cs
Original file line number Diff line number Diff line change
@@ -1,22 +1,35 @@
using System.Linq;
using System;
using System.Linq;
using EmbyStat.Common.Enums;
using EmbyStat.Common.Models.Entities;
using EmbyStat.Common.Models.Net;
using EmbyStat.Logging;
using Newtonsoft.Json;

namespace EmbyStat.Clients.Base.Converters
{
public static class BoxSetConverter
{
public static BoxSet ConvertToBoxSet(this BaseItemDto x)
public static BoxSet ConvertToBoxSet(this BaseItemDto dto, Logger logger)
{
return new BoxSet
try
{
Id = x.Id,
Name = x.Name,
ParentId = x.ParentId,
OfficialRating = x.OfficialRating,
Primary = x.ImageTags.FirstOrDefault(y => y.Key == ImageType.Primary).Value
};
return new BoxSet
{
Id = dto.Id,
Name = dto.Name,
ParentId = dto.ParentId,
OfficialRating = dto.OfficialRating,
Primary = dto.ImageTags.FirstOrDefault(y => y.Key == ImageType.Primary).Value
};
}
catch (Exception e)
{
logger.Error(e.Message);
logger.Debug("DTO object tried to convert");
logger.Debug(JsonConvert.SerializeObject(dto));
return null;
}
}
}
}
82 changes: 47 additions & 35 deletions EmbyStat.Clients.Base/Converters/MovieConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,51 +4,63 @@
using EmbyStat.Common.Models.Entities;
using EmbyStat.Common.Models.Entities.Helpers;
using EmbyStat.Common.Models.Net;
using EmbyStat.Logging;
using Newtonsoft.Json;

namespace EmbyStat.Clients.Base.Converters
{
public static class MovieConverter
{
public static Movie ConvertToMovie(this BaseItemDto dto, string collectionId)
public static Movie ConvertToMovie(this BaseItemDto dto, string collectionId, Logger logger)
{
var movie = new Movie
try
{
Id = dto.Id,
CollectionId = collectionId,
Name = dto.Name,
ParentId = dto.ParentId,
OriginalTitle = dto.OriginalTitle,
DateCreated = dto.DateCreated,
Path = dto.Path,
SortName = dto.SortName,
MediaSources = dto.MediaSources.Select(y => new MediaSource
var movie = new Movie
{
Id = y.Id,
Path = y.Path,
BitRate = y.Bitrate,
Container = y.Container,
Protocol = y.Protocol.ToString(),
RunTimeTicks = y.RunTimeTicks,
SizeInMb = Math.Round(y.Size / (double)1024 / 1024 ?? 0, MidpointRounding.AwayFromZero)
}).ToList(),
RunTimeTicks = dto.RunTimeTicks,
Container = dto.Container,
CommunityRating = dto.CommunityRating,
MediaType = dto.MediaType,
OfficialRating = dto.OfficialRating,
PremiereDate = dto.PremiereDate,
ProductionYear = dto.ProductionYear,
Video3DFormat = dto.Video3DFormat ?? 0,
Genres = dto.Genres,
};
Id = dto.Id,
CollectionId = collectionId,
Name = dto.Name,
ParentId = dto.ParentId,
OriginalTitle = dto.OriginalTitle,
DateCreated = dto.DateCreated,
Path = dto.Path,
SortName = dto.SortName,
MediaSources = dto.MediaSources.Select(y => new MediaSource
{
Id = y.Id,
Path = y.Path,
BitRate = y.Bitrate,
Container = y.Container,
Protocol = y.Protocol.ToString(),
RunTimeTicks = y.RunTimeTicks,
SizeInMb = Math.Round(y.Size / (double)1024 / 1024 ?? 0, MidpointRounding.AwayFromZero)
}).ToList(),
RunTimeTicks = dto.RunTimeTicks,
Container = dto.Container,
CommunityRating = dto.CommunityRating,
MediaType = dto.MediaType,
OfficialRating = dto.OfficialRating,
PremiereDate = dto.PremiereDate,
ProductionYear = dto.ProductionYear,
Video3DFormat = dto.Video3DFormat ?? 0,
Genres = dto.Genres,
};

dto.MapImageTags(movie);
dto.MapPeople(movie);
dto.MapProviderIds(movie);
dto.MapStreams(movie);
dto.MapMediaSources(movie);
dto.MapImageTags(movie);
dto.MapPeople(movie);
dto.MapProviderIds(movie);
dto.MapStreams(movie);
dto.MapMediaSources(movie);

return movie;
return movie;
}
catch (Exception e)
{
logger.Error(e.Message);
logger.Debug("DTO object tried to convert");
logger.Debug(JsonConvert.SerializeObject(dto));
return null;
}
}
}
}
39 changes: 26 additions & 13 deletions EmbyStat.Clients.Base/Converters/PersonConverter.cs
Original file line number Diff line number Diff line change
@@ -1,26 +1,39 @@
using System.Linq;
using System;
using System.Linq;
using EmbyStat.Common.Enums;
using EmbyStat.Common.Models.Entities;
using EmbyStat.Common.Models.Net;
using EmbyStat.Logging;
using Newtonsoft.Json;

namespace EmbyStat.Clients.Base.Converters
{
public static class PersonConverter
{
public static Person Convert(BaseItemDto person)
public static Person Convert(BaseItemDto dto, Logger logger)
{
return new Person
try
{
Id = person.Id,
Name = person.Name,
Primary = person.ImageTags?.FirstOrDefault(y => y.Key == ImageType.Primary).Value,
BirthDate = person.PremiereDate,
Etag = person.Etag,
IMDB = person.ProviderIds?.FirstOrDefault(y => y.Key == "Imdb").Value,
TMDB = person.ProviderIds?.FirstOrDefault(y => y.Key == "Tmdb").Value,
OverView = person.Overview,
SortName = person.SortName
};
return new Person
{
Id = dto.Id,
Name = dto.Name,
Primary = dto.ImageTags?.FirstOrDefault(y => y.Key == ImageType.Primary).Value,
BirthDate = dto.PremiereDate,
Etag = dto.Etag,
IMDB = dto.ProviderIds?.FirstOrDefault(y => y.Key == "Imdb").Value,
TMDB = dto.ProviderIds?.FirstOrDefault(y => y.Key == "Tmdb").Value,
OverView = dto.Overview,
SortName = dto.SortName
};
}
catch (Exception e)
{
logger.Error(e.Message);
logger.Debug("DTO object tried to convert");
logger.Debug(JsonConvert.SerializeObject(dto));
return null;
}
}
}
}
Loading