Jump to content

Devices not showing up in Play To


siddhartha

Recommended Posts

siddhartha

I was using an old dev from last September and when I recently updated, none of my TVs showed up under my Play To devices. Reading this forum, it's obvious it's happening to a lot of users. I decided to dig around and found some buggy code in DeviceDiscovery.cs. Everything works beautifully if I comment out:

if (_ssdpHandler.IgnoreMessage(args, true))

{

return;

}

I didn't have the time to dive into IgnoreMessage() so I can't offer more than this hack at the moment.

 

If anyone wants to try my fix:

 

  1. Close Emby Server
  2. Navigate to %appdata%\Emby-Server\System
  3. Rename MediaBrowser.Dlna.dll to MediaBrowser.Dlna.dll.old
  4. Download the attached file and extract into %appdata%\Emby-Server\System

 

EDIT: PLEASE NOTE THIS HAS BEEN FIXED IN THE LATEST DEV (3.0.5975.17320)

MediaBrowser.Dlna.dll.7z

Edited by siddhartha
  • Like 2
Link to comment
Share on other sites

siddhartha

One small consequence is that you can now cast to any device viewing Emby on the web interface... Fun.

Link to comment
Share on other sites

Well done! thanks for the info. I figured it was related to that. can you do a favor and try uncommenting it, then go into that Ignoremessage method and see which of the two If statements is causing it? unfortunately i can't test this myself because i haven't been able to reproduce the  problem. thanks!

Link to comment
Share on other sites

siddhartha

It's definitely the first statement causing the problem. I'll dig into it a bit more as soon as I have free time.

Link to comment
Share on other sites

siddhartha

Okay, here it goes...

 

The goal of SsdpHandler.IgnoreMessage() is to ignore SSDP messages from the server itself. The first block checks the args variable's usn against the usn of any registered device. If there is a match, the message is ignored. Based on my limited analysis and logging, what's happening is that the args variable's usn is ALWAYS the usn of the server itself, regardless of if the message originator is a TV, or a phone, etc. Therefore, the message will always be ignored.

 

Since the server has a defined field of "X-EMBY-SERVERID" and no other device does, the second statement in SsdpHandler.IgnoreMessage() will properly catch the server.

 

As an aside, I'm not sure if it's desirable behavior to be able to DLNA Play To all clients connected to the server. If two kids are browsing the Emby library, they could Play To each other's devices, interrupting one another's browsing. I'd suggest that SSDP discovery messages are also ignored for any web clients. It might be a desirable feature, however, I'm not one to decide.

 

Cheers.

Link to comment
Share on other sites

jordy

Okay, here it goes...

 

The goal of SsdpHandler.IgnoreMessage() is to ignore SSDP messages from the server itself. The first block checks the args variable's usn against the usn of any registered device. If there is a match, the message is ignored. Based on my limited analysis and logging, what's happening is that the args variable's usn is ALWAYS the usn of the server itself, regardless of if the message originator is a TV, or a phone, etc. Therefore, the message will always be ignored.

 

Since the server has a defined field of "X-EMBY-SERVERID" and no other device does, the second statement in SsdpHandler.IgnoreMessage() will properly catch the server.

 

As an aside, I'm not sure if it's desirable behavior to be able to DLNA Play To all clients connected to the server. If two kids are browsing the Emby library, they could Play To each other's devices, interrupting one another's browsing. I'd suggest that SSDP discovery messages are also ignored for any web clients. It might be a desirable feature, however, I'm not one to decide.

 

Cheers.

Perhaps have EMBY check to see if a client is active (playing something) before allowing a "play to" request to run...

Link to comment
Share on other sites

Quiffster

siddhartha...

Ever since Dec/Jan time - DLNA has either not worked reliably, or DLNA Play to not worked at all any more.  The kids are driving me crazy over this...

I'll download the latest Dev, and if you've fixed it you're getting a beer... :-)

 

Steve.

Link to comment
Share on other sites

LqHnyBear

Okay, here it goes...

 

The goal of SsdpHandler.IgnoreMessage() is to ignore SSDP messages from the server itself. The first block checks the args variable's usn against the usn of any registered device. If there is a match, the message is ignored. Based on my limited analysis and logging, what's happening is that the args variable's usn is ALWAYS the usn of the server itself, regardless of if the message originator is a TV, or a phone, etc. Therefore, the message will always be ignored.

 

Since the server has a defined field of "X-EMBY-SERVERID" and no other device does, the second statement in SsdpHandler.IgnoreMessage() will properly catch the server.

 

As an aside, I'm not sure if it's desirable behavior to be able to DLNA Play To all clients connected to the server. If two kids are browsing the Emby library, they could Play To each other's devices, interrupting one another's browsing. I'd suggest that SSDP discovery messages are also ignored for any web clients. It might be a desirable feature, however, I'm not one to decide.

 

Cheers.

 

I wouldn't download the DEV I'd just get the beta. It's working in the beta fine.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...