m3u8_main:
- m3u8_main.custom:
    # By default, this plugin has no specified behaviour except leaving the
    # manifest as-is. You can customize the handling of the manifest in any
    # way that you want, by editing the process() function in the file:
    # /etc/manifest-edit/plugins/m3u8_main/custom.py

# # Original file: add_characteristics_by_uri.yaml
# - manifest_edit.plugins.m3u8_main.default_language:
#    - type: 'AUDIO'
#      uri: '.*describesvideo.*'
#      characteristics: 'public.accessibility.describes-video'

# # Original file: customize_track_name.yaml
#   - manifest_edit.plugins.m3u8_main.add_update:
#       EXT-X-MEDIA:
#         - LANGUAGE: "fr"
#           CHARACTERISTICS: "public.accessibility.describes-video"
#           TYPE: "AUDIO"
#           plugin_config:
#             NAME: "Français (Audio description)"
#             DEFAULT: "NO"
#         - LANGUAGE: "fr"
#           CHARACTERISTICS: ""
#           TYPE: "AUDIO"
#           plugin_config:
#             DEFAULT: "YES"
#             NAME: "Français"
#         - LANGUAGE: "fr"
#           CHARACTERISTICS: ""
#           TYPE: "SUBTITLES"
#           plugin_config:
#             DEFAULT: "YES"
#             NAME: "Français (Sourds et malentendants)"

# # Original file: default_audio_language.yaml
# - manifest_edit.plugins.m3u8_main.default_language:
#    - type: 'AUDIO'
#      language: 'it'
#      default: "YES"
#      # autoselect will be added implicitly

# # Original file: default_subs_language.yaml
# - manifest_edit.plugins.m3u8_main.default_language:
#    - type: 'SUBTITLES'
#      language: 'fr'
#      default: "YES"
#      # autoselect will be added implicitly

# # Original file: hard_of_hearing.yaml
# - manifest_edit.plugins.m3u8_main.default_language:
#    - type: 'SUBTITLES'
#      language: 'fr'
#      characteristics: "public.accessibility.describes-spoken-dialog,public.accessibility.describes-music-and-sound"
#      # autoselect will be added implicitly

# # Original file: remove_aac_audio.yaml
# - manifest_edit.plugins.m3u8_main.ext_x_media_remove:
#    - type: 'AUDIO'
#      group-id: '.*-aacl-128.*'

# # Original file: remove_ec3_audio.yaml
# - manifest_edit.plugins.m3u8_main.ext_x_media_remove:
#    - type: 'AUDIO'
#      group-id: '.*-ec-3-.*'

# # Original file: rewrite_media_uri.yaml
# - manifest_edit.plugins.m3u8_main.rewrite_media_uri:
#   # Can be used to change URIs in EXT-X-MEDIA, EXT-X-STREAM and
#   # EXT-X-I-FRAME-STREAM-INF
#   # Generic expression to replace python_pipeline_config query parameter value
#   # in main playlists URIs and activate the desired media playlist use case.
#   - search: 'python_pipeline_config=([^&]*)'
#     replace: 'python_pipeline_config=m3u8_media/default'
# 
# # - manifest_edit.plugins.m3u8_main.rewrite_media_uri:
# #   # Can be used to change URIs in EXT-X-MEDIA, EXT-X-STREAM and
# #   # EXT-X-I-FRAME-STREAM-INF
# #   # This expression is suitable when URI has other query params you want to
# #   # keep and add python_pipeline_config to
# #   - search: '.m3u8\?'
# #   replace: '.m3u8?python_pipeline_config=m3u8_media/default&'
# 
# - manifest_edit.plugins.m3u8_main.rewrite_media_uri:
#   # Can be used to change URIs in EXT-X-MEDIA, EXT-X-STREAM and
#   # EXT-X-I-FRAME-STREAM-INF
#   # This expression is suitable when suppress_query_parameter=true is used in
#   # the main playlist URL.
#   - search: '.m3u8$'
#     replace: '.m3u8?python_pipeline_config=m3u8_media/default'
# 
