bennettpeter / android-MythTV-Leanfront

:tv: MythTV Android TV frontend
GNU General Public License v3.0
45 stars 9 forks source link

Playback issues: file length #58

Closed dheian closed 1 year ago

dheian commented 1 year ago

Installed mythtv 32 today as well as 20230207-leanfront-release-v0-415-g41bf893.apk on my Chromecast with Google TV.

The computer frontend is able to play recordings, but when I try to play via leanfront I get an error message about not being able to read the file length. Any easy first steps to debug the issue?

Thanks.

bennettpeter commented 1 year ago

Does leanfront display the list of recordings and only fail when you try to play one?

Does it fail on all recordings or only on certain ones?

You can try capturing a log as follows. Before the error happens:

adb connect ip-address-of-android
adb logcat | tee android.log 

After the error ctrl-c and save the android.log file

adb disconnect
bennettpeter commented 1 year ago

Also, make sure you are using port 6744 in the leanfront setup.

dheian commented 1 year ago

The install had it at 6544. Changed it just now to 6744.

Yes, it displays the list of recordings but fails at trying to play. Fails on all recordings.

On February 17, 2023 10:19:01 AM EST, Peter Bennett @.***> wrote:

Also, make sure you are using port 6744 in the leanfront setup.

-- Reply to this email directly or view it on GitHub: https://github.com/bennettpeter/android-MythTV-Leanfront/issues/58#issuecomment-1434793572 You are receiving this because you authored the thread.

Message ID: @.***>

dheian commented 1 year ago

Wondering if this is the issue. The myth box has a frontend so the address n the config is 127.0.0.1. I'm assuming this is saying the Chromecast is trying to find the file on localhost instead of the computer's actual address?

Weird though, it is displaying artwork.

02-17 17:24:56.777 8724 8762 D lfe : AsyncBackendCall URL: http://127.0.0.1:6744/Content/GetFile?StorageGroup=Default&FileName=/11701_20230217213000.ts 02-17 17:24:56.786 3648 3648 I android.hardware.power-service.libperfmgr: Power setBoost: INTERACTION duration: 0 02-17 17:24:56.787 8724 8762 W System.err: java.net.ConnectException: Failed to connect to /127.0.0.1:6744 02-17 17:24:57.892 8724 8762 D lfe : XmlNode URL: http://192.168.0.38:6744/Dvr/GetRecordedCommBreak?RecordedId=74&OffsetType=Duration 02-17 17:24:57.916 8724 8762 D lfe : XmlNode Response: 200 OK 02-17 17:24:57.921 8724 8762 I lfe : CommBreakTable CommBreakTable size:4 02-17 17:24:58.026

On 2023-02-17 09:54, Peter Bennett wrote:

Does leanfront display the list of recordings and only fail when you try to play one?

Does it fail on all recordings or only on certain ones?

You can try capturing a log as follows. Before the error happens:

adb connect ip-address-of-android adb logcat | tee android.log

After the error ctrl-c and save the android.log file

adb disconnect

-- Reply to this email directly, view it on GitHub [1], or unsubscribe [2]. You are receiving this because you authored the thread.Message ID: @.***>

Links:

[1] https://github.com/bennettpeter/android-MythTV-Leanfront/issues/58#issuecomment-1434758311 [2] https://github.com/notifications/unsubscribe-auth/AAIGOHZ643R5VFNLDMZCIKLWX6GL3ANCNFSM6AAAAAAU67WVFQ

-- Ian Evans Executive Producer DigitalHit.com

bennettpeter commented 1 year ago

In mythtv-setup on the backend, General -> Host Address backend setup -> primary ip address / dns name you have to use an actual external ip address of the machine, and that must match the ip address you put into leanfront. 127.0.0.1 or localhost will not work.

If you do not have these settings correct some things work and others don't.

dheian commented 1 year ago

IMG_20230217_212424 I changed the primary ip address to the machine's address in the network. It's the same address in leanfront. Restarted the backend, cleared the cache for leanfront and I still got the file length error.

You mentioned port 6744. The default showing in mythtv-setup is 6544. Is that an issue?

Thanks for your help. The app looks great and I can't wait to fix whatever blunder I've made. ☺

Note: I changed the leanfront to 6544 and it worked. But the preferred 6744 still doesn't.

On February 17, 2023 8:04:14 PM EST, Peter Bennett @.***> wrote:

In mythtv-setup on the backend, General -> Host Address backend setup -> primary ip address / dns name you have to use an actual external ip address of the machine, and that must match the ip address you put into leanfront. 127.0.0.1 or localhost will not work.

If you do not have these settings correct some things work and others don't.

