Project

General

Profile

Bug #2893

Edit recording via HTSP or webinterface not possible

Added by Robert Siebert over 9 years ago. Updated over 9 years ago.

Status:
Fixed
Priority:
Normal
Assignee:
-
Category:
HTSP
Target version:
-
Start date:
2015-05-25
Due date:
% Done:

100%

Estimated time:
Found in version:
4.1-64~g667da0c
Affected Versions:

Description

When I add a recording (as user xbmc) via addDvrEntry it gets created and I can see it in the webinterface. Then I edit the title via the updateDvrEntry the log shows only updated timer and then the recording is gone. It is not visible in the webinterface anymore.
I see this in the logs

2015-05-25 21:43:08.583 [  TRACE]:htsp: 192.168.178.20 [ xbmc | org.tvheadend.tvhclient ] - method updateDvrEntry
2015-05-25 21:43:08.592 [   INFO]:dvr: "The Day after Morgen 2" on "SAT.1": Updated Timer
2015-05-25 21:43:11.949 [   INFO]:htsp: 192.168.178.20 [ xbmc | org.tvheadend.tvhclient ]: Disconnected

But when I edit it in the webinterface the popup to log in opens again.

2015-05-25 21:38:06.254 [  TRACE]:access: xbmc:xbmc [SATWRELDF ], conn=0, chmin=0, chmax=0, matched, profile=ANY, dvr=ANY, tag=ANY
2015-05-25 21:38:06.263 [  TRACE]:access: xbmc:xbmc [SATWRELDF ], conn=0, chmin=0, chmax=0, matched, profile=ANY, dvr=ANY, tag=ANY
2015-05-25 21:38:06.267 [  ERROR]:http: 192.168.178.42: HTTP/1.1 POST /api/idnode/save -- 401
2015-05-25 21:38:06.530 [  TRACE]:access: 192.168.178.42:<no-user> [          ], conn=0, chmin=0, chmax=0, profile=ANY, dvr=ANY, tag=ANY
2015-05-25 21:38:06.534 [  ERROR]:http: 192.168.178.42: HTTP/1.1 POST /comet/poll -- 401

I use the version Tvheadend 4.1-64~g667da0c


Files

TVHClient.apk (2.53 MB) TVHClient.apk New version 1.7.8 Robert Siebert, 2015-05-29 12:38

History

#1

Updated by Robert Siebert over 9 years ago

Regarding the webinterface: Even if I reenter my credentials in the popup, it does not work. It pops up again and again. I have to reload the webpafe and enter the credentials. Then I'm logged in again but the recording was not changed. I use Chrome 43.

#2

Updated by Meindert Oldenburger over 9 years ago

See also #2865

#3

Updated by Jaroslav Kysela over 9 years ago

  • Status changed from New to Fixed
  • % Done changed from 0 to 100

Applied in changeset commit:tvheadend|7643f72c9a9a7326775fd4764fd6caa56ede50e9.

#4

Updated by Jaroslav Kysela over 9 years ago

  • Status changed from Fixed to Accepted

I fixed the webui issue, but I'm not sure what to do with the htsp problem. I changed "Updated Timer" to only "Updated" when other fields are changed, but I don't see any reason why is the entry lost.

