]> git.ipfire.org Git - thirdparty/tvheadend.git/commit
api: Add api convenience call for renaming channels. (#4715).
authorE.Smith <31170571+azlm8t@users.noreply.github.com>
Thu, 16 Nov 2017 11:20:52 +0000 (11:20 +0000)
committerJaroslav Kysela <perex@perex.cz>
Thu, 16 Nov 2017 13:53:06 +0000 (14:53 +0100)
commit9cbcf56218832f092eb311c85b92b9cf79fbaab3
tree6b221446346362f8b8e4475ea31683c3065713a4
parent1bb9d1f99d4337833c1416f142714be07476961f
api: Add api convenience call for renaming channels. (#4715).

Add a convenience function for users to rename all channels
that match a particular name. Previously the caller needed
to parse an api/channel/list, extract each channel that
matched the name and then issue an idnode/save for the nodes.

This change allows people to easily fixup their names such as
updating channels that are broadcast with a lowercase name
(and so sort to the end of the list in many UIs); or prefixing
the channels with identifiers. Since the server does the channel
name lookup, it allows non-programmers to issue simple renames
from a script.

curl http://l:9981/api/channel/rename --data-urlencode 'from=dave' --data-urlencode 'to=Dave'

Issue: #4715.
src/api/api_channel.c
src/channels.c
src/channels.h