Commit Graph

184 Commits

Author SHA1 Message Date
Bond-009
9ccfe3121f
Merge pull request #9103 from DarrenRuane/darrenruane_fix_chapter_images_deletion 2023-03-18 12:38:12 +01:00
Bond_009
d280dc6554 Reduce log spam
Fixes #7801
2023-03-01 16:43:55 +01:00
Bond_009
cb85fc688f Enable nullable for more files 2023-02-15 23:41:28 +01:00
Patrick Barron
8479f0f90c Rename JellyfinDb to JellyfinDbContext 2023-01-16 12:14:44 -05:00
DarrenRuane
776294b5f8 Fix pre-existing chapter images not being deleted after the chapter image generation setting is disabled 2023-01-15 23:09:33 +00:00
Bond_009
52194f56b5 Replace != null with is not null 2022-12-05 15:01:13 +01:00
Bond_009
c7d50d640e Replace == null with is null 2022-12-05 15:00:20 +01:00
Bond_009
fb3e97d7ac Use typed logger 2022-11-27 14:35:07 +01:00
Bond_009
556cc8062d Investigate some TODO comments 2022-11-27 14:13:31 +01:00
cvium
b836fe9685 remove JellyfinDbProvider and add second level caching 2022-10-21 11:55:32 +02:00
Bond_009
a9a5fcde81 Use ArgumentNullException.ThrowIfNull helper method
Did a simple search/replace on the whole repo (except the RSSDP project)
This reduces LOC and should improve performance (methods containing a throw statement don't get inlined)

```
if \((\w+) == null\)
\s+\{
\s+throw new ArgumentNullException\((.*)\);
\s+\}
```

```
ArgumentNullException.ThrowIfNull($1);
```
2022-10-06 20:21:23 +02:00
Cody Robibero
cc608c17bd Merge pull request #7512 from crobibero/update-plugin
(cherry picked from commit ca67a48140)
Signed-off-by: Joshua Boniface <joshua@boniface.me>
2022-03-29 02:24:51 -04:00
Bond_009
5732e6188c Fix some warnings 2022-02-15 18:59:46 +01:00
Cody Robibero
ecb73168b3 Suggestions from review 2022-01-10 08:26:30 -07:00
Cody Robibero
360fd70fc7 Clean up 2022-01-04 08:44:03 -07:00
David Ullmer
045ef4b726 Generate Splashscreen during RefreshMediaLibrary scheduled task 2022-01-04 08:20:16 -07:00
Bond_009
ea8f40e84a More cleanup 2021-12-27 14:20:05 +00:00
cvium
b880dc8a4a Use our own Contains extension 2021-12-20 13:31:07 +01:00
Bond_009
1d19a5be61 Fix some warnings
down to 580
2021-11-09 22:29:33 +01:00
Bond_009
5726535a26 Fix some warnings
609 left
2021-11-09 13:14:31 +01:00
Patrick Barron
4ba9b6c305 Fix warnings in ScheduledTasks 2021-10-02 12:53:51 -04:00
Bond_009
637e86478f Fix some warnings 2021-09-03 19:32:11 +02:00
Cody Robibero
ec13412155 Merge remote-tracking branch 'upstream/master' into warn-259810 2021-09-03 06:56:45 -06:00
qsniyg
2cf08dcd34 Allow zero activity log retention days 2021-09-01 15:52:59 -07:00
Cody Robibero
cba07b1ca6 Remove more and more warnings 2021-08-28 16:32:50 -06:00
Bond-009
e5a29824e5
Merge branch 'master' into minor15 2021-08-13 00:33:18 +02:00
Bond_009
915141f196 Fix some warnings 2021-07-11 22:51:36 +02:00
Bond_009
1f99c9b90c Minor fixes 2021-07-06 00:01:33 +02:00
Bond_009
6f8ccab788 Move non-jellyfin extensions to separate project 2021-06-19 18:04:46 +02:00
Bond_009
0bc0601442 Fix some warnings 2021-05-28 14:33:54 +02:00
Fernando Fernández
3b822116ed
Create scheduled task for database optimization 2021-05-24 10:45:21 +02:00
Bond_009
7e8428e588 Enable nullable reference types for Emby.Server.Implementations 2021-05-20 22:48:53 +02:00
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