Stepan Goremykin
19e65269a2
Simplify linq expressions (use All)
2023-04-06 19:27:57 +02:00
Bond_009
b366dc2e6e
Use ArgumentException.ThrowIfNullOrEmpty
2022-12-07 16:43:59 +01: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
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
efcdab116f
Merge pull request #7529 from Shadowghost/strm-ffprobe-external-fix
...
(cherry picked from commit 60affd096595d68728506149d0ffce6e84b6b015)
Signed-off-by: crobibero <cody@robibe.ro>
2022-05-20 18:30:56 -04:00
jakobkukla
75475285da
Fix supportsTranscoding not reflecting user permissions sometimes
2022-03-17 17:24:30 +01:00
Bond_009
f50a250cd9
Optimize Guid comparisons
...
* Use Guid.Equals(Guid) instead of the == override
* Ban the usage of Guid.Equals(Object) to prevent accidental boxing
* Compare to default(Guid) instead of Guid.Empty
2022-02-21 14:15:09 +01:00
Bond_009
1c14c86b20
Fix some warnings
2022-02-14 14:46:04 +01:00
Cody Robibero
7bfc6b5679
Remove more warnings
2021-12-27 07:38:06 -07:00
Bond_009
4dfb7b18ae
Add some docs and tests
2021-11-07 22:32:08 +01:00
Patrick Barron
876a902356
Fix warnings in Library
2021-10-03 21:41:22 -04:00
cvium
ff328fefc5
Replace GetDirectStreamProviderByUniqueId with GetLiveStreamInfoByUniqueId
2021-09-10 12:53:45 +02:00
cvium
026a7af0e8
Don't throw when livestream file isn't found
2021-09-10 11:54:26 +02:00
cvium
1603d1928e
Kill ProgressiveFileCopier and seek to end for ongoing livetv
2021-09-10 09:29:14 +02:00
Bond-009
71ab4a5754
Fix it for real(tm) this time
2021-09-07 14:18:04 +02:00
Bond-009
8dc0911374
Fix log message
2021-09-07 14:03:32 +02:00
Bond_009
e3dac4fda2
Use async FileStreams where it makes sense
2021-09-02 14:02:04 +02:00
Bond_009
6f8ccab788
Move non-jellyfin extensions to separate project
2021-06-19 18:04:46 +02:00
cvium
42a2cc1747
Remove some unnecessary allocations
2021-05-24 00:30:41 +02:00
Bond_009
7e8428e588
Enable nullable reference types for Emby.Server.Implementations
2021-05-20 22:48:53 +02:00
cvium
608cba817c
Reduce some allocations with the magic of spans etc.
2021-04-30 15:09:36 +02:00
cvium
8933389753
Respect user settings for transcode and remux
2021-04-19 10:49:52 +02:00
Bond_009
a8ed753f6c
FxCop -> Net Analyzers (part 2)
2021-03-13 22:33:28 +01:00
Bond_009
a9b497720d
Use JsonSerializer.SerializeToUtf8Bytes when doing a round trip
...
This test uses a very small object (CountryInfo), using a bigger object
would increase the difference in allocated 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 |
|---------------- |-----------:|---------:|---------:|-------:|------:|------:|----------:|
| RoundTripBytes | 932.0 ns | 5.09 ns | 4.25 ns | 0.1173 | - | - | 368 B |
| RoundTripString | 1,114.8 ns | 22.19 ns | 23.74 ns | 0.1469 | - | - | 464 B |
```
2021-01-12 15:37:18 +01:00
David
043d045448
Put json serializer options in private field
2020-12-24 11:22:34 +01:00
David
2a574914ea
Use streams instead of strings
2020-12-23 19:24:58 +01:00
David
196388d607
Remove custom Json serializer from Emby.Server.Implementations
2020-12-23 13:14:40 +01:00
Bond_009
bc7359f87d
Use string.Split(char) where possible instead of string.Split(char[])
2020-11-14 20:27:48 +01:00
Ryan Petris
4db5700e18
Don't take a lock if there's no intention to manipulate the list of open streams. Instead, use a ConcurrentDictionary so that, in those situations, thread-safe access to the dictionary is ensured.
2020-09-23 14:12:26 -07:00
Bond_009
01e781035f
Fix warnings
2020-07-24 16:37:54 +02:00
Bond_009
7324b44c43
Fix warnings
2020-07-20 11:01:37 +02:00
telans
247f9c61e6
fix SA1513/SA1516
2020-06-16 16:11:30 +12:00
telans
3d9049ef08
fix SA1508
2020-06-15 10:45:55 +12:00
telans
acd4389653
fix SA1005
2020-06-15 10:41:00 +12:00
telans
726e116d5b
fix SA1510
2020-06-15 10:40:57 +12:00
Patrick Barron
42b4f0aa2e
Merge branch 'master' into userdb-efcore
...
# Conflicts:
# Emby.Server.Implementations/Library/UserManager.cs
# Jellyfin.Data/Jellyfin.Data.csproj
2020-06-13 19:41:05 -04:00
crobibero
44957c5a9a
Use typed logger where possible
2020-06-05 18:15:56 -06:00
Patrick Barron
06f9cde22f
Merge branch 'master' into userdb-efcore
...
# Conflicts:
# Emby.Server.Implementations/EntryPoints/ServerEventNotifier.cs
# Emby.Server.Implementations/Library/UserManager.cs
# Emby.Server.Implementations/Sorting/IsFavoriteOrLikeComparer.cs
# Emby.Server.Implementations/Sorting/IsPlayedComparer.cs
# Emby.Server.Implementations/Sorting/IsUnplayedComparer.cs
# Emby.Server.Implementations/TV/TVSeriesManager.cs
# Jellyfin.Server.Implementations/Users/DefaultAuthenticationProvider.cs
2020-06-04 16:52:23 -04:00
Bond_009
7439e095e2
Merge branch 'master' into nullable3
2020-05-27 20:49:18 +02:00
Patrick Barron
c464f700db
Remove redundant qualifiers
2020-05-20 13:07:53 -04:00
Patrick Barron
9ad839c776
Initial migration code
2020-05-12 22:10:35 -04:00
Bond_009
30ce346f34
Enable nullabe reference types for MediaBrowser.Model
2020-04-05 18:10:56 +02:00
Mark Monteiro
573da63d41
Register and construct IMediaSourceManager correctly
2020-04-04 15:28:21 -04:00
Bond_009
07cc4be6a7
Fix some warnings
...
* Add analyzers to MediaBrowser.XbmcMetadata
* Enable TreatWarningsAsErrors for MediaBrowser.XbmcMetadata
* Add analyzers to MediaBrowser.WebDashboard
* Enable TreatWarningsAsErrors for MediaBrowser.WebDashboard
* Disable SA1600 in favor of CS1591
2020-02-23 12:11:43 +01:00
dkanada
d217f1614e
Merge pull request #2096 from Bond-009/embytv
...
Clean up Emby.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs
2020-01-13 00:41:52 +09:00
Bond_009
bb236b9591
Merge branch 'master' into warn12
2020-01-10 21:18:16 +01:00
Bond_009
e714b9930e
Merge branch 'master' into embytv
2020-01-10 21:16:46 +01:00
Bond_009
a253fa616d
Fix build and address comments
2020-01-08 01:23:57 +09:00
dkanada
aca31457c0
merge branch master into media-attachments
2020-01-08 01:21:09 +09:00