Logging is a good thing.
[kiosk.git] / local_photos_mirror_renderer.py
index 390d6eabef0eab0d6230ad3075e10d012c4623a7..b68df68096e3fa0b7ce0dd9b94bb6bd9ccc5be3e 100644 (file)
@@ -3,20 +3,20 @@
 import os
 import random
 import re
 import os
 import random
 import re
-from typing import List, Dict, Set
+from typing import Dict, Set
 
 import file_writer
 import renderer
 
 
 
 import file_writer
 import renderer
 
 
-class local_photos_mirror_renderer(renderer.debuggable_abstaining_renderer):
+class local_photos_mirror_renderer(renderer.abstaining_renderer):
     """A renderer that uses a local mirror of Google photos"""
 
     """A renderer that uses a local mirror of Google photos"""
 
-    album_root_directory = "/usr/local/export/www/gphotos/albums"
+    album_root_directory = "/var/www/html/kiosk/images/gphotos/albums"
 
     album_whitelist = frozenset(
         [
 
     album_whitelist = frozenset(
         [
-            "8-Mile Lake Hike",
+            "Autumn at Kubota",
             "Bangkok and Phuket, 2003",
             "Barn",
             "Blue Angels... Seafair",
             "Bangkok and Phuket, 2003",
             "Barn",
             "Blue Angels... Seafair",
@@ -36,16 +36,20 @@ class local_photos_mirror_renderer(renderer.debuggable_abstaining_renderer):
             "Newer Alex Photos",
             "Ohme Gardens",
             "Olympic Sculpture Park",
             "Newer Alex Photos",
             "Ohme Gardens",
             "Olympic Sculpture Park",
+            "Portland, ME 2021",
             "Prague and Munich 2019",
             "Random",
             "Prague and Munich 2019",
             "Random",
-            "Scott and Lynn",
             "SFO 2014",
             "SFO 2014",
+            "Scott and Lynn",
+            "Sculpture Place",
             "Skiing with Alex",
             "Sonoma",
             "Trip to California, '16",
             "Trip to San Francisco",
             "Trip to East Coast '16",
             "Skiing with Alex",
             "Sonoma",
             "Trip to California, '16",
             "Trip to San Francisco",
             "Trip to East Coast '16",
+            "Turkey 2022",
             "Tuscany 2008",
             "Tuscany 2008",
+            "WA Roadtrip, 2021",
             "Yosemite 2010",
             "Zoo",
         ]
             "Yosemite 2010",
             "Zoo",
         ]
@@ -62,7 +66,7 @@ class local_photos_mirror_renderer(renderer.debuggable_abstaining_renderer):
     )
 
     def __init__(self, name_to_timeout_dict: Dict[str, int]) -> None:
     )
 
     def __init__(self, name_to_timeout_dict: Dict[str, int]) -> None:
-        super(local_photos_mirror_renderer, self).__init__(name_to_timeout_dict, False)
+        super().__init__(name_to_timeout_dict)
         self.candidate_photos: Set[str] = set()
 
     def debug_prefix(self) -> str:
         self.candidate_photos: Set[str] = set()
 
     def debug_prefix(self) -> str:
@@ -94,7 +98,7 @@ class local_photos_mirror_renderer(renderer.debuggable_abstaining_renderer):
                     if extension in self.extension_whitelist:
                         photo_path = os.path.join(root, filename)
                         photo_url = photo_path.replace(
                     if extension in self.extension_whitelist:
                         photo_path = os.path.join(root, filename)
                         photo_url = photo_path.replace(
-                            "/usr/local/export/www/", "http://10.0.0.18/", 1
+                            "/var/www/html", "http://kiosk.house/", 1
                         )
                         self.candidate_photos.add(photo_url)
         return True
                         )
                         self.candidate_photos.add(photo_url)
         return True