models: Renamed _uris to uris

master
Felix Stupp 3 years ago
parent bdc9cd7f5c
commit 4c0b111620
Signed by: zocker
GPG Key ID: 93E1BD26F6B02FB7

@ -126,7 +126,7 @@ class MediaElement(db.Entity):
length: int = orm.Optional(int) length: int = orm.Optional(int)
tag_list : Iterable[Tag] = orm.Set(lambda: Tag) tag_list : Iterable[Tag] = orm.Set(lambda: Tag)
_uris: Iterable[MediaUriMapping] = orm.Set(lambda: MediaUriMapping) uris: Iterable[MediaUriMapping] = orm.Set(lambda: MediaUriMapping)
collection_links: Iterable[MediaCollectionLink] = orm.Set(lambda: MediaCollectionLink) collection_links: Iterable[MediaCollectionLink] = orm.Set(lambda: MediaCollectionLink)
@property @property
@ -173,7 +173,7 @@ class MediaElement(db.Entity):
other.ignored = True other.ignored = True
if self.progress >= 0 and other.progress <= 0: if self.progress >= 0 and other.progress <= 0:
other.progress = self.progress other.progress = self.progress
for uri_map in self._uris: for uri_map in self.uris:
uri_map.element = other uri_map.element = other
for link in self.collection_links: for link in self.collection_links:
if not MediaCollectionLink.get(collection=link.collection, element=other): if not MediaCollectionLink.get(collection=link.collection, element=other):
@ -228,7 +228,7 @@ class MediaCollection(db.Entity):
watch_in_order: bool = orm.Required(bool, default=True) watch_in_order: bool = orm.Required(bool, default=True)
tag_list: Iterable[Tag] = orm.Set(lambda: Tag) tag_list: Iterable[Tag] = orm.Set(lambda: Tag)
_uris: Iterable[CollectionUriMapping] = orm.Set(lambda: CollectionUriMapping) uris: Iterable[CollectionUriMapping] = orm.Set(lambda: CollectionUriMapping)
media_links: Iterable[MediaCollectionLink] = orm.Set(MediaCollectionLink) media_links: Iterable[MediaCollectionLink] = orm.Set(MediaCollectionLink)
@property @property

@ -55,7 +55,7 @@
</ul> </ul>
<h2>Links</h2> <h2>Links</h2>
<ul> <ul>
{% for link in collection._uris %} {% for link in collection.uris %}
<li>{{ link.uri | as_link }} {% if collection.uri == link.uri %}*{% endif %}</li> <li>{{ link.uri | as_link }} {% if collection.uri == link.uri %}*{% endif %}</li>
{% endfor %} {% endfor %}
</ul> </ul>

@ -37,7 +37,7 @@
</ul> </ul>
<h2>Links</h2> <h2>Links</h2>
<ul> <ul>
{% for link in element._uris %} {% for link in element.uris %}
<li>{{ link.uri | as_link }} {% if element.uri == link.uri %}*{% endif %}</li> <li>{{ link.uri | as_link }} {% if element.uri == link.uri %}*{% endif %}</li>
{% endfor %} {% endfor %}
</ul> </ul>

Loading…
Cancel
Save