Commit Graph

675 Commits

Author SHA1 Message Date
Shadowghost 697efec86e Cleanup and refactor streambuilder 2022-12-07 18:00:01 +01:00
Shadowghost 2c86bd1875 Merge branch 'master' into network-rewrite 2022-12-07 17:40:24 +01:00
Bond_009 fd9dc1e308 Update deps 2022-12-07 16:56:32 +01:00
Bond_009 cf67381e31 Fix release build 2022-12-07 16:44:00 +01:00
Bond_009 b366dc2e6e Use ArgumentException.ThrowIfNullOrEmpty 2022-12-07 16:43:59 +01:00
Bond_009 236dd650d0 Update projects to .net7 2022-12-07 16:42:05 +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 210a4921f2
Fix some warnings and only disable TreatWarningsAsErrors for CodeAnalysis (#8709) 2022-12-05 13:54:28 +01:00
Shadowghost bcd992fb06 Merge remote-tracking branch 'upstream/master' into network-rewrite 2022-12-03 12:44:45 +01:00
Bond_009 556cc8062d Investigate some TODO comments 2022-11-27 14:13:31 +01:00
ignacio laborde c6bf6e00de Remove unnecessary ToList usage 2022-10-25 00:38:57 +01:00
Neuheit c9a387943f Add IPv4 fallback from IPv6 failure.
Co-authored-by: BaronGreenback <jimcartlidge@yahoo.co.uk>
2022-10-20 16:17:56 -04:00
Shadowghost 4aec41752f Apply review suggestions 2022-10-14 10:25:57 +02:00
Claus Vium 14027f962c
Merge pull request #6751 from Bond-009/tests12
Fix DLNA UpdateProfile test
2022-10-07 09:49:16 +02:00
Shadowghost 7b90fcd053 Merge branch 'master' into network-rewrite 2022-10-07 09:16:02 +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
Shadowghost 4fc52a840c Merge branch 'master' into network-rewrite 2022-10-01 19:59:00 +02:00
Bond_009 7d48f97db9 Fix regression in DlnaHttpClient
```
[18:53:50] [ERR] [25] Emby.Dlna.Main.DlnaEntryPoint: Error updating device info for 192.168.1.21 - Sonos Connect:Amp Berging
System.Net.Http.HttpRequestException: An error occurred while sending the request.
 ---> System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'System.Net.Http.StringContent'.
   at System.Net.Http.HttpContent.CheckDisposed()
   at System.Net.Http.HttpContent.CopyToAsync(Stream stream, TransportContext context, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnection.SendRequestContentAsync(HttpRequestMessage request, HttpContentWriteStream stream, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnection.SendAsyncCore(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   --- End of inner exception stack trace ---
   at System.Net.Http.HttpConnection.SendAsyncCore(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
   at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.DecompressionHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at Microsoft.Extensions.Http.Logging.LoggingHttpMessageHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
   at Microsoft.Extensions.Http.Logging.LoggingScopeHttpMessageHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
   at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
   at Emby.Dlna.PlayTo.DlnaHttpClient.SendRequestAsync(HttpRequestMessage request, CancellationToken cancellationToken) in /home/loma/dev/jellyfin/Emby.Dlna/PlayTo/DlnaHttpClient.cs:line 47
   at Emby.Dlna.PlayTo.Device.GetTransportInfo(TransportCommands avCommands, CancellationToken cancellationToken) in /home/loma/dev/jellyfin/Emby.Dlna/PlayTo/Device.cs:line 705
   at Emby.Dlna.PlayTo.Device.TimerCallback(Object sender) in /home/loma/dev/jellyfin/Emby.Dlna/PlayTo/Device.cs:line 521
```
2022-08-22 19:01:19 +02:00
Bond-009 33611614ed
Merge pull request #7433 from Bond-009/ssdphttpclient 2022-08-22 17:52:19 +02:00
luz paz 9ec2870b10 Fix various typos
Found via `codespell -q 3 -S ./Emby.Server.Implementations/Localization -L allready,doesnt,inh,receivedfrom,whoknows`
2022-08-15 06:48:34 -04:00
Shadowghost cea8e8bbf6 Fix logging output 2022-07-21 19:17:44 +02:00
Shadowghost f6e41269d9 Enforce interface bindings on SSDP, add Loopback to LAN if no LAN defined 2022-07-21 09:26:18 +02:00
Shadowghost 2281b8c997 Move away from using Collection, simplify code, add proper ordering 2022-07-20 14:29:30 +02:00
Shadowghost 2043a33f81 Small cleanup and logging fix 2022-07-20 09:50:41 +02:00
Shadowghost 066db8ac7f Migrate NetworkManager and Tests to native .NET IP objects 2022-07-19 21:28:04 +02:00
Cody Robibero a99e87a00c Merge pull request #7954 from cvium/fix_7953_dlna_url
(cherry picked from commit 2c0c3eb3ee)
Signed-off-by: Joshua Boniface <joshua@boniface.me>
2022-06-29 01:26:15 -04:00
Cody Robibero 38102499cb Merge pull request #7947 from nyanmisaka/video-range-condition
(cherry picked from commit f1d56aa5ce)
Signed-off-by: Joshua Boniface <joshua@boniface.me>
2022-06-29 01:26:14 -04:00
Bond_009 5b4e14940e Fix format string 2022-06-14 16:43:48 +02:00
Joshua M. Boniface 0e1a41f7e9 Merge pull request #7868 from cvium/disable_dlna
(cherry picked from commit aa0f6cb5eb)
Signed-off-by: crobibero <cody@robibe.ro>
2022-06-10 23:43:18 -04:00
Bond-009 2b1a915ead Merge pull request #7604 from Jellifi007/fixes-diactritics
Co-authored-by: Cody Robibero <cody@robibe.ro>
(cherry picked from commit 8d1d973438)
Signed-off-by: crobibero <cody@robibe.ro>
2022-05-20 18:30:56 -04:00
dependabot[bot] 812841d01e
Bump StyleCop.Analyzers from 1.2.0-beta.406 to 1.2.0-beta.435 (#7726)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-09 15:24:09 +02:00
InvoxiPlayGames dc8fdb154a get DLNA profile in XML request, correctly format UUID 2022-03-22 16:04:55 +00:00
dependabot[bot] dde984bd0e
Bump StyleCop.Analyzers from 1.2.0-beta.376 to 1.2.0-beta.406
Bumps [StyleCop.Analyzers](https://github.com/DotNetAnalyzers/StyleCopAnalyzers) from 1.2.0-beta.376 to 1.2.0-beta.406.
- [Release notes](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/releases)
- [Commits](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/compare/1.2.0-beta.376...1.2.0-beta.406)

---
updated-dependencies:
- dependency-name: StyleCop.Analyzers
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-21 12:22:11 +00:00
Bond_009 09e897d372 Clean up DLNA profile code 2022-03-19 00:45:43 +01:00
Claus Vium 53209830e7
Merge pull request #7346 from Bond-009/guid
Optimize Guid comparisons
2022-03-11 08:15:12 +01:00
Bond_009 cafeedcadf Rework SsdpHttpClient 2022-03-08 23:00:43 +01:00
Bond-009 03f1eff21a
Implement TransportState according to spec (#7426) 2022-03-08 16:12:03 +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 b6489e73ab
Merge pull request #7241 from Bond-009/async5 2022-02-06 15:25:48 -07:00
Bond_009 e7be01d7a5 Flush to disk async where possible 2022-01-22 23:36:42 +01:00
Bond_009 2dcb2f8a9f Ban the usage of Task.Result
If the calling function can't be made async easily you can still use
.GetAwaiter().GetResult(), which is way easier to find in the future
2022-01-22 16:48:31 +01:00
Cody Robibero a60cb280a3 Properly populate QueryResult 2022-01-20 08:53:06 -07:00
Bond_009 05836c8cd3 Fix warning SA1414 and CA1849 2022-01-10 10:57:32 +01:00
Bond_009 77c615ba42 Error on SA1316 2022-01-05 10:58:57 +01:00
ignacio laborde 8952819494 remove unnecessary ToList in DlnaManager 2022-01-03 15:31:08 -03:00
Bond_009 ea8f40e84a More cleanup 2021-12-27 14:20:05 +00:00
Bond_009 cbfa355e31 Update StyleCop 2021-12-24 18:28:27 +01:00
cvium b880dc8a4a Use our own Contains extension 2021-12-20 13:31:07 +01:00
Cody Robibero 32629cd7da Use BaseItemKind where possible 2021-12-12 06:11:27 -07:00
cvium 0485ff1899 Create a store key constant for network 2021-11-24 13:42:14 +01:00
Cody Robibero 5b7e8a27fb Fix creating DLNA profiles 2021-11-21 11:48:30 -07:00
cvium 93fd1c7075 Fix 2021-11-16 12:27:27 +01:00
cvium b50c3852ef Remove unused dependencies 2021-11-16 12:24:17 +01:00
Marius Luca a774d1fa10 - flush the XmlWriter before calling the StringBuilder ToString() method 2021-11-14 20:46:17 +02:00
Cody Robibero 4c88bf3fe3
Merge pull request #6808 from cvium/dlnope_never_again 2021-11-09 20:34:09 -07:00
cvium efa76c0b63 Remove unused field 2021-11-09 23:17:27 +01:00
cvium 3f09fb8d70 length 2021-11-09 22:45:34 +01:00
Bond_009 1d19a5be61 Fix some warnings
down to 580
2021-11-09 22:29:33 +01:00
Claus Vium c3523e7cf7
Merge pull request #5905 from BaronGreenback/TVFix
Fix for Livetv and DLNA when bind interfaces specified.
2021-11-09 19:53:21 +01:00
cvium a90735bc5a Last small fixes 2021-11-09 19:44:21 +01:00
cvium 37a04d5dbf Reduce indentation 2021-11-09 19:40:36 +01:00
cvium e1f7f1405e Use GetOrderBy in GetChildrenSorted 2021-11-09 19:33:15 +01:00
cvium 6985a4f255 Fix SortCriteria and refactor SetSorting 2021-11-09 19:31:54 +01:00
cvium 53c16c2342 Build an array instead of using LINQ 2021-11-09 19:22:16 +01:00
cvium c1c77c8762 comments 2021-11-09 19:19:48 +01:00
cvium 2b02b53fc0 Merge branch 'master' into dlnope_never_again 2021-11-09 16:00:14 +01:00
cvium 996500b2f8 review stuff 2021-11-09 15:57:39 +01:00
Claus Vium 66912deb84
Apply suggestions from code review 2021-11-09 14:47:42 +01:00
Claus Vium ac06022e0f
Update Emby.Dlna/ContentDirectory/ControlHandler.cs 2021-11-09 14:40:51 +01:00
cvium a236f52c31 Simplify and reduce LOC in ControlHandler 2021-11-08 23:13:12 +01:00
Cody Robibero 40045d2147 Update to full dotnet 6 2021-11-08 09:40:12 -07:00
cvium 82e6a21f3b Use the new method in DLNA 2021-11-08 10:58:04 +01:00
LinFor 5c69d110cc Samsung DLNA fixes 2021-11-08 11:24:33 +03:00
Cody Robibero 2f6437a987 Use correct id when finding existing dlna profile 2021-10-31 08:49:24 -06:00
Cody Robibero 2b10251b32 Update to dotnet6.rc2 2021-10-12 18:31:58 -06:00
Claus Vium 1156699481
Merge pull request #6657 from Bond-009/dotnetbug 2021-10-09 12:19:44 +02:00
Claus Vium b16e6621b3
Merge pull request #6663 from crobibero/dotnet-6-rc1
Reference dotnet6-rc1 packages
2021-10-08 16:06:15 +02:00
Bond_009 f7ae3c6a85 Set AnalysisMode to AllEnabledByDefault 2021-10-06 11:39:54 +02:00
Cody Robibero 017380f1dd Reference dotnet6-rc1 packages 2021-10-04 07:43:40 -06:00
Bond_009 9af16fcb6c Remove workaround for dotnet/runtime#42790 2021-10-03 19:52:38 +02:00
Cody Robibero 9234e5bf80 Remove all instances of en-US culture 2021-09-26 09:11:25 -06:00
Bond_009 f31224fa8f Remove sync FileStream hack 2021-09-25 19:44:40 +02:00
Bond_009 4d1d9f23d5 Use new Enum.TryParse(ReadOnlySpan<char>) overload 2021-09-24 20:15:46 +02:00
Bond_009 13fbfe6091 Target net6.0 2021-09-24 20:15:46 +02:00
Bond_009 ec45808275 SsdpHttpClient: Ensure successful status code before reading response 2021-09-21 22:32:14 +02:00
Bond_009 a6d1e542e6 Reduce allocations 2021-09-19 20:53:31 +02:00
Claus Vium 74fef6c05b
Merge pull request #6177 from Bond-009/async
Use async FileStreams where it makes sense
2021-09-06 13:55:34 +02:00
Cody Robibero ff9d14c811 Merge remote-tracking branch 'upstream/master' into authenticationdb-efcore 2021-09-03 11:01:55 -06:00
Bond_009 e3dac4fda2 Use async FileStreams where it makes sense 2021-09-02 14:02:04 +02:00
Cody Robibero cba07b1ca6 Remove more and more warnings 2021-08-28 16:32:50 -06:00
Bond-009 fc9f45b42d
Merge pull request #6381 from Bond-009/nullable5
Enable nullable for DlnaManager
2021-08-15 14:14:33 +02:00
Patrick Barron 45f478f63e Merge branch 'master' into authenticationdb-efcore
# Conflicts:
#	Jellyfin.Server.Implementations/Security/AuthorizationContext.cs
#	MediaBrowser.Controller/Library/IUserManager.cs
#	MediaBrowser.Controller/Security/IAuthenticationRepository.cs
#	MediaBrowser.Controller/Session/ISessionManager.cs
2021-08-13 21:08:24 -04:00
Bond-009 e5a29824e5
Merge branch 'master' into minor15 2021-08-13 00:33:18 +02:00
Bond_009 4e9fbabef2 Enable nullable for DlnaManager 2021-08-03 17:54:55 +02:00
Bond-009 00c90cfb21
Merge pull request #6354 from Bond-009/nullable4
Enable nullable in more files
2021-07-30 09:49:40 +02:00
Rich Lander c07e83fdf8
Invert code and style analysis configuration (#6334)
Co-authored-by: Bond-009 <bond.009@outlook.com>
2021-07-30 09:49:28 +02:00
Bond_009 501de7b6dc Enable nullable in more files 2021-07-26 23:02:32 +02:00
Bond_009 8528e9bddb Improve platform checks 2021-07-12 20:21:51 +02:00