Jump to content

Live No on web , Yes on Android


ernstgot

Recommended Posts

ernstgot

i do get the guide in the webpage but as soon as I press play nothing happens ServerWMC doesn't so a request coming in.  But when I try in Android client it plays just fine.  Yes I am trying the same channel in both.

Link to comment
Share on other sites

Just set up ServerWMC and seeing the same issue. Working on Android client, the play button does not work in the web interface.

 

Not familiar with the code base but doing a little poking around...

 

error is being thrown in the translateItemsForPlayback() function:

function translateItemsForPlayback(items) {
    var deferred = $.Deferred();
    var firstItem = items[0];
    var promise;
    if (firstItem.Type == "Playlist") {
        promise = self.getItemsForPlayback({
            ParentId: firstItem.Id,
        });
    } else if (firstItem.Type == "MusicArtist") {
        promise = self.getItemsForPlayback({
            Artists: firstItem.Name,
            Filters: "IsNotFolder",
            Recursive: true,
            SortBy: "SortName",
            MediaTypes: "Audio"
        });
    } else if (firstItem.Type == "MusicGenre") {
        promise = self.getItemsForPlayback({
            Genres: firstItem.Name,
            Filters: "IsNotFolder",
            Recursive: true,
            SortBy: "SortName",
            MediaTypes: "Audio"
        });
    } else if (firstItem.IsFolder) {
        promise = self.getItemsForPlayback({
            ParentId: firstItem.Id,
            Filters: "IsNotFolder",
            Recursive: true,
            SortBy: "SortName",
            MediaTypes: "Audio,Video"
        });
    }
    if (promise) {
        promise.done(function(result) {
            deferred.resolveWith(null, [result.Items]);
        });
    } else {
        deferred.resolveWith(null, [items]);
    }
    return deferred.promise();
}

the items[] array has nothing in it (length === 0) and so firstItem is undefined.

 

It looks like the empty array is coming from this call:

http://#ip.#ip.#ip.#ip:8096/Users/[::userId]/Items?Ids=931c386a25a634ef5a0aaaec6ec0268f&Limit=100&Fields=MediaSources%2CChapters&ExcludeLocationTypes=Virtual

With this being the response:

{"Items":[],"TotalRecordCount":0}

Just throwing out relevant information...

 

Professional web developer here, very interested in finding ways to contribute to this awesome project. Let me know if there is any way I can help resolve this!

Link to comment
Share on other sites

Hey guys, did some more digging since I want this to work :)

 

The issue seems to be the LocationType being incorrectly set to "Virtual" on Live TV items.

 

Tested by editing a method from this file (In browser tools): https://github.com/MediaBrowser/MediaBrowser/blob/724cba14656bf56677e502c50d29e545ac439c5d/MediaBrowser.WebDashboard/dashboard-ui/scripts/mediaplayer.js

 

The call returning the empty Items[] array is coming from this method:

self.getItemsForPlayback = function (query) {

  var userId = Dashboard.getCurrentUserId();

  query.Limit = query.Limit || 100;
  query.Fields = getItemFields;
  query.ExcludeLocationTypes = "Virtual";

  return ApiClient.getItems(userId, query);
};

If I comment out the line that sets query.ExcludeLocationTypes = "Virtual", the play button starts working. That tells me that the Live TV item I am trying to stream has LocationType set to Virtual.

 

Looking at the docs here: https://github.com/MediaBrowser/MediaBrowser/wiki/Item-Information it says:

 

 

 

FileSystem items are items the user has physical copies of on their file system. Remote items point to a url address. Virtual items entirely virtual and are not playable (e.g. missing episodes).

 

That seems to indicate that the LiveTV items should have LocationType set to "Remote", rather than "Virtual". Would that be correct?

 

How can we get this remedied?

  • Like 1
Link to comment
Share on other sites

Sorry for being a rookie but I have the same issue.  Can someone point me in the correct direction to fix?  Dev Branch? Instructions would be great.  Thanks!

Link to comment
Share on other sites

flexage

@@Teddy - From one pro web developer to another I would just like to say "nice spot", I also would've investigated this myself but thought I'd check the forums for known issues first.

 

Welcome to the community ;)

Link to comment
Share on other sites

Just as a note to anyone with this issue who is twiddling their thumbs until the next release.

 

If there is something you want to watch, you can click record, go to the "Recordings" section and under active recordings open the show, and then click play. When you are done you can go cancel the recording if it isn't done, and delete what was recorded. 

 

It isn't ideal, but that will at least allow you to use Live TV functionality in the web interface until the next version comes out.

Link to comment
Share on other sites

jhevener

Hi all,

 

Just reporting that this issue has been fixed for me with Dev Build Version 3.0.5540.3710. I usually just stick with the betas but decided to check it out and it works just fine. Thanks again for your initiative @@TedA

Edited by jhevener
Link to comment
Share on other sites

jhevener

Luke made the fix. Glad it's working!

Yeah but you dug into the problem and he fixed based on your findings. Much abliged to you and of course, @@Luke. Now I can watch my local news while at work! :)

Edited by jhevener
Link to comment
Share on other sites

  • 2 weeks later...
krustyreturns

maybe you have a different problem.  For starters, post the serverwmc log after a failed live stream attempt (see debug tab in serverwmc).

Link to comment
Share on other sites

jhevener

3.0.5518.7 is the latest beta.

@@CBers That's the one I'm referring to. This fix has been on the last few dev updates and I was assuming it would go in on this latest beta 3.0.5518.7.

Edited by jhevener
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...