Jump to content

New Plugin: My Own Api Provider - JSON Metadata


mickle026

Recommended Posts

mickle026
Posted (edited)

Did some edits, added support for your api changes to PrimaryImage and Backdrop

I have renamed it, so the plugin will be in a different position in your plugin page and it will also output to the app name log, and a new config file (just delete the old one)

Quote
"PrimaryImage": [
    {
      "alt": "",
      "thumb": {
        "src": "https://image.pmgstatic.com/cache/resized/w663/files/images/film/posters/000/001/1549_54f01f.jpg",
        "width": "340",
        "height": "481"
      },
      "hires": {
        "src": "https://image.pmgstatic.com/files/images/film/posters/000/001/1549_54f01f.jpg",
        "width": 0,
        "height": 0
      }
    }

 

Quote
"BackdropImage": [
    {
      "alt": "Maggie Smith, Daniel Radcliffe, Richard Harris",
      "thumb": {
        "src": "https://image.pmgstatic.com/cache/resized/w663/files/images/film/photos/000/158/158283_117628.jpg",
        "width": "663",
        "height": "372"
      },
      "hires": {
        "src": "https://image.pmgstatic.com/files/images/film/photos/000/158/158283_117628.jpg",
        "width": 0,
        "height": 0
      }
    }

Took out the config for the server Url and Hard Coded it.  (if you are going to change it - let me know)

Now a stand alone plugin, I still have my code for MyMovieApi thats configurable and it is well on the way to being finished so do not worry about that.

Screenshot2024-03-29at03-08-34Plugins.png.e02188bdf1976801be6ec25e755c6b47.png

Screenshot2024-03-29at02-51-23Plugins.png.3f61507995020ae2212e7c5db2377a4f.png

It is really good, I am impressed with the speed of your api.

 

If you would share your php, I would be grateful - i am sure I will learn from it.

 

 

 

Edited by mickle026
Link to comment
Share on other sites

mickle026
Posted (edited)

Sorry I missed the Provider Id re-name on import.   I had re-named the key itself, but missed the import bit. 


Fixed now

 

Edited by mickle026
Link to comment
Share on other sites

hrohh

Hi Mickle,

I just add your new version, thank you.

In PrimaryImage there in web dialog there is hires instead thumb image? Or am i wrong? After click it will download hires ( it is ok ), only in dialog is maybe problem.

"BackdropImage" I can remove from API, and keep only BackdropImages? What do you think? PrimaryImage I would like to keep, because in API it is main poster image.

29.bře.2024 - 12.00.15 [GetSearchResults/Identify] PrimaryImage: System.Collections.Generic.List`1[hrohh.hrohh_MovieAPIMovieApiProvider+PrimaryImage]
29.bře.2024 - 12.00.15 [GetSearchResults/Identify] Rating: 8.2
29.bře.2024 - 12.00.15 [GetSearchResults/Identify] TrailerURL: https://video.pmgstatic.com/files/videos/157/845/157845463/168574273_91vvvc.mp4
29.bře.2024 - 12.00.15 [GetSearchResults/Identify] Adding Production Year: 2023
29.bře.2024 - 12.00.15 [GetSearchResults/Identify] Failed to Parse Rating as a Float
29.bře.2024 - 12.00.15 [GetSearchResults/Identify] Adding Trailer: System.String[]
29.bře.2024 - 12.00.15 [GetMetadata] Failed to Data for: Chudáčci
System.NullReferenceException: Object reference not set to an instance of an object.
at hrohh.hrohh_MovieAPIMovieApiProvider.GetMetadata(MovieInfo info, CancellationToken cancellationToken)

 

Link to comment
Share on other sites

mickle026
Posted (edited)
On 29/03/2024 at 11:22, hrohh said:

Hi Mickle,

I just add your new version, thank you.

In PrimaryImage there in web dialog there is hires instead thumb image? Or am i wrong? After click it will download hires ( it is ok ), only in dialog is maybe problem.

"BackdropImage" I can remove from API, and keep only BackdropImages? What do you think? PrimaryImage I would like to keep, because in API it is main poster image.

 

Again sorry, that is misleading for you

Copy & Pasting in a rush! - I have put in  what doesnt need to be there

[GetSearchResults/Identify] is wrong here, it  is actually happening in [GetMetadata] - The primary image is not used here at all so the logging was initally for me to see what was happening and wasnt removed .  Thats the he old value before you nested it in hires.src is what is displayed here.  It doesnt matter here so I have removed it.

I cannot access your json at the moment to check your json

http://server/?Name=Chudáčci

504: Gateway Timeout

Here is the Log text corrected, added a better float value handler and an error handler for trailerURL and changed to just a string.

So hopefully rating and TrailerURL should parsde correctly, but I cannot check with your api being down.

 

 

Edited by mickle026
Link to comment
Share on other sites

hrohh

Sorry, server was down :( I have only 2GB rams on server, I need to migrate on different VPS.

You have absolutely right about ordering of images metadata savers! It is solved! :))

There is maybe problem with link CSFD.cz Id:. I dont have this field in metadata web view dialog and link missing on page.

29.bře.2024 - 15.36.04 [GetMetadata] ServerQueryUrl: https://czechapi.000.pe/?Name=Jeden život&Year=2023&Id=tt13097932
29.bře.2024 - 15.36.10 [GetMetadata] Found: 1 Items
29.bře.2024 - 15.36.10 [GetMetadata] Found Data for: Jeden život
29.bře.2024 - 15.36.10 [GetMetadata] Name: Jeden život
29.bře.2024 - 15.36.10 [GetMetadata] CreationYear: 2023
29.bře.2024 - 15.36.10 [GetMetadata] Id: 1246748
29.bře.2024 - 15.36.10 [GetMetadata] Overview: Jeden život je britský životopisný film o britském humanitárním pracovníkovi Nicholasi Wintonovi. Film sleduje Wintona, který se ohlíží za svou minulostí, kdy pomáhal skupinám židovských dětí v Němci okupovaném Československu, aby se mohly ukrýt a uprchnout v letech 1938-39, těsně před začátkem druhé světové války.
29.bře.2024 - 15.36.10 [GetMetadata] Adding Production Year: 2023
29.bře.2024 - 15.36.10 [GetMetadata] Rating Detected: 8.6
29.bře.2024 - 15.36.10 [GetMetadata] Adding Rating as float value: 0
29.bře.2024 - 15.36.10 [GetMetadata] Adding Trailer: https://video.pmgstatic.com/files/videos/157/832/157832313/168017686_quargu.mp4
29.bře.2024 - 15.36.10 [GetMetadata] Failed to Data for: Jeden život
System.NullReferenceException: Object reference not set to an instance of an object.
at hrohh.hrohh_MovieAPIMovieApiProvider.GetMetadata(MovieInfo info, CancellationToken cancellationToken)
29.bře.2024 - 15.36.10 [GetMetadata] Returning result to emby core

 

Edited by GrimReaper
URL appended
Link to comment
Share on other sites

mickle026
Posted (edited)
Quote

You have absolutely right about ordering of images metadata savers! It is solved! :))

:) glad it is sorted - I cannot do that within the plugin.

Quote

There is maybe problem with link CSFD.cz Id:. I dont have this field in metadata web view dialog and link missing on page.

? I have it

Screenshot2024-03-29at15-41-05MediaServer.png.ce273417cf70c17171fbb6c4604250a4.png

I am using server version 4.8+ though

4.8.jpg.a24ea68f70952d1082fe41ab50bf686f.jpg

 

I can downgrade the build package if you are on an older server version or want to support older emby builds.  It shouldnt be an issue with this as you can see im still using .net 2 !!

 

 

I have added some error traps for everything after adding adding the trailer, so that the log will show whats not working.  It will probably still error but will tell me where instead of failing altogether.

 

 

Edited by mickle026
Link to comment
Share on other sites

hrohh

I have Emby 4.9.0.12 beta.

Now it is working great!

29.bře.2024 - 17.24.41 [GetMetadata] --------------------- [NEW METADATA SEARCH] ---------------------
29.bře.2024 - 17.24.41 [GetMetadata] ServerBaseUrl: https://czechapi.000.pe/?
29.bře.2024 - 17.24.41 [GetMetadata] Querybuiler: https://czechapi.000.pe/?Name=Chudáčci
29.bře.2024 - 17.24.41 [GetMetadata] Querybuiler: https://czechapi.000.pe/?Name=Chudáčci&Year=2023
29.bře.2024 - 17.24.41 [GetMetadata] Querybuiler: https://czechapi.000.pe/?Name=Chudáčci&Year=2023&Id=tt14230458
29.bře.2024 - 17.24.41 [GetMetadata] ServerQueryUrl: https://czechapi.000.pe/?Name=Chudáčci&Year=2023&Id=tt14230458
29.bře.2024 - 17.24.43 [GetMetadata] Found: 1 Items
29.bře.2024 - 17.24.43 [GetMetadata] Found Data for: Chudáčci
29.bře.2024 - 17.24.43 [GetMetadata] Name: Chudáčci
29.bře.2024 - 17.24.43 [GetMetadata] CreationYear: 2023
29.bře.2024 - 17.24.43 [GetMetadata] Id: 1002404
29.bře.2024 - 17.24.43 [GetMetadata] Overview: Od režiséra Yorgose Lanthimose a producentky Emmy Stone přichází neuvěřitelný příběh o fantastickém vývoji Belly Baxter, mladé ženy, kterou k životu vrátil geniální a nekonvenční vědec Dr. Godwin Baxter. Pod Baxterovou ochranou Bella touží po poznání. Hladovějící po zkušenostech, které jí chybí, uteče s Duncanem Wedderburnem, mazaným a zhýralým právníkem, do víru dobrodružství napříč kontinenty. Nepodléhajíc předsudkům své doby se Bella zasazuje za rovnoprávnost a svobodu.
29.bře.2024 - 17.24.43 [GetMetadata] Adding Production Year: 2023
29.bře.2024 - 17.24.43 [GetMetadata] Rating Detected: 8.2
29.bře.2024 - 17.24.43 [GetMetadata] Adding Rating as float value: 0
29.bře.2024 - 17.24.43 [GetMetadata] Adding Trailer: https://video.pmgstatic.com/files/videos/157/845/157845463/168574273_91vvvc.mp4
29.bře.2024 - 17.24.43 [GetMetadata] Adding Tag: láska
29.bře.2024 - 17.24.43 [GetMetadata] Adding Tag: podle knihy
29.bře.2024 - 17.24.43 [GetMetadata] Adding Tag: manželé
29.bře.2024 - 17.24.43 [GetMetadata] Adding Tag: sex
29.bře.2024 - 17.24.43 [GetMetadata] Adding Tag: cestování
29.bře.2024 - 17.24.43 [GetMetadata] Adding Tag: nemoc
29.bře.2024 - 17.24.43 [GetMetadata] Adding Tag: sebevražda
29.bře.2024 - 17.24.43 [GetMetadata] Adding Tag: prostituce
29.bře.2024 - 17.24.43 [GetMetadata] Adding Tag: deprese
29.bře.2024 - 17.24.43 [GetMetadata] Adding Tag: prostitutka
29.bře.2024 - 17.24.43 [GetMetadata] Adding Tag: Paříž
29.bře.2024 - 17.24.43 [GetMetadata] Adding Tag: věda
29.bře.2024 - 17.24.43 [GetMetadata] Adding Tag: sluha
29.bře.2024 - 17.24.43 [GetMetadata] Adding Tag: steampunk
29.bře.2024 - 17.24.43 [GetMetadata] Adding Tag: řecká divná vlna
29.bře.2024 - 17.24.43 [GetMetadata] Adding Genre: Sci-Fi
29.bře.2024 - 17.24.43 [GetMetadata] Adding Genre: Komedie
29.bře.2024 - 17.24.43 [GetMetadata] Adding Genre: Drama
29.bře.2024 - 17.24.43 [GetMetadata] Adding Genre: Romantický
29.bře.2024 - 17.24.43 [GetMetadata] Failed to add Actors
System.NullReferenceException: Object reference not set to an instance of an object.
at hrohh.hrohh_MovieAPIMovieApiProvider.GetMetadata(MovieInfo info, CancellationToken cancellationToken)
29.bře.2024 - 17.24.43 [GetMetadata] Failed to add Directors
System.NullReferenceException: Object reference not set to an instance of an object.
at hrohh.hrohh_MovieAPIMovieApiProvider.GetMetadata(MovieInfo info, CancellationToken cancellationToken)
29.bře.2024 - 17.24.43 [GetMetadata] Failed to add Writers/Authors
System.NullReferenceException: Object reference not set to an instance of an object.
at hrohh.hrohh_MovieAPIMovieApiProvider.GetMetadata(MovieInfo info, CancellationToken cancellationToken)
29.bře.2024 - 17.24.43 [GetMetadata] Adding Data for: Chudáčci
29.bře.2024 - 17.24.43 [GetMetadata] Returning result to emby core
29.bře.2024 - 17.24.45 [GetImages] --------------------- [hrohh_MovieAPI - NEW IMAGE SEARCH] ---------------------
29.bře.2024 - 17.24.45 [GetImages] ServerBaseUrl: https://czechapi.000.pe/?
29.bře.2024 - 17.24.45 [GetMetadata] Querybuiler: https://czechapi.000.pe/?Name=Chudáčci
29.bře.2024 - 17.24.45 [GetMetadata] Querybuiler: https://czechapi.000.pe/?Name=Chudáčci&Year=2023
29.bře.2024 - 17.24.45 [GetMetadata] Querybuiler: https://czechapi.000.pe/?Name=Chudáčci&Year=2023&Id=tt14230458
29.bře.2024 - 17.24.45 [GetImages] ServerQueryUrl: https://czechapi.000.pe/?Name=Chudáčci&Year=2023&Id=tt14230458
29.bře.2024 - 17.24.45 [GetImages] Downloading JSON from: https://czechapi.000.pe/?Name=Chudáčci&Year=2023&Id=tt14230458
29.bře.2024 - 17.24.45 [GetImages] Found: Chudáčci
29.bře.2024 - 17.24.45 [GetImages] CreationYear: 2023
29.bře.2024 - 17.24.45 [GetImages] Id: 1002404
29.bře.2024 - 17.24.45 [GetImages] Adding Primary image: https://image.pmgstatic.com/files/images/film/posters/168/416/168416248_99popv.jpg
29.bře.2024 - 17.24.45 [GetImages] Adding Primary image: https://image.pmgstatic.com/files/images/film/posters/168/768/168768538_ar34in.jpg
29.bře.2024 - 17.24.45 [GetImages] Adding Primary image: https://image.pmgstatic.com/files/images/film/posters/168/790/168790249_lqlt2a.jpg
29.bře.2024 - 17.24.45 [GetImages] Adding Primary image: https://image.pmgstatic.com/files/images/film/posters/168/510/168510286_ir6dqy.jpg
29.bře.2024 - 17.24.45 [GetImages] Adding Primary image: https://image.pmgstatic.com/files/images/film/posters/167/593/167593018_k7fvdi.jpg
etc...

 

Edited by GrimReaper
URLs appended
Link to comment
Share on other sites

mickle026
Posted (edited)

You dont have studio like: Warner Bros  in api ?

 

also added check for

Moviename or moviename+year

when decide if returned json result is correct, because when you remove Identification from emby it can request moviename with year instead of just moviename

like this:

Harry Potter a Kámen mudrců (2001)&Year=2001

 

I fixed the actor / director / writer  import

 

29.Mar.2024  -  16.45.27 [GetMetadata] --------------------- [NEW METADATA SEARCH] ---------------------
29.Mar.2024  -  16.45.27 [GetMetadata] ServerBaseUrl: https://server/csfd2/?
29.Mar.2024  -  16.45.27 [GetMetadata] Querybuiler: https://server/csfd2/?Name=Harry Potter a Kámen mudrců
29.Mar.2024  -  16.45.27 [GetMetadata] Querybuiler: https://server/csfd2/?Name=Harry Potter a Kámen mudrců&Year=2001
29.Mar.2024  -  16.45.27 [GetMetadata] Querybuiler: https://server/csfd2/?Name=Harry Potter a Kámen mudrců&Year=2001&Id=tt0241527
29.Mar.2024  -  16.45.27 [GetMetadata] ServerQueryUrl: https://server/csfd2/?Name=Harry Potter a Kámen mudrců&Year=2001&Id=tt0241527
29.Mar.2024  -  16.45.28 [GetMetadata] Found: 1 Items
29.Mar.2024  -  16.45.28 [GetMetadata] Found Data for: Harry Potter a Kámen mudrců
29.Mar.2024  -  16.45.28 [GetMetadata] Attempting to decode... Results will follow
29.Mar.2024  -  16.45.28 [GetMetadata] Name: Harry Potter a Kámen mudrců
29.Mar.2024  -  16.45.28 [GetMetadata] CreationYear: 2001
29.Mar.2024  -  16.45.28 [GetMetadata] Id: 1626
29.Mar.2024  -  16.45.28 [GetMetadata] Overview: Před deseti lety položili čarodějové Brumbál, Hagrid a McGonagallová na práh domu Vernona a Petunie Dursleyových miminko s jizvou na čele. Je to malý Harry Potter, syn Petuniiny zemřelé sestry. Dursleyovi se o něj sice starají, na rozdíl od vlastního syna Dudleyho mu však neprojevují příliš lásky. Když se blíží Harryho jedenácté narozeniny, zjistí ke svému překvapení, že dokáže mluvit s hadem. V den narozenin mu čaroděj Hagrid doručí dort a dopis. Harry se dozví, že jeho rodiče byli čarodějové a nezahynuli při obyčejné autonehodě, ale v boji se zlým Voldemortem. Jizvu na čele si odnesl z tohoto boje. Nyní má právo nastoupit do učení ve Škole kouzel a čar v Bradavicích. Hagrid mu pomůže nakoupit školní pomůcky, včetně kouzelnické hůlky, a potom ho pošle na nádraží, kde z tajného nástupiště 9 3/4 odjíždí expres do Bradavic. Ve vlaku se Harry skamarádí se sympatickou Hermionou a dobráckým Ronem. Společně se pak dostanou na prestižní kolej Nebelvíru. Díky mimořádnému talentu k létání se stane novým chytačem nebelvírského famfrpálového mužstva. Po zápasu čeká žáky Vánoční volno, kterého Harry, Ron a Hermiona využijí k pátrání po tajemství, které střeží v podzemí školy trojhlavý pes.
29.Mar.2024  -  16.45.28 [GetMetadata] Adding Production Year:  2001
29.Mar.2024  -  16.45.28 [GetMetadata] Rating Detected: 7.9
29.Mar.2024  -  16.45.28 [GetMetadata] Adding Rating as float value: 7.9
29.Mar.2024  -  16.45.28 [GetMetadata] Adding Trailer:  https://video.pmgstatic.com/files/videos/000/304/304811/157699996_08c646.mp4
29.Mar.2024  -  16.45.28 [GetMetadata] Adding Tag: podle knihy
29.Mar.2024  -  16.45.28 [GetMetadata] Adding Tag: smrt
29.Mar.2024  -  16.45.28 [GetMetadata] Adding Tag: rodina
29.Mar.2024  -  16.45.28 [GetMetadata] Adding Tag: přátelství
29.Mar.2024  -  16.45.28 [GetMetadata] Adding Tag: přátelé
29.Mar.2024  -  16.45.28 [GetMetadata] Adding Tag: dívka
29.Mar.2024  -  16.45.28 [GetMetadata] Adding Tag: otec
29.Mar.2024  -  16.45.28 [GetMetadata] Adding Tag: matka
29.Mar.2024  -  16.45.28 [GetMetadata] Adding Tag: škola
29.Mar.2024  -  16.45.28 [GetMetadata] Adding Tag: Vánoce
29.Mar.2024  -  16.45.28 [GetMetadata] Adding Tag: syn
29.Mar.2024  -  16.45.28 [GetMetadata] Adding Tag: chlapec
29.Mar.2024  -  16.45.28 [GetMetadata] Adding Tag: les
29.Mar.2024  -  16.45.28 [GetMetadata] Adding Tag: dospívání
29.Mar.2024  -  16.45.28 [GetMetadata] Adding Tag: učitel
29.Mar.2024  -  16.45.28 [GetMetadata] Adding Tag: rodiče
29.Mar.2024  -  16.45.28 [GetMetadata] Adding Tag: sourozenci
29.Mar.2024  -  16.45.28 [GetMetadata] Adding Tag: bratři
29.Mar.2024  -  16.45.28 [GetMetadata] Adding Tag: duchové
29.Mar.2024  -  16.45.28 [GetMetadata] Adding Tag: studenti
29.Mar.2024  -  16.45.28 [GetMetadata] Adding Tag: kouzla
29.Mar.2024  -  16.45.28 [GetMetadata] Adding Tag: magie
29.Mar.2024  -  16.45.28 [GetMetadata] Adding Tag: zlo
29.Mar.2024  -  16.45.28 [GetMetadata] Adding Tag: čarodějnice
29.Mar.2024  -  16.45.28 [GetMetadata] Adding Tag: sirotek
29.Mar.2024  -  16.45.28 [GetMetadata] Adding Tag: draci
29.Mar.2024  -  16.45.28 [GetMetadata] Adding Tag: hadi
29.Mar.2024  -  16.45.28 [GetMetadata] Adding Tag: čarodějové
29.Mar.2024  -  16.45.28 [GetMetadata] Adding Tag: čarodějnictví
29.Mar.2024  -  16.45.28 [GetMetadata] Adding Tag: narozeniny
29.Mar.2024  -  16.45.28 [GetMetadata] Adding Tag: zoologická zahrada
29.Mar.2024  -  16.45.28 [GetMetadata] Adding Tag: šachy
29.Mar.2024  -  16.45.28 [GetMetadata] Adding Tag: zrcadlo
29.Mar.2024  -  16.45.28 [GetMetadata] Adding Tag: trollové
29.Mar.2024  -  16.45.28 [GetMetadata] Adding Tag: strýc
29.Mar.2024  -  16.45.28 [GetMetadata] Adding Genre: Fantasy
29.Mar.2024  -  16.45.28 [GetMetadata] Adding Genre: Rodinný
29.Mar.2024  -  16.45.28 [GetMetadata] Adding Genre: Dobrodružný
29.Mar.2024  -  16.45.28 [GetMetadata] Adding Genre: Mysteriózní
29.Mar.2024  -  16.45.28 [GetMetadata] Adding Actor:  Daniel Radcliffe
29.Mar.2024  -  16.45.28 [GetMetadata] Adding Actor:  Rupert Grint
29.Mar.2024  -  16.45.28 [GetMetadata] Adding Actor:  Emma Watson
29.Mar.2024  -  16.45.28 [GetMetadata] Adding Actor:  Robbie Coltrane
29.Mar.2024  -  16.45.28 [GetMetadata] Adding Actor:  Tom Felton
29.Mar.2024  -  16.45.28 [GetMetadata] Adding Actor:  Richard Harris
29.Mar.2024  -  16.45.28 [GetMetadata] Adding Actor:  Fiona Shaw
29.Mar.2024  -  16.45.28 [GetMetadata] Adding Actor:  Ian Hart
29.Mar.2024  -  16.45.28 [GetMetadata] Adding Actor:  John Hurt
29.Mar.2024  -  16.45.28 [GetMetadata] Adding Actor:  Richard Griffiths
29.Mar.2024  -  16.45.28 [GetMetadata] Adding Director:  Chris Columbus
29.Mar.2024  -  16.45.28 [GetMetadata] Adding Writer/Author:  J. K. Rowling
29.Mar.2024  -  16.45.28 [GetMetadata] Adding Data for: Harry Potter a Kámen mudrců
29.Mar.2024  -  16.45.28 [GetMetadata] if nothing was added - then no results will be returned
29.Mar.2024  -  16.45.28 [GetMetadata] Returning result to emby core

 

Edited by mickle026
Link to comment
Share on other sites

hrohh

Unfortunately, there are no studios on csfd.cz. 

Thanks for movie name plus year, but in PHP I join itself in API - so it will be "Harry Potter a Kámen mudrců (2001) (2001)", but I think, that it has no effect on detection, google find right movie.

Last things, which I like

  1. In web dialog, below images, on others savers, there are resolutions. It is possible add string [hires][width]x[hires][height]? Now my API return 0 (zero) px, but with parameter image=resolution it will return 
    https://czechapi.000.pe/?Name=harry potter a kámen mudrců&Year=2001&image=resolution
    it has seriously impact for speed, because it has to contact all jpg files via header request. Some images on csfd.cz are too small, so it can be usefull for selecting right image for backdrop.image.thumb.png.9980dd471678d66b8d273b0d0197ee11.png
  2. Please lowercase all GET parameters, so instead 
    https://czechapi.000.pe/?Name=harry potter a kámen mudrců&Year=2001
    would be
    https://czechapi.000.pe/?name=harry potter a kámen mudrců&year=2001
    it is more standard in web coding. Now my API can only Name, Year, but if you will change your code, I will change too
  3. Can you please remove CSS in config page? I just removed H1 style and all HR, it is better I think. Im using DARK theme.
    image.png.c8adf243e3649e370e641de9bae411e9.png
    vs
    image.png.cf9b13a18100fbc9f3178c195c9c5251.png

Thank you again!

Edited by GrimReaper
URLs appended
Link to comment
Share on other sites

mickle026
Posted (edited)

I am not joining it, just checking if emby supplied name as Moviename (YYYY) and Year also as YYYY

So in the plugin internally what I have done  is if emby supplies

1 Buck (2017) , and also 2017 as the year
?name=1 Buck (2017)&year=2017

I have internally removed (2017) from the name so you will always get
?name=1 Buck&year=2017

Does that make sense?

1.  I am supplying the height and width back to emby already

 I have added the other values you see there as dummy values incase the web element wont draw if one is empty (language, votes and vote type)

it is like that with people, if you have place of birth but do not have birthday, it wont show place of birth.

2.  I have rebuilt with the name, year and id in lowercase

3.  Done - removed the style.

 

Edited by mickle026
Link to comment
Share on other sites

hrohh

Hi sir, 

sorry fo delay, we have holidays with family.

Thank you for your work!

I have news about my API. Sometimes IMDB was missing in JSON. My internal login process to csfd.cz not worked. Now it is fixed.

I have big update! Now it is multilanguage. I did not know that the csfd website also offers other languages.

https://czechapi.000.pe/?name=gentlemen&year=2024&type=series&lang=pl

https://czechapi.000.pe/?name=gentlemen&year=2024&type=series&lang=at

https://czechapi.000.pe/?name=gentlemen&year=2024&type=series&lang=sk

https://czechapi.000.pe/?name=gentlemen&year=2024&type=series&lang=fr

All possibillities are

'cz' - it is native csfd.cz
others =>  'sk', 'at', 'gb', 'us', 'de', 'es', 'fi', 'fr', 'hu', 'pl'
 
In this week I would like to work on saving parts of json to database. Mainly gallery and videos, which is slow, because of many requests to csfd. 
 
Also I reworked my background scraping, which we need to imdb => csdf for 100% match. I have about 1 400 000 records in db, but now 90 000 need to get :) In Jan 2022 was my last scraping. So on csfd.cz they work hard :) 
 
Edited by GrimReaper
URLs appended
Link to comment
Share on other sites

mickle026

image.png

 

I am supplying the image sizes back to emby. 

I have tried lots of different things and still I cannot get them to show in the web dialog.  I have checked the tmdb code and this seems to be what that plugin is doing, however they dont show for me.

int? width = bimage.hires.width;
int? height = bimage.hires.height;

//

Url = bimage.hires.src ?? null,
Type = ImageType.Backdrop,
Width = width,
Height = height,
CommunityRating =0,
RatingType = MediaBrowser.Model.Dto.RatingType.Score,
VoteCount = 0,
Language = null ?? locale,
DisplayLanguage = null ?? locale,
ProviderName = $"CzechMovieApi",
ThumbnailUrl = bimage.thumb.src ?? bimage.hires.src,

Please ignore the language in this preview, its null so it show the images in my language (the default one emby is using) while testing - otherwise i have to use to toggle for all languagues to see them.

If I set the language in the returned results to emby then it hides the backdrops from every system that has a prefered metadat language that is different, so I think it might be better not to use this and return results based on what your api returns with &lang= enabled.

I am not sure what you want to do here

I have impliment this:

&type=movie&lang=fr

but it errors if you dont have the language, it just needs either to return a default one, or nothing at all.  That means if the language is different no image are returned either...

 

 

Link to comment
Share on other sites

hrohh

Sorry, I had to disabled due to testing of multilang.

You can force it by adding image=resolution

https://czechapi.000.pe/?name=one life&image=resolution

But, look at this picture resolution 
https://image.pmgstatic.com/files/images/film/photos/168/611/168611055_pg92fv.jpg

Now I need to work for optimalization.

 

Edited by GrimReaper
URL appended
Link to comment
Share on other sites

hrohh

Default language is Czech (without parameter &lang=XX)

with parameter lang=pl
look at Posters image at API
https://czechapi.000.pe/?name=potter fenix order&lang=pl
vs website
https://www.filmbooster.pl/film/197182-harry-potter-i-zakon-feniksa/galeria/plakaty/

Domains are

'cz' = csfd.cz
'sk' = csfd.sk
'at' = filmbooster.at
'gb' = filmbooster.co.uk
'us' = filmbooster.com
'de' = filmbooster.de
'es' = filmbooster.es
'fi' = filmbooster.fi
'fr' = filmbooster.fr
'hu' = filmbooster.hu
'pl' = filmbooster.pl

Main different with lang=XX are Posters. Also overview, title, tags, genre.

 

Edited by GrimReaper
URL appended
Link to comment
Share on other sites

hrohh

Sorry Title of movie is now always in czech, so I need to unlogin from page, and then I get title in locale.

Link to comment
Share on other sites

hrohh

Hello sir,

i fixed some issues with translations. Now it is good I think. Also rewrite function for get image size of large images. It should be about 30% faster.

I found some issue in logs

02.dub.2024  -  00.22.29 [GetMetadata] --------------------- [NEW METADATA SEARCH] ---------------------
02.dub.2024  -  00.22.29 [GetMetadata] ServerBaseUrl: https://czechapi.000.pe/?
02.dub.2024  -  00.22.29 [GetMetadata] ServerQueryUrl: https://czechapi.000.pe/?name=Chudáčci&year=2023&idtt14230458
02.dub.2024  -  00.22.32 [GetMetadata] Found: 1 Items
02.dub.2024  -  00.22.32 [GetMetadata] Found Data for: Chudáčci
02.dub.2024  -  00.22.32 [GetMetadata] Attempting to decode... Results will follow
02.dub.2024  -  00.22.32 [GetMetadata] Name: Chudáčci
02.dub.2024  -  00.22.32 [GetMetadata] CreationYear: 2023
02.dub.2024  -  00.22.32 [GetMetadata] Id: 1002404

&idtt14230458 should be &id=tt14230458

Thank you.

Edited by GrimReaper
URLs appended
Link to comment
Share on other sites

  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...