Catch-up-TV-and-More / plugin.video.catchuptvandmore

Replay, Live TV and websites videos addon for Kodi
https://catch-up-tv-and-more.github.io
GNU General Public License v2.0
281 stars 89 forks source link

Bug replay MyTF1 #1255

Closed Riptiaz closed 8 months ago

Riptiaz commented 8 months ago

⚠️ Please try the last beta version and check existing issues before issuing a bug. ⚠️

Describe the bug

A clear and concise description of what the bug is:

To Reproduce

Steps to reproduce the behaviour:

  1. Catch up
  2. France
  3. MyTF1
  4. TF1/TFX/TMC/ TF1 Series Films

Expected behaviour

A clear and concise description of what you expected to happen: On doit choisir la chaîne où l'on souhaite afficher les catégories puis les programmes du groupe MyTF1. On peut aussi rechercher directement un programme.

Actual behaviour

Tell us what happens instead: Quand vous sélectionnez une chaîne du groupe MyTF1, vous obtenez une erreur "NoneType". Vous pouvez tout de même rechercher votre programme via le "Search", ceci est toujours fonctionnel. Je pense que cela est du à des changements dans l'api de TF1.

Screenshots

If applicable, add screenshots to help explain your problem: Voir log ci dessous

Your environment

Additional context

Add any other context about the problem here: Pour corriger: afficher tous les programmes sans choisir la chaîne (je pense que ce n'est plus nécessaire sur mytf1, ce qui peut donc causer cette erreur)

Debug log

If you can, please add your debug log information (Tutorial available here: https://kodi.wiki/view/Log_file/Easy): https://paste.kodi.tv/inapusubiv

jeff2900 commented 8 months ago

Hello, Fix that works for me. In file %appdata%\Kodi\addons\plugin.video.catchuptvandmore\resources\lib\channels\fr\mytf1.py line 166 add "try". Replace:

166:        if json_parser['data'][json_key]['label']:
167:            category_name = json_parser['data'][json_key]['label']
168:            category_id = json_parser['data'][json_key]['id']
169:
170:            item = Listitem()
171:            item.label = category_name
172:            item.params['item_id'] = item_id
173:            item.params['category_id:'] = category_id
174:            item.set_callback(list_programs)
175:            item_post_treatment(item)
176:
177:            yield item

By:

166:      try:
167:        if json_parser['data'][json_key]['label']:
168:            category_name = json_parser['data'][json_key]['label']
169:            category_id = json_parser['data'][json_key]['id']
170:
171:            item = Listitem()
172:            item.label = category_name
173:            item.params['item_id'] = item_id
174:            item.params['category_id'] = category_id
175:            item.set_callback(list_programs)
176:            item_post_treatment(item)
177:
178:            yield item
179:      except:
180:            pass
Riptiaz commented 8 months ago

Thanks its worked 👍