fix(source): query TMDB for Albanian info for Kokoshka
This commit is contained in:
parent
7e08a8090c
commit
066424e087
15 changed files with 74 additions and 4 deletions
|
|
@ -30,4 +30,9 @@ describe('Kokoshka', () => {
|
|||
const streams = await source.handle(ctx, 'series', new TmdbId(286801, 1, 3));
|
||||
expect(streams).toMatchSnapshot();
|
||||
});
|
||||
|
||||
test('handle 5 Herë Jo', async () => {
|
||||
const streams = await source.handle(ctx, 'movie', new TmdbId(1213327, undefined, undefined));
|
||||
expect(streams).toMatchSnapshot();
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ export class Kokoshka extends Source {
|
|||
}
|
||||
|
||||
private readonly fetchPageUrl = async (ctx: Context, tmdbId: TmdbId): Promise<URL | undefined> => {
|
||||
const [name, year] = await getTmdbNameAndYear(ctx, this.fetcher, tmdbId);
|
||||
const [name, year] = await getTmdbNameAndYear(ctx, this.fetcher, tmdbId, 'sq');
|
||||
|
||||
const searchUrl = new URL(`/?s=${encodeURIComponent(`${name.replace(':', '')} ${year}`)}`, this.baseUrl);
|
||||
const html = await this.fetcher.text(ctx, searchUrl);
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
{"adult":false,"backdrop_path":"/Q2OajDi2kcO6yErb1IAyVDTKMs.jpg","belongs_to_collection":{"id":1531466,"name":"Weapons Collection","poster_path":"/xoeSn325CFQLt1WC9jSBBTsvPWR.jpg","backdrop_path":"/xt2V8A0NVw4lUIUU8gRLnrCBrIR.jpg"},"budget":38000000,"genres":[{"id":27,"name":"Horror"},{"id":9648,"name":"Mystery"}],"homepage":"https://www.warnerbros.com/movies/weapons","id":1078605,"imdb_id":"tt26581740","origin_country":["US"],"original_language":"en","original_title":"Weapons","overview":"When all but one child from the same class mysteriously vanish on the same night at exactly the same time, a community is left questioning who or what is behind their disappearance.","popularity":99.0392,"poster_path":"/cpf7vsRZ0MYRQcnLWteD5jK9ymT.jpg","production_companies":[{"id":12,"logo_path":"/2ycs64eqV5rqKYHyQK0GVoKGvfX.png","name":"New Line Cinema","origin_country":"US"},{"id":240675,"logo_path":null,"name":"Subconscious","origin_country":"US"},{"id":829,"logo_path":"/iJo9zP5QCKyBsmKSOcvXd6UDNih.png","name":"Vertigo Entertainment","origin_country":"US"},{"id":18609,"logo_path":"/pxtYCfl1DWzvizqZcYwE4NefOOF.png","name":"BoulderLight Pictures","origin_country":"US"},{"id":216687,"logo_path":"/kKVYqekveOvLK1IgqdJojLjQvtu.png","name":"Domain Entertainment","origin_country":"US"}],"production_countries":[{"iso_3166_1":"US","name":"United States of America"}],"release_date":"2025-08-04","revenue":265894217,"runtime":129,"spoken_languages":[{"english_name":"English","iso_639_1":"en","name":"English"},{"english_name":"Spanish","iso_639_1":"es","name":"Español"}],"status":"Released","tagline":"Last night at 2:17 AM, every child from Mrs. Gandy's class woke up, got out of bed, went downstairs, opened the front door, walked into the dark ...and they never came back.","title":"Weapons","video":false,"vote_average":7.392,"vote_count":1887}
|
||||
1
src/source/__fixtures__/Kokoshka/https:api.themoviedb.org3movie1078605languagesq
generated
Normal file
1
src/source/__fixtures__/Kokoshka/https:api.themoviedb.org3movie1078605languagesq
generated
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"adult":false,"backdrop_path":"/Q2OajDi2kcO6yErb1IAyVDTKMs.jpg","belongs_to_collection":{"id":1531466,"name":"Weapons Collection","poster_path":"/xoeSn325CFQLt1WC9jSBBTsvPWR.jpg","backdrop_path":"/xt2V8A0NVw4lUIUU8gRLnrCBrIR.jpg"},"budget":38000000,"genres":[{"id":27,"name":"Horror"},{"id":9648,"name":"Mystery"}],"homepage":"","id":1078605,"imdb_id":"tt26581740","origin_country":["US"],"original_language":"en","original_title":"Weapons","overview":"","popularity":99.0392,"poster_path":"/cpf7vsRZ0MYRQcnLWteD5jK9ymT.jpg","production_companies":[{"id":12,"logo_path":"/2ycs64eqV5rqKYHyQK0GVoKGvfX.png","name":"New Line Cinema","origin_country":"US"},{"id":240675,"logo_path":null,"name":"Subconscious","origin_country":"US"},{"id":829,"logo_path":"/iJo9zP5QCKyBsmKSOcvXd6UDNih.png","name":"Vertigo Entertainment","origin_country":"US"},{"id":18609,"logo_path":"/pxtYCfl1DWzvizqZcYwE4NefOOF.png","name":"BoulderLight Pictures","origin_country":"US"},{"id":216687,"logo_path":"/kKVYqekveOvLK1IgqdJojLjQvtu.png","name":"Domain Entertainment","origin_country":"US"}],"production_countries":[{"iso_3166_1":"US","name":"United States of America"}],"release_date":"2025-08-04","revenue":265894217,"runtime":129,"spoken_languages":[{"english_name":"English","iso_639_1":"en","name":"English"},{"english_name":"Spanish","iso_639_1":"es","name":"Español"}],"status":"Released","tagline":"","title":"Weapons","video":false,"vote_average":7.393,"vote_count":1888}
|
||||
1
src/source/__fixtures__/Kokoshka/https:api.themoviedb.org3movie1213327languagesq
generated
Normal file
1
src/source/__fixtures__/Kokoshka/https:api.themoviedb.org3movie1213327languagesq
generated
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"adult":false,"backdrop_path":"/kC0UwSJFnVgJFSwrYjwkOC3QdEa.jpg","belongs_to_collection":null,"budget":320000,"genres":[{"id":10749,"name":"Romance"},{"id":35,"name":"Comedy"}],"homepage":"","id":1213327,"imdb_id":"tt30146752","origin_country":["AL"],"original_language":"sq","original_title":"5 Herë Jo","overview":"Në televizionin më të madh në vend, Jora (Bora) është në konkurrencë me Klarën, një tjetër producente televizive dhe të dyja janë të gatshme të bëjnë gjithçka për të fituar projektin, qoftë edhe me një goditje nën brez.","popularity":0.1057,"poster_path":"/j4DduE6pHNP3a7Fzp46wLjMraF4.jpg","production_companies":[{"id":113456,"logo_path":null,"name":"Top Channel","origin_country":"AL"}],"production_countries":[{"iso_3166_1":"AL","name":"Albania"}],"release_date":"2023-12-13","revenue":0,"runtime":1,"spoken_languages":[{"english_name":"Albanian","iso_639_1":"sq","name":"shqip"}],"status":"Released","tagline":"","title":"5 Herë Jo","video":false,"vote_average":0.0,"vote_count":0}
|
||||
|
|
@ -1 +0,0 @@
|
|||
{"adult":false,"backdrop_path":"/cm2oUAPiTE1ERoYYOzzgloQw4YZ.jpg","created_by":[{"id":59595,"credit_id":"67db0c885ef4639ebae77c84","name":"Ian Brennan","original_name":"Ian Brennan","gender":2,"profile_path":null}],"episode_run_time":[],"first_air_date":"2025-10-03","genres":[{"id":18,"name":"Drama"},{"id":80,"name":"Crime"}],"homepage":"https://www.netflix.com/title/81783093","id":286801,"in_production":false,"languages":["en","de"],"last_air_date":"2025-10-03","last_episode_to_air":{"id":6485709,"name":"The Godfather","overview":"Ed finds new purpose helping investigators crack a disturbing case. But as the past and present blur, his terrifying legacy looms larger than ever.","vote_average":7.6,"vote_count":6,"air_date":"2025-10-03","episode_number":8,"episode_type":"finale","production_code":"","runtime":66,"season_number":1,"show_id":286801,"still_path":"/buEEJshPhyxc8WzJCGCkcw81AUP.jpg"},"name":"Monster: The Ed Gein Story","next_episode_to_air":null,"networks":[{"id":213,"logo_path":"/wwemzKWzjKYJFfCeiB57q3r4Bcm.png","name":"Netflix","origin_country":""}],"number_of_episodes":8,"number_of_seasons":1,"origin_country":["US"],"original_language":"en","original_name":"Monster: The Ed Gein Story","overview":"The shocking true-life tale of Ed Gein, the infamous murderer and grave robber who inspired many of Hollywood's most iconic on-screen killers.","popularity":266.8154,"poster_path":"/iDHzRALtZCzHVmx7uyjTTKvMAPB.jpg","production_companies":[{"id":19328,"logo_path":"/2AdkrU1av4fDGw0Zaf68XH4YcqC.png","name":"Ryan Murphy Television","origin_country":"US"},{"id":182831,"logo_path":null,"name":"Prospect Films","origin_country":"US"}],"production_countries":[{"iso_3166_1":"US","name":"United States of America"}],"seasons":[{"air_date":"2025-10-03","episode_count":8,"id":447082,"name":"Miniseries","overview":"Serial killer. Grave robber. Psycho. In the frozen fields of 1950s rural Wisconsin, a friendly, mild-mannered recluse named Eddie Gein lived quietly on a decaying farm - hiding a house of horrors so gruesome it would redefine the American nightmare. Driven by isolation, psychosis, and an all-consuming obsession with his mother, Gein's perverse crimes birthed a new kind of monster that would haunt Hollywood for decades. From Psycho to The Texas Chainsaw Massacre to The Silence of the Lambs, Gein's macabre legacy gave birth to fictional monsters born in his image and ignited a cultural obsession with the criminally deviant. Ed Gein didn't just influence a genre -- he became the blueprint for modern horror.","poster_path":"/9oEJvxWAKvHUQGL8CzPwmfIxBGW.jpg","season_number":1,"vote_average":7.1}],"spoken_languages":[{"english_name":"English","iso_639_1":"en","name":"English"},{"english_name":"German","iso_639_1":"de","name":"Deutsch"}],"status":"Ended","tagline":"Before The Texas Chainsaw Massacre... there was Ed.","type":"Miniseries","vote_average":7.488,"vote_count":214}
|
||||
1
src/source/__fixtures__/Kokoshka/https:api.themoviedb.org3tv286801languagesq
generated
Normal file
1
src/source/__fixtures__/Kokoshka/https:api.themoviedb.org3tv286801languagesq
generated
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"adult":false,"backdrop_path":"/cm2oUAPiTE1ERoYYOzzgloQw4YZ.jpg","created_by":[{"id":59595,"credit_id":"67db0c885ef4639ebae77c84","name":"Ian Brennan","original_name":"Ian Brennan","gender":2,"profile_path":null}],"episode_run_time":[],"first_air_date":"2025-10-03","genres":[{"id":18,"name":"Drama"},{"id":80,"name":"Crime"}],"homepage":"https://www.netflix.com/title/81783093","id":286801,"in_production":false,"languages":["en","de"],"last_air_date":"2025-10-03","last_episode_to_air":{"id":6485709,"name":"Episode 8","overview":"","vote_average":7.9,"vote_count":7,"air_date":"2025-10-03","episode_number":8,"episode_type":"finale","production_code":"","runtime":66,"season_number":1,"show_id":286801,"still_path":"/buEEJshPhyxc8WzJCGCkcw81AUP.jpg"},"name":"Monster: The Ed Gein Story","next_episode_to_air":null,"networks":[{"id":213,"logo_path":"/wwemzKWzjKYJFfCeiB57q3r4Bcm.png","name":"Netflix","origin_country":""}],"number_of_episodes":8,"number_of_seasons":1,"origin_country":["US"],"original_language":"en","original_name":"Monster: The Ed Gein Story","overview":"","popularity":266.8154,"poster_path":"/iDHzRALtZCzHVmx7uyjTTKvMAPB.jpg","production_companies":[{"id":19328,"logo_path":"/2AdkrU1av4fDGw0Zaf68XH4YcqC.png","name":"Ryan Murphy Television","origin_country":"US"},{"id":182831,"logo_path":null,"name":"Prospect Films","origin_country":"US"}],"production_countries":[{"iso_3166_1":"US","name":"United States of America"}],"seasons":[{"air_date":"2025-10-03","episode_count":8,"id":447082,"name":"Season 1","overview":"","poster_path":"/9oEJvxWAKvHUQGL8CzPwmfIxBGW.jpg","season_number":1,"vote_average":7.4}],"spoken_languages":[{"english_name":"English","iso_639_1":"en","name":"English"},{"english_name":"German","iso_639_1":"de","name":"Deutsch"}],"status":"Ended","tagline":"","type":"Miniseries","vote_average":7.475,"vote_count":216}
|
||||
|
|
@ -1 +1 @@
|
|||
{"adult":false,"backdrop_path":"/olKSgSZVyDjqd11Bgv1lMk36Jm7.jpg","created_by":[{"id":5476237,"credit_id":"683c0c2b6f2cd45f867ba527","name":"Judith Westermann","original_name":"Judith Westermann","gender":0,"profile_path":null}],"episode_run_time":[],"first_air_date":"2025-05-09","genres":[{"id":35,"name":"Comedy"}],"homepage":"","id":287877,"in_production":true,"languages":["de"],"last_air_date":"2025-06-27","last_episode_to_air":{"id":6218896,"name":"Episode 8","overview":"","vote_average":0.0,"vote_count":0,"air_date":"2025-06-27","episode_number":8,"episode_type":"standard","production_code":"","runtime":29,"season_number":1,"show_id":287877,"still_path":null},"name":"Drunter & Drüber - Chaos auf dem Friedhof","next_episode_to_air":null,"networks":[{"id":189,"logo_path":"/k1poBlW9HGDnIyZU67BtH3BXQuz.png","name":"ORF 1","origin_country":"AT"},{"id":1024,"logo_path":"/w7HfLNm9CWwRmAMU58udl2L7We7.png","name":"Prime Video","origin_country":""}],"number_of_episodes":8,"number_of_seasons":1,"origin_country":["AT"],"original_language":"de","original_name":"Drunter & Drüber - Chaos auf dem Friedhof","overview":"When a rotten gravestone kills the cemetery manager, his deputy Butz Bohrlich already sees himself as the new number one at Donnerscheidt Cemetery. However, the ambitious man is ignored and the new boss Ursula Fink is put in front of him.","popularity":0.892,"poster_path":"/kIS1dc4PhVA9qDYIkPLytqzKUSh.jpg","production_companies":[{"id":220619,"logo_path":"/5g2txBSd5ZvRcwKNKy99RX00JYc.png","name":"RUNDFILM","origin_country":"AT"}],"production_countries":[{"iso_3166_1":"AT","name":"Austria"}],"seasons":[{"air_date":"2025-05-09","episode_count":8,"id":449135,"name":"Season 1","overview":"","poster_path":"/kIS1dc4PhVA9qDYIkPLytqzKUSh.jpg","season_number":1,"vote_average":0.0}],"spoken_languages":[{"english_name":"German","iso_639_1":"de","name":"Deutsch"}],"status":"Returning Series","tagline":"","type":"Scripted","vote_average":6.0,"vote_count":7}
|
||||
{"adult":false,"backdrop_path":"/olKSgSZVyDjqd11Bgv1lMk36Jm7.jpg","created_by":[{"id":5476237,"credit_id":"683c0c2b6f2cd45f867ba527","name":"Judith Westermann","original_name":"Judith Westermann","gender":0,"profile_path":null}],"episode_run_time":[],"first_air_date":"2025-05-09","genres":[{"id":35,"name":"Comedy"}],"homepage":"","id":287877,"in_production":true,"languages":["de"],"last_air_date":"2025-06-27","last_episode_to_air":{"id":6218896,"name":"Episode 8","overview":"","vote_average":0.0,"vote_count":0,"air_date":"2025-06-27","episode_number":8,"episode_type":"standard","production_code":"","runtime":29,"season_number":1,"show_id":287877,"still_path":null},"name":"Drunter & Drüber - Chaos auf dem Friedhof","next_episode_to_air":null,"networks":[{"id":189,"logo_path":"/k1poBlW9HGDnIyZU67BtH3BXQuz.png","name":"ORF 1","origin_country":"AT"},{"id":1024,"logo_path":"/w7HfLNm9CWwRmAMU58udl2L7We7.png","name":"Prime Video","origin_country":""}],"number_of_episodes":8,"number_of_seasons":1,"origin_country":["AT"],"original_language":"de","original_name":"Drunter & Drüber - Chaos auf dem Friedhof","overview":"","popularity":0.892,"poster_path":"/kIS1dc4PhVA9qDYIkPLytqzKUSh.jpg","production_companies":[{"id":220619,"logo_path":"/5g2txBSd5ZvRcwKNKy99RX00JYc.png","name":"RUNDFILM","origin_country":"AT"}],"production_countries":[{"iso_3166_1":"AT","name":"Austria"}],"seasons":[{"air_date":"2025-05-09","episode_count":8,"id":449135,"name":"Season 1","overview":"","poster_path":"/kIS1dc4PhVA9qDYIkPLytqzKUSh.jpg","season_number":1,"vote_average":0.0}],"spoken_languages":[{"english_name":"German","iso_639_1":"de","name":"Deutsch"}],"status":"Returning Series","tagline":"","type":"Scripted","vote_average":6.0,"vote_count":7}
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
7
src/source/__fixtures__/Kokoshka/https:kokoshka.digitals5percent20Timespercent20Nopercent202023
generated
Normal file
7
src/source/__fixtures__/Kokoshka/https:kokoshka.digitals5percent20Timespercent20Nopercent202023
generated
Normal file
File diff suppressed because one or more lines are too long
1
src/source/__fixtures__/Kokoshka/https:kokoshka.digitalwp-jsondooplayerv295449movie1
generated
Normal file
1
src/source/__fixtures__/Kokoshka/https:kokoshka.digitalwp-jsondooplayerv295449movie1
generated
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"embed_url":"https:\/\/chuckle-tube.com\/e\/hild8qjsle0n","type":"iframe"}
|
||||
1
src/source/__fixtures__/Kokoshka/https:kokoshka.digitalwp-jsondooplayerv295449movie2
generated
Normal file
1
src/source/__fixtures__/Kokoshka/https:kokoshka.digitalwp-jsondooplayerv295449movie2
generated
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"embed_url":"https:\/\/vide0.net\/e\/7xawzi0jedc9","type":"iframe"}
|
||||
1
src/source/__fixtures__/Kokoshka/https:kokoshka.digitalwp-jsondooplayerv295449movie3
generated
Normal file
1
src/source/__fixtures__/Kokoshka/https:kokoshka.digitalwp-jsondooplayerv295449movie3
generated
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"embed_url":"https:\/\/listeamed.net\/e\/0DogOGgdGYOKjM6","type":"iframe"}
|
||||
|
|
@ -1,5 +1,40 @@
|
|||
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
||||
|
||||
exports[`Kokoshka handle 5 Herë Jo 1`] = `
|
||||
[
|
||||
{
|
||||
"meta": {
|
||||
"countryCodes": [
|
||||
"al",
|
||||
],
|
||||
"referer": "https://kokoshka.digital/filma/5-here-jo-2023-filmi-i-plote-shiko-online-falas-film-shqiptar/",
|
||||
"title": "5 Herë Jo (2023) Film Shqiptar - Kokoshka.Digital | Filma Me Titra Shqip",
|
||||
},
|
||||
"url": "https://chuckle-tube.com/e/hild8qjsle0n",
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"countryCodes": [
|
||||
"al",
|
||||
],
|
||||
"referer": "https://kokoshka.digital/filma/5-here-jo-2023-filmi-i-plote-shiko-online-falas-film-shqiptar/",
|
||||
"title": "5 Herë Jo (2023) Film Shqiptar - Kokoshka.Digital | Filma Me Titra Shqip",
|
||||
},
|
||||
"url": "https://vide0.net/e/7xawzi0jedc9",
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"countryCodes": [
|
||||
"al",
|
||||
],
|
||||
"referer": "https://kokoshka.digital/filma/5-here-jo-2023-filmi-i-plote-shiko-online-falas-film-shqiptar/",
|
||||
"title": "5 Herë Jo (2023) Film Shqiptar - Kokoshka.Digital | Filma Me Titra Shqip",
|
||||
},
|
||||
"url": "https://listeamed.net/e/0DogOGgdGYOKjM6",
|
||||
},
|
||||
]
|
||||
`;
|
||||
|
||||
exports[`Kokoshka handle Monster: The Ed Gein Story 2025 1`] = `
|
||||
[
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue