mickle026 401 Posted July 14, 2023 Share Posted July 14, 2023 (edited) This is an Alpha version so far. - Check the last posts for the latest version What it does is allow you to add external links like this, to people, movies, tv shows, episodes, albums (including audiobooks) , artists and games It has not been extensively tested!!! and is still a bit rough round the edges with no real instructions I have not documented anything yet However you can use shortened urls / redirectors etc !!! For security reasns please bear in mind that external links can be hijacked, malicious code injected etc so please verify your sources before adding them to your server !!!! It has some custom fields too so you can create your own links Its is no where near finished, there is still a lot to do, its jsut posted here for testing for now. Provider_Ids_Extender(12Aug2023).zip 18-02-2024 Update Added a few more Ids and a section for tracks - see thread for details (page 3) Provider_Ids_Extender(18-02-2024).zip 19-02-2024 Update Fixed typo is Custom Id 3 of Artists Added Generic Youtube url to artists (so now can either add channel or generic youtube url - youtube.com/{0}) Added Amazon to Albums and Artists Provider_Ids_Extender(19-02-2024).zip Edited February 19 by mickle026 5 Link to comment Share on other sites More sharing options...
iPhoneMaxPro 11 Posted July 14, 2023 Share Posted July 14, 2023 3 hours ago, mickle026 said: This is an Alpha version so far. What it does is allow you to add external links like this, to people, movies, tv shows, episodes, albums (including audiobooks) , artists and games It has not been extensively tested!!! and is still a bit rough round the edges with no real instructions I have not documented anything yet However you can use shortened urls / redirectors etc !!! For security reasns please bear in mind that external links can be hijacked, malicious code injected etc so please verify your sources before adding them to your server !!!! It has some custom fields too so you can create your own links Its is no where near finished, there is still a lot to do, its jsut posted here for testing for now. Provider_Ids_Extender.zip 204.78 kB · 1 download Congratulations for this plugin, I didn't think it was so elaborate, it's really a good project, I already understood how it works, it's very simple. Who knows if the external links in the future will be saved in the nfo file together with the other emby links so as not to lose the personalized links. And the interface is really nice, very simple and compact. If it helps in the development, I noticed a bug in the TV series, I can't click on the square, or rather when I click it doesn't stay ticked, instead the other square (on the same page) I can click it but when I save the settings they don't stay memorized . If I can post a video or a photo. Thanks again for the work you are doing FullSizeRender.MOV Link to comment Share on other sites More sharing options...
mickle026 401 Posted July 14, 2023 Author Share Posted July 14, 2023 (edited) Re-uploaded with code corrected to save tv shows & games settings 2 hours ago, iPhoneMaxPro said: Who knows if the external links in the future will be saved in the nfo file together with the other emby links so as not to lose the personalized links. Yes they are. They are not saved as links, but saved as the External ids, so the links generate when the page loads. Edited July 15, 2023 by mickle026 Link to comment Share on other sites More sharing options...
mickle026 401 Posted July 15, 2023 Author Share Posted July 15, 2023 Re-Uploaded with a couple more corrections 1 Link to comment Share on other sites More sharing options...
iPhoneMaxPro 11 Posted July 19, 2023 Share Posted July 19, 2023 On 7/15/2023 at 3:00 AM, mickle026 said: Re-Uploaded with a couple more corrections thanks now it works very well, i only noticed a small bug on "Tv Shows" the first custom id doesn't work, instead the 2/3/4 does Link to comment Share on other sites More sharing options...
mickle026 401 Posted July 19, 2023 Author Share Posted July 19, 2023 1 hour ago, iPhoneMaxPro said: thanks now it works very well, i only noticed a small bug on "Tv Shows" the first custom id doesn't work, instead the 2/3/4 does OK, I will fix that for the next release (whenever that may be) - thanks for notifying me about it. 1 Link to comment Share on other sites More sharing options...
rbjtech 4304 Posted August 2, 2023 Share Posted August 2, 2023 (edited) @mickle026 Fantastic idea for a plugin I've tested it to provide a link to my radarr instance (it's the same id as tmdb - so easy to copy over) <CustomMovieIdName>Radarr</CustomMovieIdName> <CustomMovieIdLink>http://nginx/radarr/movie/{0}</CustomMovieIdLink> This working great - it now opens up radarr on the movie in question - no more searching required Easy to add into the NFO as well (makes adding them very simple) <uniqueid type="radarr">13183</uniqueid> However, shows/series don't appear to work - I'm not getting any extra metadata items - maybe you haven't added yet ? <CustomShowsIdName>Sonarr</CustomShowsIdName> <CustomShowsIdLink>http://nginx/sonarr/series/{0}</CustomShowsIdLink> This will be a little more work to get the id's automated - but it appears to be just the show name with '-' instead of spaces - so easy enough to automate in a script. Thanks ! I'll be watching this one with interest edit - 2nd Custom item doesn't appear to show either - eg <CustomMovieIdName2>blu-ray.com</CustomMovieIdName2> <CustomMovieIdLink2>https://www.blu-ray.com/{0}</CustomMovieIdLink2> Edited August 2, 2023 by rbjtech Link to comment Share on other sites More sharing options...
mickle026 401 Posted August 2, 2023 Author Share Posted August 2, 2023 @rbjtech This plugin was never intended to be public. But as one of my questions to Luke was responded to asking about it, I tidied it up a little, added a bit of user customisation to it and posted it because if others find my plugins useful then I'm quite happy to do that. As in the posts above the TV shows custom link 1 is not working on the version uploaded here. Did you try 2/3 or 4? I didn't check the movie 2nd item etc The download here was a rushed job, so it'll only get better. I am away on holiday at the moment, but I'm home soon so I will check a few things then. 1 Link to comment Share on other sites More sharing options...
rbjtech 4304 Posted August 2, 2023 Share Posted August 2, 2023 (edited) 7 minutes ago, mickle026 said: @rbjtech This plugin was never intended to be public. But as one of my questions to Luke was responded to asking about it, I tidied it up a little, added a bit of user customisation to it and posted it because if others find my plugins useful then I'm quite happy to do that. As in the posts above the TV shows custom link 1 is not working on the version uploaded here. Did you try 2/3 or 4? I didn't check the movie 2nd item etc The download here was a rushed job, so it'll only get better. I am away on holiday at the moment, but I'm home soon so I will check a few things then. ok no worries, let me do a little more testing. Enjoy your holiday edit Bingo - TV Shows #2 works ok Edited August 2, 2023 by rbjtech Link to comment Share on other sites More sharing options...
Maarten 2 Posted August 9, 2023 Share Posted August 9, 2023 (edited) When I add {0} to a url. I get a option in the change metadata. It does not fill the ID automatically? I want it to fill in the item ID from the emby movie/tv show. Edited August 9, 2023 by Maarten Link to comment Share on other sites More sharing options...
rbjtech 4304 Posted August 9, 2023 Share Posted August 9, 2023 (edited) 4 hours ago, Maarten said: When I add {0} to a url. I get a option in the change metadata. It does not fill the ID automatically? I want it to fill in the item ID from the emby movie/tv show. For the Custom entries, unless you write a metadata provider (or some script), then it's up to you to populate those entries. I didn't try any of the others pre-defined links, but I would imagine they are simply 'placeholders' for the links - this plugin doesn't actually automatically provide the actual link content for you ! That would mean an API/lookup for every emby title - and would become a metadata provider... ? Edited August 9, 2023 by rbjtech Link to comment Share on other sites More sharing options...
mickle026 401 Posted August 9, 2023 Author Share Posted August 9, 2023 (edited) 9 hours ago, Maarten said: When I add {0} to a url. I get a option in the change metadata. It does not fill the ID automatically? I want it to fill in the item ID from the emby movie/tv show. I am not following what you are trying to do? Can you provide an example of what you mean and what you are doing vs what you are expecting? Like @rbjtechsaid this tool is not a metadata fetcher, not a webscraper, not an information provider. It is a provider id and/or link extension that allows you to add extra URLs via ids and a generic URL to the buttons already there. This is for the user to provide. How would it know the id that you were even adding or expecting? For some users I believe it would be extremely handy but you really need to be aware of what it is and what it actually does. It was not even going to be a public tool, it was primarily for my own use until it was asked about by another forum member when they saw my developer questions to Luke. Some adult ones will be added via ADM adult plugin if you use that separate plugin such as barcode , jeedoo, javlibrary, adultdvdempire, Excalibur and a very small amount of twitter and such social media links. This list for adult items will continue to grow. However I am not aware of any others that can do this as yet. This was what it was originally wrote for - for my own use, and I would consider it still an early alpha version. My own desire also was to eventually add webpages to my server that described actors and their careers with descriptions of roles and achievements, then maybe later to use this id link for other means too as it will be accessed internally that means other plugins I create in the future can also access this information. The idea to add custlinks was born from a request by a forum member, but it's a great idea because then I can add whatever I like If you don't add a link when you add a custom item, then you only add an internally accessible id to your item, then the id is only accessible when you use this plugin in conjunction with another, maybe your own that can access that item by name in code or via the API. I hope this explains a little about where the direction of this plugin lies.... if all this is still meaningless then you really don't need this plugin and it's of no use to you. I am not promoting it, or promising anything with it, just simply allowing other users to use it's ability if they wish to do so. Edited August 9, 2023 by mickle026 Add clarification 1 Link to comment Share on other sites More sharing options...
Maarten 2 Posted August 9, 2023 Share Posted August 9, 2023 My bad, I thought it would replace {0} with the emby item ID. like that dude with Radarr. I don’t see him using a script but i could be wrong. so i will go the custom script way. Will have to figure out how, but i now know updating and refreshing ain’t giving me IDs for my custom links. Link to comment Share on other sites More sharing options...
mickle026 401 Posted August 9, 2023 Author Share Posted August 9, 2023 (edited) @rbjtechDo you have any help/Info for @Maartenwith regard to scripting this for Radarr ? I believe @rbjtechhas save to nfo enabled and is adding it in there, to that file via a script and refreshing / adding missing metadata which would cause emby to import the data key - @rbjtechwill have to confirm this though. Edited August 9, 2023 by mickle026 Link to comment Share on other sites More sharing options...
mickle026 401 Posted August 9, 2023 Author Share Posted August 9, 2023 Actually, That information would be very handy to me. if I knew how to query Radarr / Sonarr , Lidarr etc I could add that functionality into the plugin to do this for you. Surely you can via api using movie name imdb id etc Link to comment Share on other sites More sharing options...
Maarten 2 Posted August 9, 2023 Share Posted August 9, 2023 21 minutes ago, mickle026 said: @rbjtechDo you have any help/Info for @Maartenwith regard to scripting this for Radarr ? I believe @rbjtechhas save to nfo enabled and is adding it in there, to that file via a script and refreshing / adding missing metadata which would cause emby to import the data key - @rbjtechwill have to confirm this though. Yeah. I thought about NFO files. But in the files i have, there is no item id. So I need to write a script using the emby api to fill all the custom external ID’s/URLs. I want to create iOS friendly share links. So I can share emby://……. links with the use of iOS shortcuts. To bad I/we need to do that much to get a standard feature Link to comment Share on other sites More sharing options...
mickle026 401 Posted August 9, 2023 Author Share Posted August 9, 2023 (edited) To see if I can add this funtionallity I am currently trying to query radarr, but I keep getting SSL Error Record too long I have never interacted with radarr before but I cannot seem to get past this http://url:7878/api/v3/movie/lookup/imdb?imdbId=tt1311086 I get an blank page - nothing! Behaves/Seems like the api is turned off, how to turn it on? yet I can access radarr on my server from my local network - this works just fine http://url:7878 http://url:7878/movie/13183 (Watchmen) works For testing I turned the apikey off on my LAN Is there something I need to enable? Edited August 9, 2023 by mickle026 Link to comment Share on other sites More sharing options...
rbjtech 4304 Posted August 9, 2023 Share Posted August 9, 2023 (edited) Hi @mickle026 So you 'could' query radarr/sonarr but you'd need the API key to do so - but it just so happens that radarr simply uses the tmdbid. You can therefore just use that directly from radarr - all you need to provide is the URL base for radarr - and you can just append the tmdbid. ie http://localhost:7878/movie/[tmdbid] in my case - as I'm using an internal reverse proxy - mine is simply http://nginx/radarr/movie/[tmdbid] Now for Sonarr - it's a little more involved but not overly so - as sonarr appears to just use the tmdbid 'name' with a '-' substituting any spaces so for 'The 100' - it should be http://localhost:????/series/[tmdb name] http://nginx/sonarr/series/the-100 I've shown an example for Radarr above - but this works for Sonarr as well (see below) I would just allow the user to enter the URL base - maybe default it to assume it's localhost with the correct sonarr or radarr port and then just use the existing tmdb metadata to populate it maybe ? Happy to help test this if you like. Thanks edit - API key works fine as well to get a JSON query from sonarr/radarr curl -X "GET" "http://nginx/sonarr/api/v3/series?tvdbId=268592&includeSeasonImages=false&apikey=[mySonarrAPIKey]" -H "accept: application/json" -H "X-Api-Key:[mySonarrAPIKey]" gives [ { "title": "The 100", "alternateTitles": [ { "title": "Los 100", "seasonNumber": -1 }, { "title": "Les 100", "seasonNumber": -1 } ], "sortTitle": "100", "status": "ended", "ended": true, "overview": "Set ninety-seven years after a nuclear war has destroyed civilization, when a spaceship housing humanity's lone survivors sends one hundred juvenile delinquents back to Earth, in hopes of possibly re-populating the planet.", "previousAiring": "2020-10-01T00:00:00Z", "network": "The CW", "airTime": "20:00", "images": [ { "coverType": "banner", "url": "/sonarr/MediaCover/1334/banner.jpg?lastWrite=638121561262789703", "remoteUrl": "https://artworks.thetvdb.com/banners/graphical/268592-g2.jpg" }, { "coverType": "poster", "url": "/sonarr/MediaCover/1334/poster.jpg?lastWrite=638121561265967785", "remoteUrl": "https://artworks.thetvdb.com/banners/posters/268592-2.jpg" }, { "coverType": "fanart", "url": "/sonarr/MediaCover/1334/fanart.jpg?lastWrite=638121561269908631", "remoteUrl": "https://artworks.thetvdb.com/banners/fanart/original/268592-5.jpg" }, { "coverType": "unknown", "url": "/sonarr/MediaCover/1334/unknown.jpg?lastWrite=638211296160172461", "remoteUrl": "https://artworks.thetvdb.com/banners/v4/series/268592/clearlogo/611b6133024e8.png" } ], "seasons": [ { "seasonNumber": 1, "monitored": true, "statistics": { "previousAiring": "2014-06-12T00:00:00Z", "episodeFileCount": 13, "episodeCount": 13, "totalEpisodeCount": 13, "sizeOnDisk": 21378559885, "releaseGroups": [], "percentOfEpisodes": 100.0 } }, { "seasonNumber": 2, "monitored": true, "statistics": { "previousAiring": "2015-03-12T00:00:00Z", "episodeFileCount": 16, "episodeCount": 16, "totalEpisodeCount": 16, "sizeOnDisk": 26662194556, "releaseGroups": [], "percentOfEpisodes": 100.0 } }, { "seasonNumber": 3, "monitored": true, "statistics": { "previousAiring": "2016-05-20T00:00:00Z", "episodeFileCount": 16, "episodeCount": 16, "totalEpisodeCount": 16, "sizeOnDisk": 12211471659, "releaseGroups": [], "percentOfEpisodes": 100.0 } }, { "seasonNumber": 4, "monitored": true, "statistics": { "previousAiring": "2017-05-25T00:00:00Z", "episodeFileCount": 13, "episodeCount": 13, "totalEpisodeCount": 13, "sizeOnDisk": 17513053697, "releaseGroups": [], "percentOfEpisodes": 100.0 } }, { "seasonNumber": 5, "monitored": true, "statistics": { "previousAiring": "2018-08-08T00:00:00Z", "episodeFileCount": 13, "episodeCount": 13, "totalEpisodeCount": 13, "sizeOnDisk": 16827184260, "releaseGroups": [], "percentOfEpisodes": 100.0 } }, { "seasonNumber": 6, "monitored": true, "statistics": { "previousAiring": "2019-08-07T00:00:00Z", "episodeFileCount": 13, "episodeCount": 13, "totalEpisodeCount": 13, "sizeOnDisk": 14073636473, "releaseGroups": [], "percentOfEpisodes": 100.0 } }, { "seasonNumber": 7, "monitored": true, "statistics": { "previousAiring": "2020-10-01T00:00:00Z", "episodeFileCount": 16, "episodeCount": 16, "totalEpisodeCount": 16, "sizeOnDisk": 17109029354, "releaseGroups": [], "percentOfEpisodes": 100.0 } } ], "year": 2014, "path": "\\\\media\\TV Series\\The 100 (2014) [tvdbID=268592]", "qualityProfileId": 4, "languageProfileId": 1, "seasonFolder": true, "monitored": false, "useSceneNumbering": false, "runtime": 41, "tvdbId": 268592, "tvRageId": 34770, "tvMazeId": 6, "firstAired": "2014-03-19T00:00:00Z", "seriesType": "standard", "cleanTitle": "the100", "imdbId": "tt2661044", "titleSlug": "the-100", "rootFolderPath": "\\\\media\\TV Series", "certification": "TV-14", "genres": [ "Action", "Drama", "Mystery", "Science Fiction", "Suspense", "Thriller" ], "tags": [], "added": "2023-02-16T14:51:52.4117533Z", "ratings": { "votes": 0, "value": 0.0 }, "statistics": { "seasonCount": 7, "episodeFileCount": 100, "episodeCount": 100, "totalEpisodeCount": 100, "sizeOnDisk": 125775129884, "releaseGroups": [], "percentOfEpisodes": 100.0 }, "id": 1334 } ] For Radarr curl -X "GET" "http://nginx/radarr/api/v3/movie?tmdbId=122&apikey=[myRadarrAPIKey]" -H "accept: application/json" -H "X-Api-Key:[myRadarrAPIKey]" Output .. [ { "title": "The Lord of the Rings: The Return of the King", "originalTitle": "The Lord of the Rings: The Return of the King", "originalLanguage": { "id": 1, "name": "English" }, "alternateTitles": [ { "sourceType": "tmdb", "movieMetadataId": 3972, "title": "The Return of the King", "sourceId": 0, "votes": 0, "voteCount": 0, "language": { "id": 1, "name": "English" }, "id": 45538 }, { "sourceType": "tmd................................ blah blah, you get the idea. Edited August 9, 2023 by rbjtech 1 Link to comment Share on other sites More sharing options...
mickle026 401 Posted August 9, 2023 Author Share Posted August 9, 2023 I dont know whats changed but ive left it a few hours and come back and what was refusing to work is now working?? Soo strange this house im pretty sure its got gremlins .... LOL Thanks for the explanation 1 Link to comment Share on other sites More sharing options...
Maarten 2 Posted August 9, 2023 Share Posted August 9, 2023 What is wrong? I try to populate the “Delen” custom id. #!/bin/bash API_KEY="my-key" EMBY_SERVER="http://127.0.0.1:8196" # Get a list of movie and TV show item IDs item_ids=$(curl -s "${EMBY_SERVER}/emby/Items?api_key=${API_KEY}&Recursive=true&IncludeItemTypes=Movie,Series" | jq -r '.Items[] | .Id') total_items=$(echo "$item_ids" | wc -l) current_item=1 echo "Total items to process: $total_items" # Loop through each item ID for item_id in $item_ids; do echo "Processing item $current_item/$total_items - Item ID: $item_id" # Update metadata with item ID update_result=$(curl -s -X POST "${EMBY_SERVER}/emby/Items/${item_id}?api_key=${API_KEY}" -d "UserData.Delen=$item_id") current_item=$((current_item + 1)) done echo "Processing completed." Quote Link to comment Share on other sites More sharing options...
mickle026 401 Posted August 9, 2023 Author Share Posted August 9, 2023 2 hours ago, Maarten said: What is wrong? I try to populate the “Delen” custom id. #!/bin/bash API_KEY="my-key" EMBY_SERVER="http://127.0.0.1:8196" # Get a list of movie and TV show item IDs item_ids=$(curl -s "${EMBY_SERVER}/emby/Items?api_key=${API_KEY}&Recursive=true&IncludeItemTypes=Movie,Series" | jq -r '.Items[] | .Id') total_items=$(echo "$item_ids" | wc -l) current_item=1 echo "Total items to process: $total_items" # Loop through each item ID for item_id in $item_ids; do echo "Processing item $current_item/$total_items - Item ID: $item_id" # Update metadata with item ID update_result=$(curl -s -X POST "${EMBY_SERVER}/emby/Items/${item_id}?api_key=${API_KEY}" -d "UserData.Delen=$item_id") current_item=$((current_item + 1)) done echo "Processing completed." I have never done this via an API call, @rbjtechmight be able to offer more help. I was wondering what exactly User data.Delen was.. when you query items in swagger is that what your key is called? I suggest adding to a record manually to ensure the key exists in that record, then query that record in swagger and check how its output is. When you post back though, you normally have to post back everything that came out on your query. I don't know if that will help. Link to comment Share on other sites More sharing options...
rbjtech 4304 Posted August 10, 2023 Share Posted August 10, 2023 Just a quick update as I had a few spare minutes today - I'be just bolted this onto the MediaInfo Plugin .. It works with Movies (Radarr) and Episodes (which loads the Parent Series in Sonarr) - need to just do the same with Series itself as the MediaInfo Plugin does not process those, so need to create a new function. I'll add this as an option in the MediaInfo GUI .. I know it's not really the place for it - but it's too small for it's own Plugin. @mickle026- Maybe your could add to Plugin itself as an option ? I'll post the MediaInfo PLugin update when I've done some more testing .. this is gonna save me a tonne of time as having the Sonarr link in the episode is perfect ! // TESTING EXTERNAL LINKS HERE ************************************************* Log.Debug("Tmdb ProviderID {0}", item.GetProviderIds("Tmdb")); Log.Debug("Tvdb ProviderID {0}", item.GetProviderIds("Tvdb")); // sonarr **** create sonarr link to series per episode - need to do the emby series as well var series = item.Parent.Parent; var seriesName = series.Name; // replace all spaces with - and remove any : seriesName = seriesName.Replace(" ", "-").Replace(":",""); seriesName = seriesName.ToLower(); Log.Debug("Sonarr URL link {0}", seriesName); item.SetProviderId("Sonarr", seriesName); // radarr **** var radarrid = item.GetProviderIds("Tmdb"); item.SetProviderId("Radarr", radarrid); Log.Debug("Radarr URL link {0}", item.GetProviderIds("Radarr")); // TESTING EXTERNAL LINKS HERE ************************************************* Link to comment Share on other sites More sharing options...
mickle026 401 Posted August 10, 2023 Author Share Posted August 10, 2023 10 minutes ago, rbjtech said: Just a quick update as I had a few spare minutes today - I'be just bolted this onto the MediaInfo Plugin .. It works with Movies (Radarr) and Episodes (which loads the Parent Series in Sonarr) - need to just do the same with Series itself as the MediaInfo Plugin does not process those, so need to create a new function. I'll add this as an option in the MediaInfo GUI .. I know it's not really the place for it - but it's too small for it's own Plugin. @mickle026- Maybe your could add to Plugin itself as an option ? I'll post the MediaInfo PLugin update when I've done some more testing .. this is gonna save me a tonne of time as having the Sonarr link in the episode is perfect ! // TESTING EXTERNAL LINKS HERE ************************************************* Log.Debug("Tmdb ProviderID {0}", item.GetProviderIds("Tmdb")); Log.Debug("Tvdb ProviderID {0}", item.GetProviderIds("Tvdb")); // sonarr **** create sonarr link to series per episode - need to do the emby series as well var series = item.Parent.Parent; var seriesName = series.Name; // replace all spaces with - and remove any : seriesName = seriesName.Replace(" ", "-").Replace(":",""); seriesName = seriesName.ToLower(); Log.Debug("Sonarr URL link {0}", seriesName); item.SetProviderId("Sonarr", seriesName); // radarr **** var radarrid = item.GetProviderIds("Tmdb"); item.SetProviderId("Radarr", radarrid); Log.Debug("Radarr URL link {0}", item.GetProviderIds("Radarr")); // TESTING EXTERNAL LINKS HERE ************************************************* I know how to do this and can add it as an option when I have got time, but thanks for this. I dont think I will ge time this week, full on back at work now. I was thinking you had scripted it to add in to the nfo, thats my bad and could maybe help @Maarten, if he cannot do it, I'll add it into to my plugin eventually anyway. 1 Link to comment Share on other sites More sharing options...
rbjtech 4304 Posted August 10, 2023 Share Posted August 10, 2023 23 hours ago, Maarten said: What is wrong? I try to populate the “Delen” custom id. #!/bin/bash API_KEY="my-key" EMBY_SERVER="http://127.0.0.1:8196" # Get a list of movie and TV show item IDs item_ids=$(curl -s "${EMBY_SERVER}/emby/Items?api_key=${API_KEY}&Recursive=true&IncludeItemTypes=Movie,Series" | jq -r '.Items[] | .Id') total_items=$(echo "$item_ids" | wc -l) current_item=1 echo "Total items to process: $total_items" # Loop through each item ID for item_id in $item_ids; do echo "Processing item $current_item/$total_items - Item ID: $item_id" # Update metadata with item ID update_result=$(curl -s -X POST "${EMBY_SERVER}/emby/Items/${item_id}?api_key=${API_KEY}" -d "UserData.Delen=$item_id") current_item=$((current_item + 1)) done echo "Processing completed." I'm not 100% what your script is doing - but you basically need to GET all the info for each Id - including any newly defined Links from this Plugin (which will be empty at that point) and then populate them with the data - in my case, I've created the data from existing emby data - and then POST back the entire entry. You can't just post the changed data, you need to POST it all. So in the example below, you can see the extra 'Radarr' ProviderId defined. { "Items": [ { "Name": "2 Guns", "ServerId": "5f9c466f4ecc4319b1d48f55e311d249", "Id": "3325277", "RunTimeTicks": 65305600000, "ProviderIds": { "Tmdb": "136400", "Imdb": "tt1272878", "Tvdb": "1783", "official website": "http://www.2guns.net/", "Radarr": "136400" }, curl -X 'GET' \ 'http://embyURL:8096/emby/Items?Recursive=true&Fields=ProviderIds&Ids=3325277&api_key=***' \ -H 'accept: application/json' Link to comment Share on other sites More sharing options...
mickle026 401 Posted August 11, 2023 Author Share Posted August 11, 2023 (edited) @Maartensee @rbjtechmedia info plugin in another plugin thread, he's added the function to do what you require to it by refreshing metadata in conjunction with this plugin. It will add your provider ids for sonarr and radar, but you need to also set the link in this plugin for them to show in emby. https://emby.media/community/index.php?/topic/108984-mediainfo-for-emby-pluginhdr-vision-atmos-dtsx/&do=findComment&comment=1271775 Edited August 11, 2023 by mickle026 1 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