Claus Vium
760b7f8fca
Merge pull request #8922 from Bond-009/distinctby
...
Use DistinctBy introduced in .NET 6
2 years ago
Bond-009
497d8c4957
Use Order() introduced in .NET 7 ( #8923 )
2 years ago
Bond_009
6481376b81
Use DistinctBy introduced in .NET 6
2 years ago
Bond_009
b366dc2e6e
Use ArgumentException.ThrowIfNullOrEmpty
2 years ago
Bond_009
52194f56b5
Replace != null with is not null
2 years ago
Bond_009
c7d50d640e
Replace == null with is null
2 years ago
jgriff6
c2c286be6e
Remove unnecessary IsPathLocked function
2 years ago
ignacio laborde
c6bf6e00de
Remove unnecessary ToList usage
2 years ago
Joshua M. Boniface
3515c76ca1
Merge pull request #7724 from jtcasper/perms
...
(cherry picked from commit 884a59da07
)
Signed-off-by: Joshua Boniface <joshua@boniface.me>
2 years ago
Cody Robibero
1b3e56bae3
Split DirectoryExists and FileExists
3 years ago
Cody Robibero
fc5c6c0404
Use IFileSystem
3 years ago
Bond_009
1c14c86b20
Fix some warnings
3 years ago
Cody Robibero
7bfc6b5679
Remove more warnings
3 years ago
Bond_009
ea8f40e84a
More cleanup
3 years ago
Bond_009
474b035d99
Fix some warnings
3 years ago
Bond_009
1d19a5be61
Fix some warnings
...
down to 580
3 years ago
Bond_009
5726535a26
Fix some warnings
...
609 left
3 years ago
Bond_009
4dfb7b18ae
Add some docs and tests
3 years ago
Bond_009
0f52896691
Fix UnauthorizedAccessException in GetDrives
...
```
[15:01:24] [ERR] [55] Jellyfin.Server.Middleware.ExceptionMiddleware: Error processing request. URL GET /Environment/Drives.
System.UnauthorizedAccessException: Access to the path is denied.
---> System.IO.IOException: Operation not permitted
--- End of inner exception stack trace ---
at System.IO.DriveInfo.CheckStatfsResultAndThrowIfNecessary(Int32 result)
at System.IO.DriveInfo.get_TotalSize()
at Emby.Server.Implementations.IO.ManagedFileSystem.<>c.<GetDrives>b__32_0(DriveInfo d) in /home/bond/dev/jellyfin/Emby.Server.Implementations/IO/ManagedFileSystem.cs:line 583
at System.Linq.Enumerable.WhereSelectArrayIterator`2.ToList()
at Emby.Server.Implementations.IO.ManagedFileSystem.GetDrives() in /home/bond/dev/jellyfin/Emby.Server.Implementations/IO/ManagedFileSystem.cs:line 583
at Jellyfin.Api.Controllers.EnvironmentController.GetDrives() in /home/bond/dev/jellyfin/Jellyfin.Api/Controllers/EnvironmentController.cs:line 153
at lambda_method559(Closure , Object , Object[] )
at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.SyncObjectResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeActionMethodAsync()
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeNextActionFilterAsync()
```
3 years ago
Patrick Barron
c09ef74b51
Fix warnings in IO
3 years ago
Bond_009
a4eede29ab
Use RandomAccess instead of a FileStream where it makes sense
3 years ago
Fernando Fernández
3d0b1ccae6
Remove all unused usings
3 years ago
Claus Vium
74fef6c05b
Merge pull request #6177 from Bond-009/async
...
Use async FileStreams where it makes sense
3 years ago
Bond_009
637e86478f
Fix some warnings
3 years ago
Bond_009
e3dac4fda2
Use async FileStreams where it makes sense
3 years ago
Bond_009
8528e9bddb
Improve platform checks
3 years ago
Bond_009
6f8ccab788
Move non-jellyfin extensions to separate project
3 years ago
cvium
42a2cc1747
Remove some unnecessary allocations
4 years ago
Bond_009
7e8428e588
Enable nullable reference types for Emby.Server.Implementations
4 years ago
Bond_009
c608d5104d
Fix scanning
4 years ago
Bond_009
33327aa1a9
Improve fast path of ManagedFileSystem.GetValidFilename
...
| Method | Data | Mean | Error | StdDev | Median | Gen 0 | Gen 1 | Gen 2 | Allocated |
|---------------------------- |-------------- |------------:|----------:|----------:|------------:|-------:|------:|------:|----------:|
| GetValidFilenameBench | AC/DCKD/A | 52.29 ns | 0.537 ns | 0.448 ns | 52.35 ns | 0.0255 | - | - | 80 B |
| GetValidFilenameOldBench | AC/DCKD/A | 86.68 ns | 1.205 ns | 1.127 ns | 86.33 ns | 0.0587 | - | - | 184 B |
| GetValidFilenameWinBench | AC/DCKD/A | 448.55 ns | 1.228 ns | 1.088 ns | 448.33 ns | 0.0505 | - | - | 160 B |
| GetValidFilenameOldWinBench | AC/DCKD/A | 865.21 ns | 5.734 ns | 5.083 ns | 866.60 ns | 0.0839 | - | - | 264 B |
| GetValidFilenameBench | ValidFileName | 16.00 ns | 0.234 ns | 0.207 ns | 16.02 ns | 0.0102 | - | - | 32 B |
| GetValidFilenameOldBench | ValidFileName | 100.66 ns | 1.255 ns | 1.174 ns | 101.21 ns | 0.0587 | - | - | 184 B |
| GetValidFilenameWinBench | ValidFileName | 116.60 ns | 1.624 ns | 1.519 ns | 116.88 ns | 0.0356 | - | - | 112 B |
| GetValidFilenameOldWinBench | ValidFileName | 1,052.66 ns | 18.077 ns | 33.056 ns | 1,037.25 ns | 0.0839 | - | - | 264 B |
4 years ago
Bond_009
81209258ab
ManagedFileSystem: Rewrite GetValidFilename and more improvements
4 years ago
Claus Vium
f99237cf9b
Update Emby.Server.Implementations/IO/ManagedFileSystem.cs
...
Co-authored-by: Cody Robibero <cody@robibe.ro>
4 years ago
cvium
1a3352003d
don't die on dangling symlinks
4 years ago
Bond_009
c533b20496
Remove ManagedFileSystem.IsRootPath
...
`Path.IsPathRooted` should be used instead
4 years ago
crobibero
8d902478a0
Don't skip hidden files
4 years ago
Gary Wilber
1fdeac0a7d
Ignore inaccessible files during library scans
4 years ago
crobibero
ca5c20c988
Remove IIsoMounter and IsoMounter
4 years ago
Bond_009
e653eef44f
Fix some warnings
4 years ago
Bond_009
ab2147751f
Make MediaBrowser.MediaEncoding warnings free
4 years ago
Bond_009
01e781035f
Fix warnings
4 years ago
Ken
eea142cad1
FullName property instead of ToString in Emby.Server.Implementations/IO/ManagedFileSystem.cs
...
Co-authored-by: Cody Robibero <cody@robibe.ro>
4 years ago
Ken
d719ca78b4
Spacing standard on Emby.Server.Implementations/IO/ManagedFileSystem.cs
...
Co-authored-by: Cody Robibero <cody@robibe.ro>
4 years ago
Ken Brazier
6a39b1a4ca
Merge 'master' updates into 2354-soft-link-sizes
4 years ago
telans
247f9c61e6
fix SA1513/SA1516
4 years ago
telans
3d9049ef08
fix SA1508
4 years ago
telans
acd4389653
fix SA1005
4 years ago
crobibero
44957c5a9a
Use typed logger where possible
4 years ago
Ken Brazier
36312c92f5
2354 open soft-links to read size
4 years ago
Erik Rigtorp
f144acdc96
Use glob patterns to ignore files
5 years ago