Skip to content

Commit 806fd39

Browse files
committed
Merge branch 'main' of https://github.com/SteeBono/airplayreceiver into main
2 parents 2da647b + 1e9a60e commit 806fd39

4 files changed

Lines changed: 7 additions & 6 deletions

File tree

AirPlay/DMapTagged/DMapTagged.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -962,8 +962,8 @@ public class ContentTypeItem
962962
},
963963
{
964964
"mtco",
965-
new ContentTypeItem { Description = "",
966-
Name = "dmap.specifiedtotalcount number of items in response to a request",
965+
new ContentTypeItem { Description = "number of items in response to a request",
966+
Name = "dmap.specifiedtotalcount",
967967
Type = "int" }
968968
},
969969
{

AirPlay/Listeners/Bases/BaseTcpListener.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,9 @@ private async Task ReadFormattedAsync(TcpClient client, NetworkStream stream, Ca
116116
try
117117
{
118118
var buffer = new byte[1024];
119-
retBytes += stream.Read(buffer, 0, buffer.Length);
120-
raw += string.Join(string.Empty, buffer.Take(retBytes).Select(b => b.ToString("X2")));
119+
var readCount = stream.Read(buffer, 0, buffer.Length);
120+
retBytes += readCount;
121+
raw += string.Join(string.Empty, buffer.Take(readCount).Select(b => b.ToString("X2")));
121122

122123
// Wait for other possible data
123124
await Task.Delay(10);

AirPlay/Models/TcpListeners/Header.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ private List<string> ResolveValues(string hex)
6868

6969
foreach (var val in vals)
7070
{
71-
var bytes = hex.HexToBytes();
71+
var bytes = val.HexToBytes();
7272
var hVal = Encoding.ASCII.GetString(bytes).Trim();
7373
_values.Add(hVal);
7474
}

AirPlay/Plist/BinaryPlistReader.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ public IDictionary ReadObject(Stream stream)
174174
{
175175
using (Stream stream = File.OpenRead(path))
176176
{
177-
return this.ReadObject<T>(path);
177+
return this.ReadObject<T>(stream);
178178
}
179179
}
180180

0 commit comments

Comments
 (0)