NineWorlds / serenity-android

An Android client for the Plex and Emby Media Servers optimized for Television displays.
MIT License
178 stars 65 forks source link

Errors when connecting to Movies and TV #9

Closed davpel closed 11 years ago

davpel commented 11 years ago

I'm using the latest version of Serenity on a Hisense Pulse Google TV. I've entered the proper server address (confirmed by connecting to Plex web client), but when I try to browse movies I get a message indicating that Serenity is unable to communicate with the server for the reason that the elmenet Media is declared twice at line 79. When I try to browse TV shows, Serenity force closes immediately. Below are the bug files (I've redacted the machine identifier and other personal information).

From the /servers URL:

          <MediaContainer size="1">
                <Server name="myplex" host="XXX" address="192.168.2.8" port="32400" machineIdentifier="XXX" version="0.9.7.12.407-db37d6d"/>
          </MediaContainer>

From the Library/Sections URL:

        <MediaContainer size="3" allowSync="0" identifier="com.plexapp.plugins.library" mediaTagPrefix="/system/bundle/media/flags/" mediaTagVersion="1358288594" title1="Plex Library">
            <Directory art="/:/resources/movie-fanart.jpg" filters="1" refreshing="0" thumb="/:/resources/movie.png" key="1" type="movie" title="Movies" agent="com.plexapp.agents.imdb" scanner="Plex Movie Scanner" language="en" uuid="2d824c10e8dc7f3f84362a2851e041c8ea2a4140" updatedAt="1359756605" createdAt="1320001782">
                <Location path="/Volumes/USB_Storage/Movies"/>
            </Directory>
           <Directory art="/:/resources/artist-fanart.jpg" filters="1" refreshing="0" thumb="/:/resources/artist.png" key="3" type="artist" title="Music" agent="com.plexapp.agents.lastfm" scanner="Plex Music Scanner" language="en" uuid="3f5d6b0571e3a491ed03bae6595ba35afb4b064a" updatedAt="1357542503" createdAt="1357541658">
                <Location path="/Volumes/iMac/Users/XXX/Music/iTunes/iTunes Media/Music"/>
           </Directory>
           <Directory art="/:/resources/show-fanart.jpg" filters="1" refreshing="0" thumb="/:/resources/show.png" key="2" type="show" title="TV Shows" agent="com.plexapp.agents.thetvdb" scanner="Plex Series Scanner" language="en" uuid="032214e4a74e0db2d9812a21d6af3617a731de08" updatedAt="1359670205" createdAt="1320001782">
              <Location path="/Volumes/USB_Storage/TV"/>
           </Directory>
        </MediaContainer>
kingargyle commented 11 years ago

Thanks, can you give me a snapshot of the section where it contains Multiple Media elements, as I know I'm not expecting that and curious what the situation there is (Lovely that their is no DTD or Schema for this so I have to go by bug reports from users to fix these).

So if you can give me the info with the multiple elements from the following url, it'll help:

http://192.168.2.8/library/sections/1/all

Thanks for the bug report.

kingargyle commented 11 years ago

For tv shows, I need the output from:

http://192.168.2.8/library/sections/2/all

kingargyle commented 11 years ago

Pushed a fix for the multiple media elements. If we have more than one, for now we'll just grab the first one and use it. I'll keep this open while you get the TV show output. Only case it can force close would be if it gets a Null somewhere it wasn't expecting too.

davpel commented 11 years ago

Thanks. Will do as soon as I get hone later tonight. On Feb 2, 2013 7:11 PM, "David Carver" notifications@github.com wrote:

Thanks, can you give me a snapshot of the section where it contains Multiple Media elements, as I know I'm not expecting that and curious what the situation there is (Lovely that their is no DTD or Schema for this so I have to go by bug reports from users to fix these).

So if you can give me the info with the multiple elements from the following url, it'll help:

http://192.168.2.8/library/sections/1/all

Thanks for the bug report. I'll prioritize this once I have the additional information I need.

— Reply to this email directly or view it on GitHubhttps://github.com/kingargyle/plexapp-client/issues/9#issuecomment-13039831.

davpel commented 11 years ago

This XML file does not appear to have any style information associated with it. The document tree is shown below.

On Feb 2, 2013, at 7:11 PM, David Carver notifications@github.com wrote:

Thanks, can you give me a snapshot of the section where it contains Multiple Media elements, as I know I'm not expecting that and curious what the situation there is (Lovely that their is no DTD or Schema for this so I have to go by bug reports from users to fix these).

So if you can give me the info with the multiple elements from the following url, it'll help:

http://192.168.2.8/library/sections/1/all

Thanks for the bug report. I'll prioritize this once I have the additional information I need.

— Reply to this email directly or view it on GitHub.

davpel commented 11 years ago

Here is the tv shows output.

This XML file does not appear to have any style information associated with it. The document tree is shown below.

On Feb 2, 2013, at 7:13 PM, David Carver notifications@github.com wrote:

For tv shows, I need the output from:

http://192.168.2.8/library/sections/2/all

— Reply to this email directly or view it on GitHub.

kingargyle commented 11 years ago

Thanks, I think I have what I need. Also the TV Show information is generated as bad XML from the Plex Media Server. I've let the developers know about this. One of the problem entries is the "Austin City Limits" summary entry. It contains double quotes within the summary that aren't escaped. This is malformed XML. I'll clean this up and see what I can do do find where our null pointer is happening that is causing your TV show issues.

kingargyle commented 11 years ago

I've pushed a new development build that hopefully contains a fix. I put some additional null checks in place for the TV shows and movies. If you can please try out the following and let me know how things work.

http://kingargyle.github.com/googletv/serenity/alpha/Serenity-0.7.0-SNAPSHOT.apk

If that doesn't work for TV Shows. Then I'll have to add some special debugging code in so we can see where it is dying and how far it is getting in processing the information from the server.

davpel commented 11 years ago

Hey David. That seemed to do the trick. I can now access the tv and movie libraries and play the files! I had one crash after playing a movie file and then trying to back out of it, but everything else seemed to work great. They only other thing I noticed was that using the internal player, once the media started playing and the control buttons disappeared, there was no way to get them back. The only way I could pause the movie was to use the hard pause button on the remote. Clicking the mouse on the screen did not bring up the soft controls.

Regardless, thanks for all of your hard work to get this going. I really appreciate it and love the app so far.

On Feb 3, 2013, at 1:14 AM, David Carver notifications@github.com wrote:

I've pushed a new development build that hopefully contains a fix. I put some additional null checks in place for the TV shows and movies. If you can please try out the following and let me know how things work.

http://kingargyle.github.com/googletv/serenity/alpha/Serenity-0.7.0-SNAPSHOT.apk

If that doesn't work for TV Shows. Then I'll have to add some special debugging code in so we can see where it is dying and how far it is getting in processing the information from the server.

— Reply to this email directly or view it on GitHub.

kingargyle commented 11 years ago

Use the info button on the remote to bring up the on screen display and to dismiss it. I'll go ahead and release a bug fixes release that has the changes for this issue in it later today.

kingargyle commented 11 years ago

Releasing as part of 0.6.2.