Project

General

Profile

Bug #1988

Channel changes not saving

Added by Andy Brown over 10 years ago. Updated over 10 years ago.

Status:
Fixed
Priority:
Normal
Assignee:
-
Category:
User Interface
Target version:
-
Start date:
2014-03-07
Due date:
% Done:

100%

Estimated time:
Found in version:
git-master
Affected Versions:

Description

Repeated testing is showing that changes to channels aren't being saved to channel files.
Configuration > DVB Inputs > Services
In the Channel column, add, edit, delete an entry. Any entry.
Selected entry has the red tab showing a change, click SAVE to save the change. The red tab disappears, indicating that the webui 'thinks' the change has been saved. The actual file
~/.hts/tvheadend/channel/327eb0580491425caf66cc75791911c1 (In my case) is not updated, so the services mapping list isn't changed.

I added a tvhlog to channel_save in src/channels.c to check if this is called after making changes and this isn't being called, so I suspect the webui isn't submitting the change/the change is failing. The debug output shows the following when I make the change:

2014-03-07 11:35:57.395 [ DEBUG] settings: saving to .hts/tvheadend/input/linuxdvb/networks/c16493e60df1a0aa4dfc697dba65e078/muxes/140cead80f1c3982ef48e60201389526/services/1dd7234f0f07f792cef8f71a1b02829f

(Which doesn't seem relevant, as I'm not changing the mux settings, just the channel, so perhaps this is the issue?)

History

#1

Updated by Sam Stenvall over 10 years ago

Two things to check off the top of my head:

1. Permissions on the file being written. Maybe they've gotten screwed up and tvheadend cannot write to the file.

2. Use the developer tools in your browser and watch the network request that's fired when you press Save. See if it errors or if there is anything else odd going on.

#2

Updated by Andy Brown over 10 years ago

Thanks Jalle, good points,
1) File permissions are all owner+group same as TVH, so all fine there (and no errors in debug output on file errors)
2) No errors generated, so not a bug in that sense.

Have just had another member test this and confirm the bug, so its reproducible on other systems.

I suspect the call from the webui is triggering the service_save not channel_save function by mistake. Will dig into the code

#3

Updated by Andy Brown over 10 years ago

Further debug:

On making the change I see http://192.168.55.1:9984/api/idnode/save posted with the correct information:

[{"channel":["327eb0580491425caf66cc75791911c1"],"uuid":"1dd7234f0f07f792cef8f71a1b02829f"}]

However, the action TVH takes on receiving this api idnode save event is to trigger the "linuxdvb_service_config_save" event.
Using the "Map to selected" does indeed work, and I get the expected settings saved to the channel file (~/.hts/tvheadend/channel/6f96cb92d225f9b2b40f8550c70c5f74) so this call appears fine.

#4

Updated by Andy Brown over 10 years ago

More debug!

I've checked and if you make the same changes by going into Channel/EPG > Channels, EDIT and in the services drop-down make changes there, it correctly triggers the channel save routines:

2014-03-09 15:36:09.847 [ NOTICE] api_idnode: triggered single idnode_update: 327eb0580491425caf66cc75791911c1
2014-03-09 15:36:09.847 [  DEBUG] idnode: idnode_write0 triggered
2014-03-09 15:36:09.847 [ NOTICE] channels: AB: Saving channel - 327eb0580491425caf66cc75791911c1
2014-03-09 15:36:09.847 [  DEBUG] settings: saving to /home/andyb/.hts/tvheadend/channel/327eb0580491425caf66cc75791911c1
2014-03-09 15:36:09.847 [ NOTICE] api_idnode: idnode_write0 save is valid
2014-03-09 15:36:09.848 [ NOTICE] api_idnode: idnode_write0 just a notify

(Note I've added the additional NOTICE's to code to help debug this)

So, the bug appears to be because of under DVB Inputs > Services changing channel information doesn't also push a change to the channel files.

#5

Updated by Andy Brown over 10 years ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100
#6

Updated by Adam Sutton over 10 years ago

  • Status changed from Resolved to Fixed

Also available in: Atom PDF