Commit Graph

152 Commits

Author SHA1 Message Date
BaronGreenback
2e98de9062
Code Clean up: Convert to null-coalescing operator ?? (#5845)
Co-authored-by: Cody Robibero <cody@robibe.ro>
Co-authored-by: Patrick Barron <18354464+barronpm@users.noreply.github.com>
2021-05-05 13:51:14 +02:00
BaronGreenback
f2c10471bf
Code Clean up: Use Pattern Matching (#5838)
Co-authored-by: Cody Robibero <cody@robibe.ro>
Co-authored-by: Patrick Barron <18354464+barronpm@users.noreply.github.com>
2021-05-05 13:37:36 +02:00
BaronGreenback
bc1cc2d04a Remove unused using directives 2021-04-17 11:37:55 +01:00
cvium
42bcf171d9 Use sync Serialize when writing scheduled tasks to disk 2021-04-10 23:54:35 +02:00
Bond_009
a8ed753f6c FxCop -> Net Analyzers (part 2) 2021-03-13 22:33:28 +01:00
Bond_009
65bab55ca0 Minor improvements 2021-02-13 00:39:18 +01:00
dkanada
54a3ab15a3
Merge pull request #5005 from jellyfin/bytes
JsonSerializer deserialize from bytes where possible
2021-02-05 11:47:06 +09:00
crobibero
6abee2dd22 fix delete log task 2021-01-18 19:42:50 -07:00
Bond_009
1752423e52 Open FileStream with FileMode.Create instead of FileMode.OpenOrCreate
> The OpenWrite method opens a file if one already exists for the file path,
    or creates a new file if one does not exist. For an existing file,
    it does not append the new text to the existing text. Instead,
    it overwrites the existing characters with the new characters.
    If you overwrite a longer string
    (such as "This is a test of the OpenWrite method") with a shorter string
    (such as "Second run"), the file will contain a mix of the strings
    ("Second runtest of the OpenWrite method").

Ref: https://docs.microsoft.com/en-us/dotnet/api/system.io.file.openwrite?view=net-5.0#remarks
2021-01-12 15:51:32 +01:00
Bond_009
1ea2b200c0 JsonSerializer deserialize from bytes where possible
This is faster and uses way less memory
```
BenchmarkDotNet=v0.12.1, OS=fedora 32
Intel Core i7-6700HQ CPU 2.60GHz (Skylake), 1 CPU, 8 logical and 4 physical cores
.NET Core SDK=5.0.100
  [Host]     : .NET Core 5.0.0 (CoreCLR 5.0.20.51904, CoreFX 5.0.20.51904), X64 RyuJIT
  DefaultJob : .NET Core 5.0.0 (CoreCLR 5.0.20.51904, CoreFX 5.0.20.51904), X64 RyuJIT

| Method |     Mean |   Error |  StdDev |   Gen 0 | Gen 1 | Gen 2 | Allocated |
|------- |---------:|--------:|--------:|--------:|------:|------:|----------:|
|  Bytes | 158.4 us | 2.56 us | 2.14 us | 16.8457 |     - |     - |  52.08 KB |
| String | 172.8 us | 0.78 us | 0.70 us | 41.5039 |     - |     - | 127.82 KB |
| Custom | 155.5 us | 2.95 us | 2.76 us | 10.0098 |     - |     - |  31.27 KB |
```
2021-01-12 15:28:02 +01:00
obradovichv
0282a1ed09 Fix string culture specificity
Fix bug in SsaParser.cs primary color {\1c} formatting that would leave
behind the {\1c} closing token and instead append </font> token
unconditionally to the dialogue text. Add tests.

Change AlphanumComparatorTests.cs complementary test data generation
from an array shuffle to an array reversal. Although it was previously
using a seeded Random, the shuffle itself could result in no
rearrangement of elements if the seed or test data changed over time.
The reversal guarantees reordering of elements and has the added benefit
of simplifying the test code since no special handling is needed for
arrays of 2 elements.

Change DailyTrigger.cs logging of TriggerDate format to
"yyyy-MM-dd HH:mm:ss.fff zzz" for consistency with configured log
timestamp format and change DueTime format to culture-invariant "c"
format.
2021-01-03 20:17:27 +02:00
Cody Robibero
5c57569692
Merge branch 'master' into PluginDowngrade 2020-12-30 18:11:37 -07:00
David
3dec1fd6b2 Use UTF8 encoding and async correctly 2020-12-29 00:35:59 +01:00
David
21fd124bca Code revie 2020-12-27 11:15:46 +01:00
David
043d045448 Put json serializer options in private field 2020-12-24 11:22:34 +01:00
David
e835dfb27d Use sync string instead of file 2020-12-24 10:31:51 +01:00
David
2a574914ea Use streams instead of strings 2020-12-23 19:24:58 +01:00
David
f38970cbd3 Remove xml docs 2020-12-23 15:03:14 +01:00
David
196388d607 Remove custom Json serializer from Emby.Server.Implementations 2020-12-23 13:14:40 +01:00
Greenback
7986465cf7 Initial upload 2020-12-14 16:14:39 +00:00
crobibero
bf66f57069 Set DeleteTranscodeFileTask to trigger every 24h 2020-11-20 08:12:38 -07:00
Greenback
e51ddd326c Fixes spelling. 2020-11-18 13:23:45 +00:00
crobibero
e66d79fc0c Merge remote-tracking branch 'upstream/master' into http-exception 2020-11-15 13:09:05 -07:00
crobibero
95a2de757f remove custom HttpException 2020-11-14 14:30:34 -07:00
Bond_009
d4e568c8bf
Replace Task.WaitAll with Task.Wait 2020-11-14 20:30:08 +01:00
Bond_009
ff49a3bb61
Missed some stuff 2020-11-14 20:28:15 +01:00
Anthony Lavado
6205fb4b6a
Merge pull request #4341 from Bond-009/minor6
Minor improvements
2020-11-02 11:10:39 -05:00
crobibero
ceecc80bb3 Allow configuration of ActivityLogRetention 2020-11-01 18:32:41 -07:00
Bond_009
49569ca0a0 Use nameof where possible 2020-10-17 16:19:57 +02:00
crobibero
15a7f88e08 Automatically clean activity log database 2020-10-14 11:44:11 -06:00
Jan-Pieter Baert
6f9beef732
Fix SA1012 and SA1013 warnings 2020-10-12 19:22:33 +02:00
Anthony Lavado
959d906c85
Just enable instead 2020-10-05 02:25:09 -04:00
Anthony Lavado
375f849b3e
Simply trigger
Co-authored-by: Claus Vium <cvium@users.noreply.github.com>
2020-10-05 02:14:43 -04:00
Anthony Lavado
e77040a4fb
Fix Transcode Cleanup Schedule
Sets the default time to midnight, and confirms to the same task
scheduling commands that other tasks use.
2020-10-05 00:15:25 -04:00
Bond_009
e653eef44f Fix some warnings 2020-08-31 22:20:19 +02:00
Patrick Barron
9fa4fff15d Merge branch 'master' into event-rewrite-1
# Conflicts:
#	Emby.Dlna/Emby.Dlna.csproj
#	Emby.Dlna/Eventing/DlnaEventManager.cs
#	Emby.Dlna/Service/BaseService.cs
#	Emby.Server.Implementations/ScheduledTasks/ScheduledTaskWorker.cs
#	MediaBrowser.Controller/Subtitles/SubtitleDownloadEventArgs.cs
2020-08-24 20:04:13 -04:00
Bond_009
ab2147751f Make MediaBrowser.MediaEncoding warnings free 2020-08-20 12:16:24 +02:00
Patrick Barron
ca1f15af19 Move GenericEventArgs to Jellyfin.Data.Events 2020-08-13 20:52:55 -04:00
Patrick Barron
0aa349fe40 Remove unused dependencies. 2020-07-23 21:42:36 -04:00
telans
8de6452967
fix some documentation periods 2020-06-20 18:13:11 +12:00
Bond-009
9af6eda0b4
Merge pull request #3343 from telans/comment-stops
Add full stop at end of comments (SA1629)
2020-06-16 11:54:58 +02:00
telans
247f9c61e6
fix SA1513/SA1516 2020-06-16 16:11:30 +12:00
telans
9018f8d8be
Add full stop at end of comments (SA1629) 2020-06-16 10:37:52 +12:00
telans
acd4389653
fix SA1005 2020-06-15 10:41:00 +12:00
crobibero
44957c5a9a Use typed logger where possible 2020-06-05 18:15:56 -06:00
dkanada
fe16c3fad4
Merge branch 'master' into install-plugin 2020-06-04 03:20:48 +09:00
Vasily
40502a33e0
Merge pull request #3203 from Bond-009/warn18
Enable TreatWarningsAsErrors for Jellyfin.Server.Implementations in Release mode
2020-06-03 12:27:59 +03:00
Bond_009
4748105dce Enable TreatWarningsAsErrors for Jellyfin.Server.Implementations in Release mode 2020-05-29 11:28:19 +02:00
Bond_009
7439e095e2 Merge branch 'master' into nullable3 2020-05-27 20:49:18 +02:00
dkanada
7972daaba4 fix a few issues with the plugin manifest 2020-05-24 15:40:27 +09:00