Skip to content

Commit

Permalink
Update media preview strategies
Browse files Browse the repository at this point in the history
* Show preview for YouTube shorts

* Remove anything Twitter, as it decided to remove open graph tags.
  See https://devcommunity.x.com/t/138473

* Fix Reddit by redirecting to old.reddit.com
  • Loading branch information
oakkitten committed Nov 23, 2024
1 parent 5acaf7c commit a7f5040
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -887,7 +887,7 @@ strategies:
- name: youtube
type: image
hosts: [www.youtube.com, m.youtube.com, youtube.com, youtu.be]
regex: (?i)^https?://(?:(?:www\\.|m\\.)?youtube\\.com/watch\\?v=|youtu\\.be/)([A-Za-z0-9_-]+)
regex: (?i)^https?://(?:(?:www\\.|m\\.)?youtube\\.com/(?:watch\\?v=|shorts/)|youtu\\.be/)([A-Za-z0-9_-]+)
small: https://img.youtube.com/vi/$1/mqdefault.jpg
big: https://img.youtube.com/vi/$1/hqdefault.jpg

Expand All @@ -911,12 +911,6 @@ strategies:
small: https://images-cdn.9gag.com/photo/$1_700b.jpg
big: https://images-cdn.9gag.com/photo/$1_700b.jpg

- name: mobile.twitter
type: any
hosts: [mobile.twitter.com]
regex: (?i)^https?://mobile\\.twitter\\.com/(.*)
sub: https://twitter.com/$1

- name: common
type: any
regex: (?i)^https?://(.+)
Expand All @@ -926,9 +920,17 @@ strategies:
- gfycat.com
- imgur.com

- name: reddit
- name: v.redd.it
type: any
hosts: [v.redd.it]
regex: (?i)^https?://v.redd.it/([a-z1-9]+)
sub: https://old.reddit.com/video/$1

- name: reddit.com
type: any
hosts: [v.redd.it, reddit.com, www.reddit.com, old.reddit.com]
hosts: [reddit.com, www.reddit.com, old.reddit.com]
regex: (?i)^https?://[^/]+/(.+)
sub: https://old.reddit.com/$1
body size: 196608
"</string>

Expand Down

0 comments on commit a7f5040

Please sign in to comment.