Loading src/resources/models.py +9 −0 Original line number Diff line number Diff line Loading @@ -589,6 +589,15 @@ class File(Resource): else: raise NotHLS("Resource is not served via HLS") def hls_thumbnail_url(self) -> str: if self.should_have_hls: return "{}{}/thumbnail.jpg".format( settings.JAMA_HLS_ENDPOINT, hash_to_hls_path(self.hash), ) else: raise NotHLS("Resource is not served via HLS") def local_path(self): return hash_to_local_path(self.hash) Loading src/rpc/serializers.py +1 −0 Original line number Diff line number Diff line Loading @@ -181,6 +181,7 @@ def file( tags.append(tag(tag_instance, cache=cache)) if file_instance.should_have_hls: urls["hls"] = file_instance.hls_url() urls["hls_thumbnail"] = file_instance.hls_thumbnail_url() if ( file_instance.should_have_iiif ): # and iiif_file_exists(file_instance.hash): # FS is slow Loading Loading
src/resources/models.py +9 −0 Original line number Diff line number Diff line Loading @@ -589,6 +589,15 @@ class File(Resource): else: raise NotHLS("Resource is not served via HLS") def hls_thumbnail_url(self) -> str: if self.should_have_hls: return "{}{}/thumbnail.jpg".format( settings.JAMA_HLS_ENDPOINT, hash_to_hls_path(self.hash), ) else: raise NotHLS("Resource is not served via HLS") def local_path(self): return hash_to_local_path(self.hash) Loading
src/rpc/serializers.py +1 −0 Original line number Diff line number Diff line Loading @@ -181,6 +181,7 @@ def file( tags.append(tag(tag_instance, cache=cache)) if file_instance.should_have_hls: urls["hls"] = file_instance.hls_url() urls["hls_thumbnail"] = file_instance.hls_thumbnail_url() if ( file_instance.should_have_iiif ): # and iiif_file_exists(file_instance.hash): # FS is slow Loading