Commit Graph

40 Commits

Author SHA1 Message Date
Bond-009
1a0ce16f4d
Merge pull request #5504 from crobibero/json-string-converter 2021-03-20 00:48:41 +01:00
Bond_009
a8ed753f6c FxCop -> Net Analyzers (part 2) 2021-03-13 22:33:28 +01:00
crobibero
e814d8e2cf Add JsonStringConverter 2021-03-12 06:43:57 -07:00
crobibero
fd0b3ca5ef Add JsonVersionConverter and tests 2021-03-05 07:48:45 -07:00
Bond_009
acac21d8dc Improve tests 2021-02-23 16:45:10 +01:00
Bond_009
fd7b215c28 Don't enable case-insensitivity for json by default 2021-02-13 00:22:58 +01:00
Cody Robibero
5c57569692
Merge branch 'master' into PluginDowngrade 2020-12-30 18:11:37 -07:00
crobibero
cae38f3a7e Add JsonConverter for Nullable Guids 2020-12-29 16:08:16 -07:00
BaronGreenback
dae6798a18 Making it work 2020-12-23 17:25:41 +00:00
BaronGreenback
889e988167 Updated to latest unstable. 2020-12-23 17:25:34 +00:00
crobibero
af8acf7128 Initialize JsonSerializerOptions statically 2020-12-23 09:01:24 -07:00
crobibero
242b5a45ab Add JsonDateTimeConverter 2020-12-21 08:12:32 -07:00
Greenback
0337e39bae Updated JsonDefaults 2020-12-15 19:39:41 +00:00
Greenback
208d545cfe Changed as suggested. 2020-12-15 10:05:04 +00:00
crobibero
6e98378447 Simplify converter 2020-12-07 14:58:27 -07:00
crobibero
6c0188c42b Fix efcore not returning a UTC DateTime 2020-11-25 07:44:11 -07:00
Bill Thornton
42e90893cd
Merge pull request #4517 from BaronGreenback/pluginMessageFix
[Fix] Fixed Plugin versioning in browser notifications
2020-11-24 20:35:40 -05:00
crobibero
f557a730bb Write DateTimes in ISO8601 format for backwards compatibility. 2020-11-19 17:33:51 -07:00
Greenback
c4d8926426 Fixed notification 2020-11-19 17:55:31 +00:00
crobibero
ac790cd77b Properly handle null structs in json 2020-09-27 09:45:11 -06:00
crobibero
1d3303fa0a Move json profiles to constant strings. 2020-09-03 12:15:24 -06:00
crobibero
9ddf550b43 Simplify json converters 2020-09-01 09:42:59 -06:00
crobibero
eb400f7292 Fallback to base jsonconverter 2020-09-01 09:19:22 -06:00
crobibero
9b2359a453 readd nullable number converters 2020-09-01 08:12:36 -06:00
crobibero
8b96881aa1 Clean up json Converters 2020-08-26 08:22:48 -06:00
crobibero
5f64ab02a0 bump System.Text.Json 2020-08-25 07:33:58 -06:00
crobibero
340f83c3f5 Ignore null json values 2020-08-23 07:48:12 -06:00
crobibero
384a62dc08 Add nullable int32, int64 json converters 2020-08-21 10:23:47 -06:00
David
c6a0306a34 Move field to the controller 2020-07-14 20:20:24 +02:00
David
9f567e6471 Don't recreate JsonSerializerOptions every time 2020-07-14 12:39:58 +02:00
David
ee03b919f9 Fix parsing 2020-07-12 20:11:59 +02:00
Patrick Barron
fe02c6e863
Merge pull request #2929 from crobibero/api-scheduled-tasks
Scheduled Tasks to Jellyfin.Api
2020-06-25 23:46:03 +00:00
David
6651cb8d24 Add JsonInto32Converter
Add additional swagger type mapping
2020-06-19 12:24:39 +02:00
crobibero
39376bace3 Merge remote-tracking branch 'upstream/api-migration' into api-scheduled-tasks 2020-06-13 15:06:07 -06:00
crobibero
ec3e15db57 Fix merge and build 2020-06-13 13:11:41 -06:00
crobibero
6c53e36ccf Fix Api Routing 2020-06-04 15:17:05 -06:00
crobibero
01a5103fef Add Dictionary with non-string keys to System.Text.Json 2020-06-02 11:47:33 -06:00
crobibero
4fe0beec16 Fix Json Enum conversion, map all JsonDefaults properties to API 2020-06-02 08:23:12 -06:00
Bond_009
cf2e2a3f30 Fix exceptions while scanning
Fixes these exceptions:
```
[2019-12-22 20:48:14.779 +01:00] [ERR] Error in WaitForExit
System.InvalidOperationException: No process is associated with this object.
   at System.Diagnostics.Process.EnsureState(State state)
   at System.Diagnostics.Process.EnsureState(State state)
   at System.Diagnostics.Process.GetWaitState()
   at System.Diagnostics.Process.WaitForExitCore(Int32 milliseconds)
   at System.Diagnostics.Process.WaitForExit(Int32 milliseconds)
   at Emby.Server.Implementations.Diagnostics.CommonProcess.WaitForExit(Int32 timeMs) in /home/pi/dev/jellyfin/Emby.Server.Implementations/Diagnostics/CommonProcess.cs:line 100
   at MediaBrowser.MediaEncoding.Encoder.MediaEncoder.StopProcess(ProcessWrapper process, Int32 waitTimeMs) in /home/pi/dev/jellyfin/MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs:line 785
[2019-12-22 20:48:14.790 +01:00] [INF] Killing ffmpeg process
[2019-12-22 20:48:14.795 +01:00] [ERR] Error killing process
System.InvalidOperationException: No process is associated with this object.
   at System.Diagnostics.Process.EnsureState(State state)
   at System.Diagnostics.Process.EnsureState(State state)
   at System.Diagnostics.Process.Kill()
   at Emby.Server.Implementations.Diagnostics.CommonProcess.Kill() in /home/pi/dev/jellyfin/Emby.Server.Implementations/Diagnostics/CommonProcess.cs:line 95
   at MediaBrowser.MediaEncoding.Encoder.MediaEncoder.StopProcess(ProcessWrapper process, Int32 waitTimeMs) in /home/pi/dev/jellyfin/MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs:line 799
[2019-12-22 20:48:14.808 +01:00] [ERR] Error in "ffprobe"
System.Text.Json.JsonException: The JSON value could not be converted to System.String. Path: $.streams[0].start_pts | LineNumber: 32 | BytePositionInLine: 26.
 ---> System.InvalidOperationException: Cannot get the value of a token type 'Number' as a string.
   at System.Text.Json.Utf8JsonReader.GetString()
   at System.Text.Json.Serialization.Converters.JsonConverterString.Read(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options)
   at System.Text.Json.JsonPropertyInfoNotNullable`4.OnRead(JsonTokenType tokenType, ReadStack& state, Utf8JsonReader& reader)
   at System.Text.Json.JsonPropertyInfo.Read(JsonTokenType tokenType, ReadStack& state, Utf8JsonReader& reader)
   at System.Text.Json.JsonSerializer.HandleValue(JsonTokenType tokenType, JsonSerializerOptions options, Utf8JsonReader& reader, ReadStack& state)
   at System.Text.Json.JsonSerializer.ReadCore(JsonSerializerOptions options, Utf8JsonReader& reader, ReadStack& readStack)
   --- End of inner exception stack trace ---
   at System.Text.Json.ThrowHelper.ReThrowWithPath(ReadStack& readStack, Utf8JsonReader& reader, Exception ex)
   at System.Text.Json.JsonSerializer.ReadCore(JsonSerializerOptions options, Utf8JsonReader& reader, ReadStack& readStack)
   at System.Text.Json.JsonSerializer.ReadCore(JsonReaderState& readerState, Boolean isFinalBlock, ReadOnlySpan`1 buffer, JsonSerializerOptions options, ReadStack& readStack)
   at System.Text.Json.JsonSerializer.ReadAsync[TValue](Stream utf8Json, Type returnType, JsonSerializerOptions options, CancellationToken cancellationToken)
   at MediaBrowser.MediaEncoding.Encoder.MediaEncoder.GetMediaInfoInternal(String inputPath, String primaryPath, MediaProtocol protocol, Boolean extractChapters, String probeSizeArgument, Boolean isAudio, Nullable`1 videoType, Boolean forceEnableLogging, CancellationToken cancellationToken) in /home/pi/dev/jellyfin/MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs:line 399
   at MediaBrowser.Providers.MediaInfo.FFProbeVideoInfo.ProbeVideo[T](T item, MetadataRefreshOptions options, CancellationToken cancellationToken) in /home/pi/dev/jellyfin/MediaBrowser.Providers/MediaInfo/FFProbeVideoInfo.cs:line 122
   at MediaBrowser.Providers.Manager.MetadataService`2.RunCustomProvider(ICustomMetadataProvider`1 provider, TItemType item, String logName, MetadataRefreshOptions options, RefreshResult refreshResult, CancellationToken cancellationToken) in /home/pi/dev/jellyfin/MediaBrowser.Providers/Manager/MetadataService.cs:line 815
```
2019-12-22 22:09:09 +01:00
Bond_009
e553eba31e Use System.Text.Json api 2019-10-08 20:59:53 +02:00