Skip to content

Commit

Permalink
Update SWYH UpnP device version
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastienwarin committed Nov 15, 2019
1 parent ef23951 commit 2a07bbc
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions SWYH/UPnP/SwyhDevice.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ namespace SWYH.UPnP
using SWYH.Audio;
using System;
using System.Collections.Concurrent;
using System.Diagnostics;
using System.Reflection;
using System.Threading;
using System.Threading.Tasks;

Expand All @@ -50,14 +52,17 @@ public SwyhDevice()
{
this.Device = UPnPDevice.CreateRootDevice(1800, 1.0, "\\");

this.Device.FriendlyName = "Stream What You Hear (" + Environment.MachineName + "):"; //Environment.MachineName + ": Stream What You Hear";
this.Device.Manufacturer = "Sebastien.Warin.fr";
this.Device.FriendlyName = "Stream What You Hear (" + Environment.MachineName + "):";
this.Device.Manufacturer = "Sebastien.warin.fr";
this.Device.ManufacturerURL = "http://sebastien.warin.fr";
this.Device.ModelURL = new Uri("http://www.streamwhatyouhear.com");
this.Device.ModelName = "Windows Media Connect SWYH"; //"Stream What You Hear";
this.Device.ModelDescription = "Stream What You Hear (SWYH) is a Windows application to stream the sound from your PC to an UPnP / DLNA device";
this.Device.ModelNumber = "1.4";
this.Device.SerialNumber = "SWYH_UPNP_14";

FileVersionInfo fileVersion = FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location);
this.Device.ModelNumber = string.Format("{0}.{1}", fileVersion.ProductMajorPart, fileVersion.ProductMinorPart);
this.Device.SerialNumber = string.Format("SWYH_UPNP_{0}{1}", fileVersion.ProductMajorPart, fileVersion.ProductMinorPart);

this.Device.HasPresentation = true;
this.Device.PresentationURL = "about/swyh.html";
this.Device.DeviceURN = "urn:schemas-upnp-org:device:MediaServer:1";
Expand Down

0 comments on commit 2a07bbc

Please sign in to comment.