ginjaninja 533 Posted June 30, 2021 Share Posted June 30, 2021 2 hours ago, diogee said: +1 to this I'd rather not use the "refresh every 30/60/90 days" library options as that's overkill in my opinion, I don't need every added item refreshed repeatedly. Instead I currently use a Scripter-X plugin to trigger a script I threw together which refreshes an added episode a few days after it is initially scanned into emby. Doesn't always work but seems to do the trick at least 90% of the time. I originally did this to fetch thumbnail images for anime/tv shows as I dont like how emby uses embeded art for episode thumbs (if its available) and extracting thumbs from video usually gives a poor quality thumbnail as well so I prefer fetching from a metadata provider but as it takes a few days for thumbnails/ episode information to pop up in providers, had to throw something together myself Something native to Emby would definitely be very beneficial and much appreciated you beat me to it, i was going to write the same, if you are happy to share your script i be interested. i cant find the api endpoint / /items field , which provides the last fetch date/time of an id any ideas? Link to comment Share on other sites More sharing options...
diogee 17 Posted June 30, 2021 Share Posted June 30, 2021 (edited) I stripped out the parts that aren't relevant to how I have it handling things currently but I'm pretty sure I got everything Just make sure you change the emby host/api details and adapt variables as necessary for your own config I should probably also add that I run my emby server on a linux host so it uses sh scripts, should be easy enough to convert to windows though ScripterX > onMediaItemAdded Run /var/lib/emby/scripts/MediaItemAdded.sh using /bin/bash "%item.isvirtual%" "%item.id%" "%item.path%" %item.isvirtual% (to make sure it only handles episodes that actually exist on disk) %item.id% (tells emby exactly what item to refresh) and, for me at least, %item.path% (only used because of a sonarr change file date configuration) #!/bin/bash virtualitem="${1}" # %item.isvirtual% itemid="${2}" # %item.id% itempath="${3}" # %item.path% if [ "$virtualitem" == "False" ]; then if [[ "$itemtype" == "Episode" ]]; then touch -r "${itempath}" "/var/lib/emby/scripts/addeditems/${itemid}" # I use this because sonarr changes file date to air date and this copies that information to the temp file # touch "/var/lib/emby/scripts/addeditems/${itemid}" # Use this one instead if the above doesn't work for you fi fi ScripterX > onScheduledTask Run /var/lib/emby/scripts/AutoRescanItems.sh using /bin/bash No variables needed for this one #!/bin/bash embyip="127.0.0.1" embyport="8096" apikey="123" # Change +5 to amount of days to wait before refreshing the item for filename in $(find /var/lib/emby/scripts/addeditems -type f -mtime +5) do #=============================================================================== itemid=$(basename $filename) # Tell Emby to refresh items metadata curl --data '' \ "http://${embyip}:${embyport}/emby/Items/$itemid/Refresh?Recursive=true&ImageRefreshMode=FullRefresh&MetadataRefreshMode=FullRefresh&ReplaceAllImages=true&ReplaceAllMetadata=true&api_key=${apikey}" # Remove itemid rm /var/lib/emby/scripts/addeditems/$itemid done And lastly Emby Scheduled Tasks > Emby ScripterX Scheduled Task Triggers: Every hour It's nothing fancy by any means and can probably be handled in better ways but for me it works until a similar feature can be implemented Edited June 30, 2021 by diogee Simplified / Added note about linux 2 Link to comment Share on other sites More sharing options...
SuperMinecraftKid 5 Posted September 7, 2021 Share Posted September 7, 2021 (edited) I see that I'm quite late to the party but I've had this project out for several months. However, I didnt put too much effort in spreading the word. This collection of scripts was made for the same reasons that @diogee mentioned. My solution to this problem is complete with a few features. Checks for placeholder titles such as "Episode XX" or "TBA" Checks for placeholder thumbnails Ability to refresh episodes multiple times until a certain amount of days pass View all the episodes being tracked in the database Bulk check library. All of the library or by year. I call it noTBA for ScripterX. Check it out and let me know what you think! seansusmilch/noTBA-scripterx Edited September 7, 2021 by SuperMinecraftKid Link to comment Share on other sites More sharing options...
nuentes 30 Posted December 8, 2021 Share Posted December 8, 2021 +1 This feature is needed more and more these days. Much of the content from streaming services do not have metadata available immediately. I get a lot of episodes named TBA. I also want this for movies - refresh after a couple days to get a more accurate star rating. Only new content needs to be refreshed. I don't want the 30/60/90 refresh, as I only want to refresh tv shows that were released in the last x days and movies released in the last y days. It might even make more sense to perform this via a plugin. Link to comment Share on other sites More sharing options...
Magenof 2 Posted April 24, 2022 Share Posted April 24, 2022 +1 would love a scheduled task that would scan for missing metadata in tv shows for the whole library instead of having to do it manually. 1 1 Link to comment Share on other sites More sharing options...
K22R8CT 24 Posted June 6, 2022 Share Posted June 6, 2022 +2 I explored the API, EmbyPy, Scripter X (which appears to have been removed from the catalog.) Best I can tell an add-on fix would be a lot more complex than an internal fix: Schedule Task for Refresh (missing) metadata Is the concern that some items might have perpetually-missing metadata, which would cause an unreasonable number of queries? If so, could avoid that with Refresh (missing) metadata for recently-added items where Recent is a week. Link to comment Share on other sites More sharing options...
ginjaninja 533 Posted June 6, 2022 Share Posted June 6, 2022 50 minutes ago, Anon28109 said: Scripter X (which appears to have been removed from the catalog.) showing for me (am on beta) 1 Link to comment Share on other sites More sharing options...
K22R8CT 24 Posted June 6, 2022 Share Posted June 6, 2022 Ha, I was looking for "S" in the list. Thanks Link to comment Share on other sites More sharing options...
Happy2Play 8144 Posted October 25, 2022 Share Posted October 25, 2022 Have a look here. 1 Link to comment Share on other sites More sharing options...
Luke 36887 Posted April 15, 2023 Share Posted April 15, 2023 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