@@ -14,7 +14,7 @@ class PlexAgent:
1414 __server : PlexServer = None
1515 __save_cache : bool = False
1616 __internal_paths : dict [str , tuple [str , str ]] = {}
17- __notify_queue : set [tuple [str , str ]] = set ()
17+ __notify_queue : list [tuple [str , str ]] = list ()
1818 __supported_ext : list [str ] = [
1919 "3g2" ,
2020 "3gp" ,
@@ -189,7 +189,7 @@ def _scan(self, section: str, item: str) -> None:
189189 if plex_section .refreshing :
190190 if shared .user_input .daemon :
191191 logging .warning (f"Plex section { section_title } is already refreshing, re-scheduling..." )
192- self .__notify_queue .add ((section , item ))
192+ self .__notify_queue .append ((section , item ))
193193 else :
194194 logging .warning (f"Plex section { section_title } is already refreshing, skipping..." )
195195 return
@@ -235,7 +235,7 @@ def parse_event(self, event) -> None:
235235 section_scan = (section_child .parent .name , section_child .name )
236236 if section_scan not in self .__notify_queue :
237237 logging .info (f"Adding to queue ({ event_type } ): { section_child .name } " )
238- self .__notify_queue .add (section_scan )
238+ self .__notify_queue .append (section_scan )
239239
240240 def start_service (self ) -> ():
241241 """
@@ -247,7 +247,7 @@ def start_service(self) -> ():
247247 def loop ():
248248 while not stopped .wait (shared .user_input .interval ):
249249 if self .__notify_queue :
250- section , item = self .__notify_queue .pop ()
250+ section , item = self .__notify_queue .pop (0 )
251251 self ._scan (section , item )
252252
253253 Thread (target = loop ).start ()
0 commit comments