Jump to content

[FR] Support auto server detect


Koleckai Silvestri

Recommended Posts

Koleckai Silvestri

Does MediaBrowser3 server have any way to broadcast its presence? I think Plex uses the Bonjour protocol which is also free, I'm sure Windows may have some equivalent. I seem to remember MBT detected my server automatically. It would be nice if XBMB3C could do this as well.

 

And I agree, an XBMC fork or better still a set of addons which configure everything for MB would be ideal. It should run a wizard either within XBMC or perhaps the wizard could be a standalone app/webpage which determines things like the server, libraries, path mapping, user prefs etc, then generates a config file to pass to the addon so nothing extra needs to be done.

 

The server will respond to "who is MediaBrowser" requests on a specific port. See: https://github.com/MediaBrowser/MediaBrowser/wiki/Locating-the-Server

 

The question is really can the XBMB3C plugin send out those requests?

Link to comment
Share on other sites

It's a udp broadcast. I know xbmc can do that. Whether such capabilities are exposed to the addons i'm not sure.

Link to comment
Share on other sites

xnappo

We have some code in place to ping for auto config.  I don't think it is fully debugged yet - mostly because typing in the server IP one time was seen as less of an issue than getting other features done.  

 

@ did some work here - may need some help testing - not sure.

 

xnappo

Link to comment
Share on other sites

xnappo

@@xnappo_

I have added server discovery and user selection.

To test delete your server settings, the discovery will trigger if the server is empty or is the default <none>.

The server will be discovered using the UDP broadcast and if it gets a response it will query the server for users and prompt for which user to use.

 

Very cool. Will play with it tonight.

 

xnappo

Link to comment
Share on other sites

xnappo

Split from 'XBMB3C vs dedicated MB client vs MBT' thread.

 

----------------

 

ecrispy, on 27 May 2014 - 1:11 PM, said:
Does MediaBrowser3 server have any way to broadcast its presence? I think Plex uses the Bonjour protocol which is also free, I'm sure Windows may have some equivalent. I seem to remember MBT detected my server automatically. It would be nice if XBMB3C could do this as well.
Edited by xnappo
Link to comment
Share on other sites

im85288

We should be able to use the UDP broadcast I guess?

 

For example as below

' Setup Broadcast message and port
    broadcastMessage = "who is MediaBrowserServer?"
    broadcastPort = 7359

    ' Setup multicast fallback
    multicast = "239.0.0.250"
    ip = multicast

    subnetRegex = CreateObject("roRegex", "((\d+)\.(\d+)\.(\d+)\.)(\d+)", "")
    addr = GetFirstIPAddress()
    if addr <> invalid then
        match = subnetRegex.Match(addr)
        if match.Count() > 0 then
            ip = match[1] + "255"
            Debug("Using broadcast address " + ip)
        end if
    end if
Link to comment
Share on other sites

xnappo

?  @ already has it working :)

 

See post 5.  I am sure the split caused confusion - sorry.

 

xnappo

Link to comment
Share on other sites

xnappo

Just tried it and it worked perfectly.

 

I think we should just add user ID matching to the server alive code, and add some thread restart code.  I can work on that this weekend.

 

Big improvement - nice work!

 

xnappo

Link to comment
Share on other sites

xnappo

Great - in that case we just need some more testing - so if you are reading this please try the latest Git with deleted server configs.

 

xnappo

Link to comment
Share on other sites

elcabong

just tried git as of this writing..  when xbmc launches i get a popup "unable to connect to host". i click ok, then proceed to launch xbmb3c from the addon menu. 

xbmb3c finds the server and i can select which user to use.  it sets the user and i can browse the media with no password required (is this the desired behavior?).  everything seems to work fine except the total movie/tv/episode counts that appear in the bottom of arctic/other skins.  the background artwork comes in fine with the covers and info, so i assume the service is running properly and cacheing the info.

 

there is no restart promt for xbmc, tho one might be needed.  after a reboot the item counts appear and all seems fine.

Link to comment
Share on other sites

Beardyname

The auto detect thing worked flawlessly :)

 

I do however have one complaint, I have this user set as hidden. But it still appeared in the list of users to choose from, is this a known bug ?

  • Like 1
Link to comment
Share on other sites

MrWebsmith

to get the newest addon do i redownload the zip or is the only current option to build from git?

 

i want to help try this and the view map thing as they address 2 major "new user" needs :)

  • Like 1
Link to comment
Share on other sites

im85288

to get the newest addon do i redownload the zip or is the only current option to build from git?

 

i want to help try this and the view map thing as they address 2 major "new user" needs :)

 

Hi, If you have the XBMB3C Addons repo installed I just pushed version 0.9.13 out with the latest from git.

  • Like 1
Link to comment
Share on other sites

elcabong

The auto detect thing worked flawlessly :)

 

I do however have one complaint, I have this user set as hidden. But it still appeared in the list of users to choose from, is this a known bug ?

 

it appears to show (and allow access to) all user accounts from the server.  can there be some checks that go in, such as setting to hidden or password protected..  someone could figure out they can just remove the settings for xbmb3c and login as someone else.

Link to comment
Share on other sites

xnappo

Sure - that is minor now that the UDP is working - that was the technical challenge.

 

xnappo

Link to comment
Share on other sites

Yes this is true for now but will be improved in the future so that you're forced to. You'll authenticate, get a token, and then that token will have to be used with every request or it'll be rejected. 

Link to comment
Share on other sites

xnappo

Nice - I tested and am marking this complete - closing out one of our oldest issues (10/28/2013) :)

 

xnappo

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

Guest
This topic is now closed to further replies.
×
×
  • Create New...