horstepipe 357 Posted June 24, 2022 Share Posted June 24, 2022 Hello If somebody has a few minutes, would you please bring me to the right direction Scrolling through the reports plugin, e.g. reports selected for seasons, I'm seeing at the status column that some primary images are missing. So what I'd like to accomplish is a command which only checks for these missing images, as refreshing the whole library takes very long and would hit the apis hard. Â As the Emby api is very extensive, for sure there is a way doing this? Link to comment Share on other sites More sharing options...
Luke 37289 Posted June 26, 2022 Share Posted June 26, 2022 Hi, you'd have to do this in two steps, first use the api to query for items (seasons) missing primary images. Then once you have that list, then you'd use the api to refresh the metadata on those. 1 Link to comment Share on other sites More sharing options...
horstepipe 357 Posted July 28, 2022 Author Share Posted July 28, 2022 (edited) On 6/26/2022 at 8:56 PM, Luke said: Hi, you'd have to do this in two steps, first use the api to query for items (seasons) missing primary images. Then once you have that list, then you'd use the api to refresh the metadata on those. just coming back to this. I'd like to limit the api call to seasons (and episodes later) which released maximal 2 months ago. As mostly these items have missing images. Is there a way doing this? I am just seeing minPremiereDate which is a fixed date and no period of time. Best regards Edited July 28, 2022 by horstepipe Link to comment Share on other sites More sharing options...
Luke 37289 Posted July 28, 2022 Share Posted July 28, 2022 Yes I would use MinPremiereDate and just make the calculation on your end of what that value should be. 1 Link to comment Share on other sites More sharing options...
horstepipe 357 Posted September 2, 2022 Author Share Posted September 2, 2022 soo I'm having this call: curl "https://emby.url/emby/Users/xxx/Items?IncludeItemTypes=Episode&Recursive=True&MinPremiereDate=2022-06-01&ExcludeLocationTypes=Virtual&Fields=DateCreated,SeriesName&Limit=500&GroupItems=false&SortBy=DateCreated&SortOrder=Descending&format=json&api_key=yyy" which does what I want for episodes. The only issue I'm facing is that it also shows recorded episodes in the output. How can I exclude them? Best regards Link to comment Share on other sites More sharing options...
horstepipe 357 Posted September 2, 2022 Author Share Posted September 2, 2022 (edited) Here is my bash script if anybody is interested: date=`date --iso-8601 --date='-1 month'` curl "https://emby.url/emby/Users/*user-id*/Items?Recursive=True&IncludeItemTypes=Episode,Movie&MinPremiereDate=$date&ExcludeLocationTypes=Virtual&Fields=DateCreated,SeriesName&GroupItems=false&SortBy=DateCreated&SortOrder=Descending&format=json&api_key=*api-key*" | jq -r '.Items[]' | jq -r .Id | while read ids do curl -X POST "https://*emby.url*/emby/Items/$ids/Refresh?Recursive=false&MetadataRefreshMode=FullRefresh&ImageRefreshMode=Default&ReplaceAllMetadata=true&ReplaceAllImages=false&api_key=*api-key*" -H "accept: */*" done It refreshes items with a premier date one month ago. You can change it in the upper line. some questions though: As mentioned, what is the best way to exclude recordings? For metadatarefreeshmode and imagerefreshmode there are three options, what is ValidationOnly for? ReplaceAllImages = false will still fetch missing images, correct? Edited September 2, 2022 by horstepipe Link to comment Share on other sites More sharing options...
Luke 37289 Posted September 3, 2022 Share Posted September 3, 2022 ValidationOnly is obsolete. 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