Jump to content

Latest beta server: Live TV options missing


Recommended Posts

Posted

I just noticed this on the latest beta, The stream options and group select are blank. It still holds the settings from before but on a new install you can't select the direct stream or any TV groups you made.

Posted

where are these settings?

Posted (edited)

They are in the plugin settings under Streaming Options and Channel Options. Also, only in the plugin settings there's the spinning circle there all the time.

 

I've looked on 2 Windows 10 PC's with the latest beta and they are both the same.

 

EDIT: I've checked this from other browsers now just to eliminate Chrome. I checked from Safari too, with the same results on the plugin. At first I thought it was keeping the original settings but it's not. It looks like it,s gone back to the all channels group from Mediaportal.

Edited by jds828
pünktchen
Posted

Good catch @@jds828

@@Luke is there more to be done than

"If you are using ApiClient methods, you will now receive native promises instead of jQuery deferred objects. This change is very simple - you need to change your .done(fn) and .fail(fn) callbacks to use .then(fn, fn)."

to work with latest Emby versions? If yes, i need your help with this!

Posted

check the chrome debugger. are there any errors?

pünktchen
Posted (edited)

check the chrome debugger. are there any errors?

Yes, there is:

"Uncaught (in promise) TypeError: $.ajax is not a function"

function loadSelects(config, page) {
                // load in the profiles
                $.ajax({
                    type: "GET",
                    url: ApiClient.getUrl("MediaPortalPlugin/Profiles"),
                    dataType: "json"
                }).then(function (profiles) {
                    $('#selectProfile', page).html(profiles.map(function (profile) {
                        var selectedText = profile == config.StreamingProfileName ? " selected" : "";
                        return '<option value="' + profile + '"' + selectedText + '>' + profile + '</option>';
                    })).selectmenu('refresh').trigger('change');
                });

                $.ajax({
                    type: "GET",
                    url: ApiClient.getUrl("MediaPortalPlugin/ChannelGroups"),
                    dataType: "json"
                }).then(function (groups) {
                    $('#selectChannelGroup', page).html(groups.map(function (group) {
                        var selectedText = group.Id == config.DefaultChannelGroup ? " selected" : "";
                        return '<option value="' + group.Id + '"' + selectedText + '>' + group.GroupName + '</option>';
                    })).selectmenu('refresh').trigger('change');
                });

                $.ajax({
                    type: "GET",
                    url: ApiClient.getUrl("MediaPortalPlugin/ChannelSortOptions"),
                    dataType: "json"
                }).then(function (options) {
                    $('#selectChannelSortOption', page).html(options.map(function (option) {
                        var selectedText = option.Id == config.DefaultChannelSortOrder ? " selected" : "";
                        return '<option value="' + option.Id + '"' + selectedText + '>' + option.Description + '</option>';
                    })).selectmenu('refresh').trigger('change');
                });
            }
Edited by pünktchen
Posted

I've had to manually edit the plugin xml file to get things back to a usable live TV. It will probably get over written at some point but for now it's ok.

Posted

I was hoping for a fix in the latest beta server but it's still the same. It was only reported a day or so before the beta so maybe next time.

Posted

Thank you for testing this pre-release version of the server.

Posted (edited)

I updated to the latest beta this morning and the live TV plugin is now showing all the options. It does say that it couldn't connect to Mediaportal. I have authentication on mine and double checked all the settings which are correct. Despite the warning, the plugin is connecting to the right TV group, collecting EPG data and playing TV ok..

Edited by jds828
pünktchen
Posted

I updated to the latest beta this morning and the live TV plugin is now showing all the options. It does say that it couldn't connect to Mediaportal. I have authentication on mine and double checked all the settings which are correct. Despite the warning, the plugin is connecting to the right TV group, collecting EPG data and playing TV ok..

 

Maybe @@Luke can have another look at this?

This is the javascript code to check the plugin connection to the backend tv server:

function TestConnection() {
    var result = false;

    $.ajax({
        type: "GET",
        url: ApiClient.getUrl("MediaPortalPlugin/TestConnection"),
        dataType: "json",
        async: false
    }).then(function (ajaxResult) {
        result = ajaxResult;
    });

    if (!result) {
        $("#connectionTestResult").text("Unable to connect to MP, please review your connection settings before continuing");
        $("#connectionTestResult").css({ 'color': 'red' });
    } else {
        $("#connectionTestResult").text("Successfully connected");
        $("#connectionTestResult").css({ 'color': 'green' });
    };

    $("#connectionTestResult").show();

    return result;
}

The url by this code is correctly generated at http://127.0.0.1:8096/emby/MediaPortalPlugin/TestConnection

and returns "true" for me. But somehow the "ajaxResult" function doesn't seem to be evaluated.

Posted

the ajax method is asyncrhonous. the way you've written it, the code down below will always have a null result. that's what the .then callback is for, that's when you can utilize the result

pünktchen
Posted

the ajax method is asyncrhonous. the way you've written it, the code down below will always have a null result. that's what the .then callback is for, that's when you can utilize the result

 

The ajax code is still from @ChubbyArse ;)

Interestingly it was working until recently. Let's see what happens if i remove the asynchronous call.

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...