[FEATURE] - Emby Notify Script #70

Open
opened 2026-02-20 00:14:40 -05:00 by deekerman · 5 comments
Owner

Originally created by @ChristoffBo on GitHub (Nov 26, 2023).

Would it be possilbe to add an emby notify script such as plex notify? Or can plex notify be used for emby?

Originally created by @ChristoffBo on GitHub (Nov 26, 2023). Would it be possilbe to add an emby notify script such as plex notify? Or can plex notify be used for emby?
Author
Owner

@RandomNinjaAtk commented on GitHub (Nov 26, 2023):

When I last looked at it, I couldn’t find a way to do targeted scans. If you can find a way to do that and a link to some documentation, I’ll look into it. Because I wanted to implement the same thing for Jellyfin and Emby but couldn’t find a way to accomplish it…

@RandomNinjaAtk commented on GitHub (Nov 26, 2023): When I last looked at it, I couldn’t find a way to do targeted scans. If you can find a way to do that and a link to some documentation, I’ll look into it. Because I wanted to implement the same thing for Jellyfin and Emby but couldn’t find a way to accomplish it…
Author
Owner

@rairulyle commented on GitHub (Jan 3, 2024):

Would this API help?

https://api.jellyfin.org/#tag/Items/operation/GetItems
/Items?artists=YOASOBI&albums=Idol

https://api.jellyfin.org/#tag/ItemRefresh
/Items/c44cf79584cf3d3adee49bc97d45055c/Refresh?Recursive=true&ImageRefreshMode=Default&MetadataRefreshMode=Default&ReplaceAllImages=false&ReplaceAllMetadata=false

I might take a look at this. I just wished that I had found your repo sooner before my work break lol.

@rairulyle commented on GitHub (Jan 3, 2024): Would this API help? https://api.jellyfin.org/#tag/Items/operation/GetItems `/Items?artists=YOASOBI&albums=Idol` https://api.jellyfin.org/#tag/ItemRefresh `/Items/c44cf79584cf3d3adee49bc97d45055c/Refresh?Recursive=true&ImageRefreshMode=Default&MetadataRefreshMode=Default&ReplaceAllImages=false&ReplaceAllMetadata=false` I might take a look at this. I just wished that I had found your repo sooner before my work break lol.
Author
Owner

@RandomNinjaAtk commented on GitHub (Jan 4, 2024):

No, those don't help. There is a feature request for what is needed to make what your asking for possible... But as of now, as far as I can tell, the functionality doesn't exist:

https://features.jellyfin.org/posts/1758/scan-specific-folders-from-a-larger-library

@RandomNinjaAtk commented on GitHub (Jan 4, 2024): No, those don't help. There is a feature request for what is needed to make what your asking for possible... But as of now, as far as I can tell, the functionality doesn't exist: https://features.jellyfin.org/posts/1758/scan-specific-folders-from-a-larger-library
Author
Owner

@abescalamis commented on GitHub (Jun 2, 2024):

#!/bin/bash

NOW=$(date +"%d-%m-%Y %H:%M")
LOG_FILE="/config/logging/emby_scan.txt"
TMP_FILE="/tmp/tmp_emby_radarr.txt"
DL_FILE="/config/scripts/dl_radarr.txt"
DEL_FILE="/config/scripts/del_radarr.txt"
REN_FILE="/config/scripts/ren_radarr.txt"
EMBY_URL=""
EMBY_RADARR_APIKEY=""
local_movie_path=""
remote_movie_path=""

if [ "${radarr_eventtype}" != "" ]; then
if [ "${radarr_eventtype}" == "ApplicationUpdate" ] || [ "${radarr_eventtype}" == "MovieAdded" ] || [ "${radarr_eventtype}" == "Grab" ] || [ "${radarr_eventtype}" == "HealthIssue" ] || [ "${radarr_eventtype}" == "Test" ]; then
(echo "${NOW} - [Emby Library Scan] Radarr Event Type is ${radarr_eventtype}, exiting."; cat ${LOG_FILE}) > ${TMP_FILE}; mv ${TMP_FILE} ${LOG_FILE}
exit
fi

(echo "${NOW} - [Emby Library Scan] Radarr Event Type is ${radarr_eventtype}, updating Emby Library for ${radarr_movie_title}."; cat ${LOG_FILE}) > ${TMP_FILE}; mv ${TMP_FILE} ${LOG_FILE}

if [ "$radarr_eventtype" == "Download" ]; then
echo "${radarr_movie_title} (${radarr_movie_year})" >> ${DL_FILE}
UpdateType="Created"
Path=$(echo "$radarr_movie_path" | sed "s|$local_movie_path|$remote_movie_path|")
fi

if [ "${radarr_eventtype}" == "MovieDelete" ]; then
echo "${radarr_movie_title} (${radarr_movie_year})" >> ${DEL_FILE}
UpdateType="Deleted"
Path=$(echo "$radarr_movie_path" | sed "s|$local_movie_path|$remote_movie_path|")
fi

if [ "$radarr_eventtype" == "Rename" ]; then
echo "${radarr_movie_title} (${radarr_movie_year})" >> ${REN_FILE}
UpdateType="Modified"
Path=$(echo "$radarr_movie_path" | sed "s|$local_movie_path|$remote_movie_path|")
fi

curl -X POST "${EMBY_URL}/emby/Library/Media/Updated?api_key=${EMBY_RADARR_APIKEY}" -H "accept: */*" -H "Content-Type: application/json" -d "{\"Updates\":[{\"Path\":\"${Path}\",\"UpdateType\":\"${UpdateType}\"}]}"

else
(echo "${NOW} - [Emby Library Scan] Radarr Event Type is empty."; cat ${LOG_FILE}) > ${TMP_FILE}; mv ${TMP_FILE} ${LOG_FILE}

fi

write a status file with date of last run. Helps troubleshoot that cron task is running.

echo "$(basename $0) last run was at $(date)" > /config/logging/$(basename $0)_lastrun.txt

@abescalamis commented on GitHub (Jun 2, 2024): #!/bin/bash NOW=$(date +"%d-%m-%Y %H:%M") LOG_FILE="/config/logging/emby_scan.txt" TMP_FILE="/tmp/tmp_emby_radarr.txt" DL_FILE="/config/scripts/dl_radarr.txt" DEL_FILE="/config/scripts/del_radarr.txt" REN_FILE="/config/scripts/ren_radarr.txt" EMBY_URL="" EMBY_RADARR_APIKEY="" local_movie_path="" remote_movie_path="" if [ "${radarr_eventtype}" != "" ]; then if [ "${radarr_eventtype}" == "ApplicationUpdate" ] || [ "${radarr_eventtype}" == "MovieAdded" ] || [ "${radarr_eventtype}" == "Grab" ] || [ "${radarr_eventtype}" == "HealthIssue" ] || [ "${radarr_eventtype}" == "Test" ]; then (echo "${NOW} - [Emby Library Scan] Radarr Event Type is ${radarr_eventtype}, exiting."; cat ${LOG_FILE}) > ${TMP_FILE}; mv ${TMP_FILE} ${LOG_FILE} exit fi (echo "${NOW} - [Emby Library Scan] Radarr Event Type is ${radarr_eventtype}, updating Emby Library for ${radarr_movie_title}."; cat ${LOG_FILE}) > ${TMP_FILE}; mv ${TMP_FILE} ${LOG_FILE} if [ "$radarr_eventtype" == "Download" ]; then echo "${radarr_movie_title} (${radarr_movie_year})" >> ${DL_FILE} UpdateType="Created" Path=$(echo "$radarr_movie_path" | sed "s|$local_movie_path|$remote_movie_path|") fi if [ "${radarr_eventtype}" == "MovieDelete" ]; then echo "${radarr_movie_title} (${radarr_movie_year})" >> ${DEL_FILE} UpdateType="Deleted" Path=$(echo "$radarr_movie_path" | sed "s|$local_movie_path|$remote_movie_path|") fi if [ "$radarr_eventtype" == "Rename" ]; then echo "${radarr_movie_title} (${radarr_movie_year})" >> ${REN_FILE} UpdateType="Modified" Path=$(echo "$radarr_movie_path" | sed "s|$local_movie_path|$remote_movie_path|") fi curl -X POST "${EMBY_URL}/emby/Library/Media/Updated?api_key=${EMBY_RADARR_APIKEY}" -H "accept: */*" -H "Content-Type: application/json" -d "{\"Updates\":[{\"Path\":\"${Path}\",\"UpdateType\":\"${UpdateType}\"}]}" else (echo "${NOW} - [Emby Library Scan] Radarr Event Type is empty."; cat ${LOG_FILE}) > ${TMP_FILE}; mv ${TMP_FILE} ${LOG_FILE} fi # write a status file with date of last run. Helps troubleshoot that cron task is running. echo "$(basename $0) last run was at $(date)" > /config/logging/$(basename $0)_lastrun.txt
Author
Owner

@Allram commented on GitHub (Sep 14, 2024):

I have tried to implement it here, it seems to do the work for me :)
https://github.com/RandomNinjaAtk/arr-scripts/pull/306

@Allram commented on GitHub (Sep 14, 2024): I have tried to implement it here, it seems to do the work for me :) https://github.com/RandomNinjaAtk/arr-scripts/pull/306
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/arr-scripts#70
No description provided.