Skip to content

Commit

Permalink
feat(Stremio): add Stremio 5 & rewrite presence (PreMiD#7478)
Browse files Browse the repository at this point in the history
* refactor(Stremio): improve control flow

Replace nested if/else statements with switch statements. This makes the code easier to read and maintain going forward.

* feat(Stremio): add Stremio 5

Add support for stremio 5 (a.k.a Stremio web).

* refactor(Stremio): simplify player page handling

There's no need to parse the timestamps from HTML elements because the video element, which contains enough information already, is always available on the player page.

* fix(Stremio): replace link to player with meta URL

The button link to the player URL is 1) too long for discord 2) forbidden by the PreMiD developer guidelines. So, we link to the meta details page instead.

* feat(Stremio): show thumbnail for app version 4

* refactor(Stremio): improve handling undefined values

* fix(Stremio): update invalid CSS selectors

* feat(Stremio): add privacy-friendly search

* fix(Stremio): link to correct meta URLs

* style(Stremio): improve details and state wording

* feat(Stremio): show metadata info for channels

* feat(Stremio): add fallback for non-video player

Add a fallback for content being played without native `<video>` element. This is useful for things like channels, where the video is embedded by an iframe to another site (like YouTube).

* refactor(Stremio): use attribute contains selector

This selector withstands class reordering.

* refactor(Stremio): store logo in Assets enum

* feat(Stremio): add small image text

* feat(Stremio): show content type from meta page

* refactor(Stremio): reorder state and details

* feat(Stremio): add optional search queries

Due to the nature of some content on Stremio (e.g. adult content) there should be a setting to enable displaying search queries.

* refactor(Stremio): remove global title variable

* refactor(Stremio): perform thumbnails check once

* refactor(Stremio): move 'find player info' logic to separate function

* fix(Stremio): fix logo not showing

* refactor(Stremio): remove incorrect selectors

These are either wrong or null when the page reloads so there's no point in keeping them.

* chore(Stremio): format code

* fix(Stremio): fix typo

* feat(Stremio): add more buttons

* fix(Stremio): fix incorrect state of loading player

* feat(Stremio): include genre from discover page

* chore(Stremio): format code

* chore(Stremio): fix deepscan issues

* chore(Stremio): swap contributor with author

* chore(Stremio): fix typo

* refactor(Strremio): apply destructuring pattern

* chore(Stremio): capitalize labels
  • Loading branch information
sleeyax authored Jul 14, 2023
1 parent d47e507 commit 47d0fdb
Show file tree
Hide file tree
Showing 2 changed files with 412 additions and 154 deletions.
35 changes: 30 additions & 5 deletions websites/S/Stremio/metadata.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,42 @@
{
"$schema": "https://schemas.premid.app/metadata/1.9",
"author": {
"name": "Dark_Ville",
"id": "638080361179512853"
"name": "Sleeyax",
"id": "226037514954080257"
},
"contributors": [
{
"name": "Dark_Ville",
"id": "638080361179512853"
}
],
"service": "Stremio",
"description": {
"en": "Freedom To Stream. Stremio is a modern media center that's a one-stop solution for your video entertainment. Discover, watch and organize video content from easy to install addons.",
"nl": "Vrijheid om te streamen. Stremio is een modern, alles-in-één mediacentrum voor video-entertainment. Ontdek, bekijk en organiseer video-inhoud via de eenvoudig te installeren invoegtoepassingen."
},
"url": [
"www.stremio.com",
"app.strem.io"
"stremio.com",
"app.strem.io",
"web.strem.io",
"web.stremio.com"
],
"version": "1.0.6",
"version": "2.0.0",
"logo": "https://cdn.rcd.gg/PreMiD/websites/S/Stremio/assets/logo.png",
"thumbnail": "https://cdn.rcd.gg/PreMiD/websites/S/Stremio/assets/thumbnail.jpg",
"color": "#8A5AAB",
"category": "videos",
"tags": [
"streaming",
"channels",
"cartoons",
"stream"
"movies",
"series",
"stream",
"shows",
"iptv",
"tv"
],
"settings": [
{
Expand All @@ -46,6 +62,15 @@
"title": "Show Buttons",
"icon": "fas fa-compress-arrows-alt",
"value": true
},
{
"id": "search",
"if": {
"privacy": false
},
"title": "Show Search",
"icon": "fas fa-search",
"value": false
}
]
}
Loading

0 comments on commit 47d0fdb

Please sign in to comment.