Contribution - Catch-up-TV-and-More/plugin.video.catchuptvandmore GitHub Wiki
We need you
Catch-up TV & More is a personal/free time project, we maintain-it, fix-it and improve-it only on our free time.
Because there are more and more contents available it is not possible for us to check every day that all channels of all countries are still working. This is why we count on our users (and we want to say you thank you for that) to send us bugs reports in order to keep the add-on working.
Also, if like us, you have some Python skills and want to add a new TV channel or improve an existing one, fix a bug or add a new feature, we encourage you to fork this project and open a pull request! If you have any question or if you need help to start you can count on us (we speak French and a bit of English).
Add-on structure
Catch-up TV & More is structured in multiple levels of menus:
CuTV&M
|
|-- Live TV
| |
| |-- France
| | |
| | |-- TF1
| | |-- France 2
| | `-- [...]
| |
| |-- Belgium
| | |
| | `-- [...]
| |
| `-- [...|
|
|-- Catch-up TV
| |
| `-- [...]
|
|-- Websites
| |
| `-- [...]
|
`-- Favourites
Each menu of each level of the add-on is given by the menu
dictionary in the python files of the plugin.video.catchuptvandmore/resources/lib/skeletons
folder
e.g. The root menu in given by root.py
and the French catch-up tv menu is given by fr_replay.py
.
How to contribute
How to disable a menu
Sometimes we need to disable a menu (maybe temporarily) because the content is no longer available (e.g. a live TV channel).
The procedure below describes how to disable the TF1
channel of the French live TV
menu:
- Open the parent menu skeleton python file of the menu to disable (here
fr_live.py
) - Find in the
menu
dictionary the menu id to disable (heretf1
) - Set the
enabled
field toFalse
Caution: In order not to "break" the menu arrangement chosen by the user, you should never delete a menu present in a skeleton, even if the latter may never be activated again. It is only necessary to pass enabled
to False
as indicated above.
How to add a new menu
This section explains how to add a new menu like a new country, a new channel or a new website...
The procedure below describes how to add the Foo
channel in the French live TV
menu:
- Open the parent menu skeleton python file of the menu to add (here
fr_live.py
) - Add a new dictionary with the
foo
id - Fill in the
callback
,thumb
,module
, ... fields - Set
enabled
toTrue
- Concerning the
order
field, you need to choose a value that does not exists yet in thismenu
dictionary - Preferably, place the new dictionary "in the right place" in the skeleton file (so that the order of the
order
fields is increasingly respected in the file)