-- Reply to this email directly or view it on GitHub: https://github.com/bennettpeter/android-MythTV-Leanfront/issues/58#issuecomment-1435434274 You are receiving this because you authored the thread.

Message ID: @.***>

bennettpeter commented 1 year ago

In mythtv setup leave the port as 6544. 6744 is a new port that is 200 more than the mythtv status port. 6544 is deprecated, new development only takes place on the port 6744 code. Some features are missing for the port 6544 code, such as "last played position" so those will not work unless you use port 6744.

If 6744 still does not work, get another log listing. Perhaps there is another error. Is it the same length error message?

dheian commented 1 year ago

Yes, it's the same error message. I'll try and get a log this weekend and will report back.

On February 18, 2023 9:12:54 AM EST, Peter Bennett @.***> wrote:

In mythtv setup leave the port as 6544. 6744 is a new port that is 200 more than the mythtv status port. 6544 is deprecated, new development only takes place on the port 6744 code. Some features are missing for the port 6544 code, such as "last played position" so those will not work unless you use port 6744.

If 6744 still does not work, get another log listing. Perhaps there is another error. Is it the same length error message?

-- Reply to this email directly or view it on GitHub: https://github.com/bennettpeter/android-MythTV-Leanfront/issues/58#issuecomment-1435679841 You are receiving this because you authored the thread.

Message ID: @.***>

bennettpeter commented 1 year ago

Note: You may have to refresh with the refresh icon in the last row of leanfront after changing your MythTV setting.

dheian commented 1 year ago

Okay...so as I mentioned last night, got it working on 6544 and was going to do the log after changing it to 6744.

I changed it to 6744, refreshed...and now it was working.

When I changed the ip in mythtv setup yesterday and refreshed it didn't work on 6744. Then I got it working on 6544. Changed to 6744 and it worked.

Noticed this on the MythTV list from James Abernathy:

"After playing with port 6544 awhile, I went back to 6744. This time it's playing normally. Not spinning"

Either way it's working and looks great. Thanks for your help and for leanfront. :-)

On 2023-02-18 12:07, Peter Bennett wrote:

Note: You may have to refresh with the refresh icon in the last row of leanfront after changing your MythTV setting.

-- Reply to this email directly, view it on GitHub [1], or unsubscribe [2]. You are receiving this because you authored the thread.Message ID: @.***>

Links:

[1] https://github.com/bennettpeter/android-MythTV-Leanfront/issues/58#issuecomment-1435718791 [2] https://github.com/notifications/unsubscribe-auth/AAIGOH2O4WWNECCGE3ITOFTWYD6VVANCNFSM6AAAAAAU67WVFQ

bennettpeter commented 1 year ago

I think you have found a bug. leanfront caches the ip address of each backend. It would have cached 127.0.0.1 as your backend ip address. This cache is in memory and it is cleared if you change the leanfront settings, but it is not cleared by a refresh. So after changing your backend ip address setting and refreshing, leanfront would have still used 127.0.0.1 as the backend ip address. When you changed your port in leanfront it would have cleared that cache.

I need to make a change so that it also clears that cache when doing a refresh. I am leaving this issue open until that is fixed.

dheian commented 1 year ago

Glad I helped, if even inadvertently. Can't wait to explore more.

Thanks again.

On February 18, 2023 4:01:26 PM EST, Peter Bennett @.***> wrote:

I think you have found a bug. leanfront caches the ip address of each backend. It would have cached 127.0.0.1 as your backend ip address. This cache is in memory and it is cleared if you change the leanfront settings, but it is not cleared by a refresh. So after changing your backend ip address setting and refreshing, leanfront would have still used 127.0.0.1 as the backend ip address. When you changed your port in leanfront it would have cleared that cache.

I need to make a change so that it also clears that cache when doing a refresh. I am leaving this issue open until that is fixed.

-- Reply to this email directly or view it on GitHub: https://github.com/bennettpeter/android-MythTV-Leanfront/issues/58#issuecomment-1435768244 You are receiving this because you authored the thread.

Message ID: @.***>

bennettpeter commented 1 year ago

In 20230227-leanfront-release-v0-418-ge373675

dheian commented 1 year ago

Amazing. Thanks.

On February 27, 2023 10:56:10 AM EST, Peter Bennett @.***> wrote:

In 20230227-leanfront-release-v0-418-ge373675

  • I fixed the cache problem.

  • I added some code so that if you use 127.* or localhost as your ip address in your mythtv backend, leanfront will use the backend ip address you specify in leanfront settings. So your original setup will work.

-- Reply to this email directly or view it on GitHub: https://github.com/bennettpeter/android-MythTV-Leanfront/issues/58#issuecomment-1446584386 You are receiving this because you authored the thread.

Message ID: @.***>