Skip to content
This repository has been archived by the owner on Feb 6, 2023. It is now read-only.

fix $hls syntax and examples #1111

Conversation

contribucious
Copy link
Contributor

✔️ Minor fixes for the $hls modifier (EN / RU KB). Please see this post for more info.

 

💡 Used regular expression in two places — visible below — instead of regexp though. Better IMHO and more like the Russian version:

🇷🇺 RU (the two places already OK)


Доступные значения `options`:
* `t` – вместо URL, тестировать теги сегмента на соответствие регулярному выражению. Сегмент с соответствующим тегом будет удален.
* `i` – сделать регулярное выражение нечувствительным к регистру символов.

##### Примеры
* `||example.org^$hls=\/videoplayback^?*&source=dclk_video_ads` — удалить все сегменты с соответствующим URL.
* `||example.org^$hls=/\/videoplayback\/?\?.*\&source=dclk_video_ads/i` — то же, но с помощью регулярного выражения.
* `||example.org^$hls=/#UPLYNK-SEGMENT:.*\,ad/t` — удалить все сегменты с соответствующим тегом.

🇺🇸 EN (my two related changes)


Available `options` are:
* `t` – instead of testing the segment's URL, test each of the segment's tags against the regular expression. A segment with a matching tag is removed.
* `i` – make the regular expression case-insensitive.

##### Examples
* `||example.org^$hls=\/videoplayback^?*&source=dclk_video_ads` — removes all segments with the matching URL.
* `||example.org^$hls=/\/videoplayback\/?\?.*\&source=dclk_video_ads/i` — achieves more or less the same with
  a regular expression instead of a URL pattern.
* `||example.org^$hls=/#UPLYNK-SEGMENT:.*\,ad/t` — removes all segments which have the matching tag.

 
 


⚠️ Note that I don't speak Russian at all. Based only on DeepL and Google Translate. Let me know if any changes are needed as a result. ✌️ 😉

@ameshkov ameshkov merged commit ac56f46 into AdguardTeam:master Aug 7, 2022
@contribucious contribucious deleted the contribucious-fix/hls-syntax-and-examples-fixes branch August 7, 2022 17:04
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants