aboutsummaryrefslogtreecommitdiff
path: root/Emby.Dlna/ContentDirectory
diff options
context:
space:
mode:
authorDavid <daullmer@gmail.com>2020-08-20 17:01:04 +0200
committerDavid <daullmer@gmail.com>2020-08-20 17:08:33 +0200
commitca2b36bdb05c3757378ea0e8a4551befc2668bff (patch)
tree5255a70e0f2708645654aecec5d2bbb3cb2eea6e /Emby.Dlna/ContentDirectory
parent250e351613e0eed7977c8cdad4a9078927458feb (diff)
Reduce warnings in Emby.Dlna
Diffstat (limited to 'Emby.Dlna/ContentDirectory')
-rw-r--r--Emby.Dlna/ContentDirectory/ContentDirectoryXmlBuilder.cs5
-rw-r--r--Emby.Dlna/ContentDirectory/ControlHandler.cs6
2 files changed, 6 insertions, 5 deletions
diff --git a/Emby.Dlna/ContentDirectory/ContentDirectoryXmlBuilder.cs b/Emby.Dlna/ContentDirectory/ContentDirectoryXmlBuilder.cs
index 6db4d7cb6..743dcc516 100644
--- a/Emby.Dlna/ContentDirectory/ContentDirectoryXmlBuilder.cs
+++ b/Emby.Dlna/ContentDirectory/ContentDirectoryXmlBuilder.cs
@@ -10,7 +10,8 @@ namespace Emby.Dlna.ContentDirectory
{
public string GetXml()
{
- return new ServiceXmlBuilder().GetXml(new ServiceActionListBuilder().GetActions(),
+ return new ServiceXmlBuilder().GetXml(
+ new ServiceActionListBuilder().GetActions(),
GetStateVariables());
}
@@ -101,7 +102,7 @@ namespace Emby.Dlna.ContentDirectory
DataType = "string",
SendsEvents = false,
- AllowedValues = new string[]
+ AllowedValues = new[]
{
"BrowseMetadata",
"BrowseDirectChildren"
diff --git a/Emby.Dlna/ContentDirectory/ControlHandler.cs b/Emby.Dlna/ContentDirectory/ControlHandler.cs
index 00821bf78..72f2e7dd4 100644
--- a/Emby.Dlna/ContentDirectory/ControlHandler.cs
+++ b/Emby.Dlna/ContentDirectory/ControlHandler.cs
@@ -253,7 +253,7 @@ namespace Emby.Dlna.ContentDirectory
var id = sparams["ObjectID"];
var flag = sparams["BrowseFlag"];
var filter = new Filter(GetValueOrDefault(sparams, "Filter", "*"));
- var sortCriteria = new SortCriteria(GetValueOrDefault(sparams, "SortCriteria", ""));
+ var sortCriteria = new SortCriteria(GetValueOrDefault(sparams, "SortCriteria", string.Empty));
var provided = 0;
@@ -362,8 +362,8 @@ namespace Emby.Dlna.ContentDirectory
private void HandleSearch(XmlWriter xmlWriter, IDictionary<string, string> sparams, string deviceId)
{
- var searchCriteria = new SearchCriteria(GetValueOrDefault(sparams, "SearchCriteria", ""));
- var sortCriteria = new SortCriteria(GetValueOrDefault(sparams, "SortCriteria", ""));
+ var searchCriteria = new SearchCriteria(GetValueOrDefault(sparams, "SearchCriteria", string.Empty));
+ var sortCriteria = new SortCriteria(GetValueOrDefault(sparams, "SortCriteria", string.Empty));
var filter = new Filter(GetValueOrDefault(sparams, "Filter", "*"));
// sort example: dc:title, dc:date