I assume that you are trying to add this functionality to tvhguide. Could you give me latest .apk for test ? (I'm on IRC - #hts - as perexg if you like to sent a PM).

#5

Updated by Robert Siebert over 9 years ago

I'll prepare an apk and send it to you.
I am the developer of TVHClient. The older TVHGuide app is outdated and seems to be no longer updated.
Can you also update the wiki so my app is listed? (https://play.google.com/store/apps/details?id=org.tvheadend.tvhclient)

#6

Updated by Jaroslav Kysela over 9 years ago

The "clients" page on wiki was updated to list your app.

#7

Updated by Robert Siebert over 9 years ago

  • File TVHClient.apk added

Editing still not working here. I have prepared an unsigned version of the TVHClient app. Its version 1.7.8
I use the server version 4.1-101~ge8082243 which is pretty much the latest master.

I schedule a recording via the epg or by selecting a channel and then picking a program from the list. Then I go via the main menu to the list of scheduled recordings. I select one to see its details and press edit. I change the priority to something else and hit save. The recording disappears.

The relevant call to the service is at https://github.com/rsiebert/TVHClient/blob/develop/src/org/tvheadend/tvhclient/fragments/RecordingEditFragment.java#L368. The service then call the updateDvrEntry method in https://github.com/rsiebert/TVHClient/blob/develop/src/org/tvheadend/tvhclient/htsp/HTSService.java#L124 and executes it in https://github.com/rsiebert/TVHClient/blob/develop/src/org/tvheadend/tvhclient/htsp/HTSService.java#L1066

Did I miss something or is more information required?

#8

Updated by Jaroslav Kysela over 9 years ago

I cannot install this apk on my nexus 7 with latest android - INSTALL_PARSE_FAILED_NO_CERTIFICATES .

#9

Updated by Robert Siebert over 9 years ago

Can you try this one? Its signed.

#10

Updated by Jaroslav Kysela over 9 years ago

It works, I found this bug (when wifi is disabled):

D/AndroidRuntime(12500): Shutting down VM
E/AndroidRuntime(12500): FATAL EXCEPTION: main
E/AndroidRuntime(12500): Process: org.tvheadend.tvhclient, PID: 12500
E/AndroidRuntime(12500): java.lang.RuntimeException: Unable to resume activity {org.tvheadend.tvhclient/org.tvheadend.tvhclient.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.net.NetworkInfo.isConnected()' on a null object reference
E/AndroidRuntime(12500):     at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2986)
E/AndroidRuntime(12500):     at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3017)
E/AndroidRuntime(12500):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2392)
E/AndroidRuntime(12500):     at android.app.ActivityThread.access$800(ActivityThread.java:151)
E/AndroidRuntime(12500):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303)
E/AndroidRuntime(12500):     at android.os.Handler.dispatchMessage(Handler.java:102)
E/AndroidRuntime(12500):     at android.os.Looper.loop(Looper.java:135)
E/AndroidRuntime(12500):     at android.app.ActivityThread.main(ActivityThread.java:5254)
E/AndroidRuntime(12500):     at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(12500):     at java.lang.reflect.Method.invoke(Method.java:372)
E/AndroidRuntime(12500):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
E/AndroidRuntime(12500):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
E/AndroidRuntime(12500): Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.net.NetworkInfo.isConnected()' on a null object reference
E/AndroidRuntime(12500):     at org.tvheadend.tvhclient.TVHClientApplication.isConnected(TVHClientApplication.java:1026)
E/AndroidRuntime(12500):     at org.tvheadend.tvhclient.MainActivity.reconnectAndResume(MainActivity.java:536)
E/AndroidRuntime(12500):     at org.tvheadend.tvhclient.MainActivity.changeLogDialogDismissed(MainActivity.java:973)
E/AndroidRuntime(12500):     at org.tvheadend.tvhclient.MainActivity.onPostResume(MainActivity.java:517)
E/AndroidRuntime(12500):     at android.app.Activity.performResume(Activity.java:6089)
E/AndroidRuntime(12500):     at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2975)
E/AndroidRuntime(12500):     ... 11 more
#11

Updated by Jaroslav Kysela over 9 years ago

Can reproduce here. Digging.

#12

Updated by Jaroslav Kysela over 9 years ago

Found. You pass times as milliseconds not seconds in the update call:

now = 1432898340, stop 1432900800
2015-05-29 13:19:00.343 [ INFO] dvr: entry 4dd126f35518823e012efe18adaba396 "Studio ČT24" on "CT 24" starting at 2015-05-29 13:34:30, scheduled for recording by "testuser"
now = 1432898353
update start = 1432900800000
update stop = 1432900800000

So there's overflow inside tvh and the recordings is marked as "time missed" in the failed tab (webui).

#13

Updated by Jaroslav Kysela over 9 years ago

  • File deleted (TVHClient.apk)
#14

Updated by Robert Siebert over 9 years ago

Thanks for testing and finding these issues!
I can confirm setting start, stop, startExtra, stopExtra, priority works now as expected. But I can't change the title or description, even though the updateDvrEntry status message is success. According to the HTSP API this is supported.

#15

Updated by Jaroslav Kysela over 9 years ago

1) The description was not handled. Fixed now.
2) The title updating should be also fixed (wrong language was used for updates).
3) I added/fixed also subtitle handling for the DVR records.
4) In hello, I added the default "language" field with the language list (separated by comma) - so clients can determine the language order configured in tvh.

v4.1-111-g807b9c8

#16

Updated by Robert Siebert over 9 years ago

I tested changing the title and description and it works! Thank you!

#17

Updated by Jaroslav Kysela over 9 years ago

  • Status changed from Accepted to Fixed

Also available in: Atom PDF