mickle026 338 Posted November 4, 2022 Share Posted November 4, 2022 (edited) This is just a fully working version of the Person Provider. (I think - LOL , at least until I find some bugs!) Requres latest stable 4.7.9 As Always with my plugins, I accept no resposibility for anything..... its up to you if you try it. Basically what it is, it lets you use your own json server to serve metadata for people directly into Emby as a metadata fetcher (with images) People fetchers dont need turning on in library settings, they are already on by default. So apart from the server string and mappings, there no more config. *This plugin does not cover musicartists* Anyway anyone who wants to have a play can, let me know in the comment whether I should make this cover everything else so you can have your own Metadata servers So far its only People The config page lets you MAP your JSON to work with EMBY, so your JSON Element Names can be whatever you like,,you map them here. The path to the image has 3 settings, it allows for a full url, a partial url and a base url path or a filename and a base url path Edit Images (Magnifying glass search) Identify (Looking for a Lee !) I have included the config file to my test server so you can at least try it. My test server is all asian people (some do not have images as you will no doubt find) so if you look for anyone else you wont find them! you can try the web view here http://media-and-meta.ddns.net/metaserver/DBQueries/Find&Editperson.php Any way if you try it let me know your findings - thanks And Thanks to @TallBoiDezfor the inspiration to do this... CreateMovieApi.zip MyPersonApiProvider.zip CreatePersonApi.zip Edited December 2, 2022 by mickle026 update server version required 2 1 Link to comment Share on other sites More sharing options...
mickle026 338 Posted November 5, 2022 Author Share Posted November 5, 2022 (edited) So what I have done is temporarily removed the plugins that were here whilst I fix what I know can be improved Edited November 10, 2022 by mickle026 Link to comment Share on other sites More sharing options...
TallBoiDez 8 Posted November 5, 2022 Share Posted November 5, 2022 Nice, im still trying to add a query string to my API, i believe i found the solution Link to comment Share on other sites More sharing options...
mickle026 338 Posted November 5, 2022 Author Share Posted November 5, 2022 My test server is actually all XML, I use PHP to convert it to JSON on the fly. Link to comment Share on other sites More sharing options...
TallBoiDez 8 Posted November 5, 2022 Share Posted November 5, 2022 Hmm, maybe I can do something similar Link to comment Share on other sites More sharing options...
Cheesegeezer 3078 Posted November 5, 2022 Share Posted November 5, 2022 @mickle026 grats on the release chief! Great work, i been observing the dev posts you made and its quite a feat what you have achieved here. 1 Link to comment Share on other sites More sharing options...
mickle026 338 Posted November 6, 2022 Author Share Posted November 6, 2022 I have the intention to cover all providers. I already have a song cover provider of my own (for music), A lot of my tracks have their own covers different from the album itself, I'll probably make that available too as there are no others that I know of. 1 Link to comment Share on other sites More sharing options...
chef 3666 Posted November 6, 2022 Share Posted November 6, 2022 Excellent work Link to comment Share on other sites More sharing options...
mickle026 338 Posted November 8, 2022 Author Share Posted November 8, 2022 (edited) *UPDATED 9th Nov 2022 @ 5.30am GMT 1. Handle DirectoryNames with Invalid Characters (if persons name has a character in it that cannot be used to build the directory name) These are changed to _ (previously crashed the plugin) If it still fails on a person it will now continue after logging the failure. 2. Fix Correct Php generation for SearchById and add 3. Change searchNames in php as in fix 1, replace invalid characters with _ 4. Changed the php Names To PersonSearch.php etc to allow future export files without clasing. (updated this post examples) It might need some tweeks, but here is an Emby Exporter for your People (Not MusicArtist) to A local Backup Path to create a structured API Remember this is just a tool, you can create your own if you do not like the way this tool does it. The Plugin Exports an XML file and the Primary image (Only the primary image at the moment) into a folder named with the Person name, Year of birth and Provider keys like this: It also writes 3 PHP files for use on a php enabled webpage You can then use an api string with Search.php If no format is supplied, json will be automatically returned any of the elements can be supplied: Name Year Id http://<YourServer>/PersonSearch.php?Name=<Name>&Year=<Year>&Id=<Id>&Format=json examples: http://<YourServer>/PersonSearch.php?Name=Tom Cruise http://<YourServer>/PersonSearch.php?Name=Tom http://<YourServer>/PersonSearch.php?Name=Tom Cruise&Year=1962 http://<YourServer>/PersonSearch.php?Name=Tom Cruise&Year=1962&Id=nm0000129 The Api server will respond with a json result if it exists (XML is converted to json on the fly) The php is very basic, it gets a file list of this directory , searches the directory names for the Name, Year or Id provided and replies with the Person.xml inside the folder, building a json array if there is more than one result Currently only php is available, if someone can convert the php to javascript for me that would be awesome!! - as then it would work on the very basic websites. One thing to note is that I need to update the API Providers to allow and prioitise ID searches - this is a still to do! Download currently removed whilst I fix another bug! (wont be too long) Edited November 9, 2022 by mickle026 1 Link to comment Share on other sites More sharing options...
mickle026 338 Posted November 10, 2022 Author Share Posted November 10, 2022 (edited) OK so now improved an mostly tested up to the point of primary images. (I havent tested backdrops and logos) Please note that there is still an issue with identify removing images, or not fetching them. (if it has a json reply with no image in it) *Fixed an error in SearchById.php *Completely changed the server config string and added server string mapping, see the plugin and images in this post So for the Api server it must have these elements in the query string: Name={Name}&Year={Year}&Id={Id} http://media-and-meta.ddns.net/metaserver/TIBML/PersonSearch.php?Name={Name}&Year={Year}&Id={Id} ^^ this is my test server - I moved it from the original post ^^ So now auto lookup by emby uses Ids if they are available, you can now search for any id in the MyPersonApi field of the Emby identify feature If the api can search it by id it will return the json For Example the CreatePersonApi tool below creates seperate folders for each person like this: Park So-dam(1991)[Tmdb-1442583][Imdb-nm6524394][Tvdb-515330] So in identify CreatePersonApi Id: I have made it a general search as in Name with the supplied php You can search any of that text, Park So-dam,1442583,nm6524394 etc The CreatePersonApi now writes the <PrimaryImage> Tag with <PrimaryImage>/PersonsName+Ids/Image.jpg</PrimaryImage> So to Use the Provider you should map the path+ the primary image string with the drop down selection My Config is included to my server so you can see how it works Once you are happy with it up and running turn logging off as it slows it down. My Api server is not at all quick so if you use it expect its to slow down loading pages. You can increase your api server simply by adding files and folders to it, but please remember that the create api tool will overwrite so backup somewhere else and then move what you want to your api site. It can also be turned on/off in the config page near the save settings button The api string should now also be able to be in this format too (I havent tested this) http://[host address]/people/{Name} http://[host address]/people/{Name}+{Year}+{Id} http://[host address]/people/{Name}&{Year}&{Id} and leave all the server string mappings blank Im thinking of adding a timeout to the server query, what do you think? Edited November 18, 2022 by mickle026 Link to comment Share on other sites More sharing options...
mickle026 338 Posted November 15, 2022 Author Share Posted November 15, 2022 (edited) It turns out I had introduced 2 seperate bugs, I found and fixed one of them easily because it was in the new code, the other I dont even know how I introduced it and was much harder to find. Anyway its done! Completely fixed, please update to this one, and sorry for the inconvenience One thing to note is date of birth / death in your json has to be in dd/mm/yyyy format with those slashes. I can add support for other type if requested. Other is there is now a testpage, for testing the server but that is NOT functional yet. I was doing that whilst getting Peeved by having a hard time finding the bugs! So its a still to do. I reposted the dll in the 1st post and updated the screenshot I have a week off work coming up soon, so I hope to finish it properly then get on to the other media types. Edited November 15, 2022 by mickle026 1 Link to comment Share on other sites More sharing options...
mickle026 338 Posted November 18, 2022 Author Share Posted November 18, 2022 CreatePersonApi is now fully functional, it now outputs Banners,Backdrops etc and adds them to the source xml that creates the lookup json. MyPersonApi is now fully functional. It will now import Backdrops (only 1 is fetched automatically, that must be an internal emby thing) but the rest can be fetched from the Edit Images option. The server testing page is also now working. I have also started on CreateMovieApi, I have included it here as it seems fully functional (although its for testing). This will create a backup of your Emby movie library complete with the php files for the Api, I will now start on the MyMovieApi for fetching back into Emby. 1 Link to comment Share on other sites More sharing options...
mickle026 338 Posted November 22, 2022 Author Share Posted November 22, 2022 (edited) MyPersonApi, updated. A Few fixes. Handle Array'ed Json in Images , now wont crash, but if an array of json is returned on single person (ie in my own api server jo Lin, ad Jo Linwood can be returned fo just Jo Lin). I still have to impliment the result of an array, so that the correct result is used. For now its just error handled. Handle Identify Metadata better, there was a crash when Overview or Primary Image in the Json was empty or was not present. Now it is handled. The crash caused the plugin to exit, and therefore metadata was not updated. Edited November 22, 2022 by mickle026 Link to comment Share on other sites More sharing options...
mickle026 338 Posted November 26, 2022 Author Share Posted November 26, 2022 (edited) MyPersonApi, updated. (this is now all working) - hopefully no more bugs! Nearly Everything is imported! Overviews, Date of birth , Place of Birth, Date of Death , Images etc (only 1 backdrop, Emby limitation) However using Edit Images you can import more! (at the moment the last thing to fix is import provider ids) GetImages array json now handled To search just MyPersonApi with Identify (and ignore default TMDB), leave the Name field blank and enter either the name or id (not both) in MyPersonApi id: field. This might produce an error in the logs for tmdb, as nothin is passed to it (but you can safely ignore that) CreatePersonApi Updated UTF8 now supported when exporting Updated PHP Included a HowTo.txt when the plugin is run and php is selected as output, it includes How To install & Create a truenas server Exports to folders with provider keys, an xml file in the folder with the images. Added a date Update 2 dec 2022 Added Provider Id support to import. Edited December 2, 2022 by mickle026 1 Link to comment Share on other sites More sharing options...
hrohh 0 Posted September 14 Share Posted September 14 Hi, when MyMovieApiProvider will be released? Thank you Link to comment Share on other sites More sharing options...
mickle026 338 Posted September 15 Author Share Posted September 15 Yeah, I dont have an eta at the moment, but I ought to get it finished Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now