Original script was by B C taken from here: To see the output in a more readable format, try:įrom there you can see what fields can be used for sorting and/or in the description.Īlso, when you get it working how you want, you should probably uncomment the rm at the bottom If you do not want to specify the profile (and just use the default) you can remove the part "\?profile=$profile" from the end of the line. To create an unsorted list, comment out the jq sort and uncomment the cp command. Number=$(/usr/bin/jq -c -r '.entries.number' /tmp/channels.json)Įcho /tmp/channels_unsorted.json /tmp/channels.jsonĮdit the top section with the correct data for you (admin username/password, user username/password, profile, and host address:port) Name=$(/usr/bin/jq -c -r '.entries.name' /tmp/channels.json) Uuid=$(/usr/bin/jq -c -r '.entries.uuid' /tmp/channels.json) Svcname=$(/usr/bin/jq -c -r '.entries.svcname' /tmp/channels.json) Jq '.entries |= sort_by(.number)' /tmp/channels_unsorted.json > /tmp/channels.jsonĮntries=$(/usr/bin/jq -c '.total' /tmp/channels.json)įor (( service=0 service<= $entries service++ ))Įnabled=$(/usr/bin/jq -c '.entries.enabled' /tmp/channels.json) svcname)' /tmp/services_unsorted.json > /tmp/services.jsonĮntries=$(/usr/bin/jq -c '.total' /tmp/services.json)įor (( service=0 service /tmp/channels.json Wget -O /tmp/services_unsorted.json /tmp/services_unsorted.json /tmp/services.json # you must have installed jq (apt-get install jq) It is not very secure since it will include the user:password, but if that doesn't bother you. You could use one of the following scripts to generate a playlist.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |