@@ -223,13 +223,15 @@ def process_missing_seasons_packs_mode(
223223 success = add_processed_id ("sonarr" , instance_name , season_id )
224224 sonarr_logger .debug (f"Added season ID { season_id } to processed list for { instance_name } , success: { success } " )
225225
226- # Tag the series if enabled
227- if tag_processed_items :
228- try :
229- sonarr_api .tag_processed_series (api_url , api_key , api_timeout , series_id , "huntarr-missing" )
230- sonarr_logger .debug (f"Tagged series { series_id } with 'huntarr-missing'" )
231- except Exception as e :
232- sonarr_logger .warning (f"Failed to tag series { series_id } with 'huntarr-missing': { e } " )
226+ # Tag the series if enabled
227+ if tag_processed_items :
228+ from src .primary .settings_manager import get_custom_tag
229+ custom_tag = get_custom_tag ("sonarr" , "missing" , "huntarr-missing" )
230+ try :
231+ sonarr_api .tag_processed_series (api_url , api_key , api_timeout , series_id , custom_tag )
232+ sonarr_logger .debug (f"Tagged series { series_id } with '{ custom_tag } '" )
233+ except Exception as e :
234+ sonarr_logger .warning (f"Failed to tag series { series_id } with '{ custom_tag } ': { e } " )
233235
234236 # Log to history system
235237 media_name = f"{ series_title } - Season { season_number } (contains { episode_count } missing episodes)"
@@ -374,13 +376,15 @@ def process_missing_shows_mode(
374376 processed_any = True
375377 sonarr_logger .info (f"Successfully processed { len (episode_ids )} missing episodes in { show_title } " )
376378
377- # Tag the series if enabled
378- if tag_processed_items :
379- try :
380- sonarr_api .tag_processed_series (api_url , api_key , api_timeout , show_id , "huntarr-shows-missing" )
381- sonarr_logger .debug (f"Tagged series { show_id } with 'huntarr-shows-missing'" )
382- except Exception as e :
383- sonarr_logger .warning (f"Failed to tag series { show_id } with 'huntarr-shows-missing': { e } " )
379+ # Tag the series if enabled
380+ if tag_processed_items :
381+ from src .primary .settings_manager import get_custom_tag
382+ custom_tag = get_custom_tag ("sonarr" , "shows_missing" , "huntarr-shows-missing" )
383+ try :
384+ sonarr_api .tag_processed_series (api_url , api_key , api_timeout , show_id , custom_tag )
385+ sonarr_logger .debug (f"Tagged series { show_id } with '{ custom_tag } '" )
386+ except Exception as e :
387+ sonarr_logger .warning (f"Failed to tag series { show_id } with '{ custom_tag } ': { e } " )
384388
385389 # Add episode IDs to stateful manager IMMEDIATELY after processing each batch
386390 for episode_id in episode_ids :
0 commit comments