Skip to content

Commit

Permalink
Use non-2020 for most things
Browse files Browse the repository at this point in the history
  • Loading branch information
diceroll123 committed Mar 2, 2024
1 parent 674c1df commit 2af9313
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ $ python -m pip install -U .
*Since there is no obvious "first thing to do" with this library, simply refer to the examples folder for all examples.*

## Links
- [Dress To Impress (2020)](https://impress-2020.openneo.net/)
- [DTI's Github Repo](https://github.com/matchu/impress-2020/)
- [Dress To Impress](https://impress.openneo.net/)
- [DTI's Github Repo](https://github.com/openneo/impress/)
13 changes: 8 additions & 5 deletions dti/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ def has_glitches(self) -> bool:
@property
def url(self) -> str:
""":class:`str`: The URL of this pet appearance as an editable outfit."""
return f"https://impress-2020.openneo.net/outfits/new?species={self.species.id}&color={self.color.id}&pose={self.pose.name}&state={self.id}"
return f"https://impress.openneo.net/outfits/new?species={self.species.id}&color={self.color.id}&pose={self.pose.name}&state={self.id}"

def __repr__(self) -> str:
attrs: list[tuple[str, Any]] = [
Expand Down Expand Up @@ -795,7 +795,7 @@ def legacy_url(self) -> str:
@property
def url(self) -> str:
""":class:`str`: Returns the DTI URL for the item."""
return f"https://impress-2020.openneo.net/items/{self.id}"
return f"https://impress.openneo.net/items/{self.id}"

def __str__(self) -> str:
return self.name
Expand Down Expand Up @@ -1062,7 +1062,7 @@ def closet_url(self) -> str:
objects, closet = _render_items(self.items)
params["objects[]"] = [item.id for item in objects]
params["closet[]"] = [item.id for item in closet]
return f"https://impress-2020.openneo.net/outfits/new?{urlencode(params, doseq=True)}"
return f"https://impress.openneo.net/outfits/new?{urlencode(params, doseq=True)}"

@property
def worn_items(self) -> list[Item]:
Expand Down Expand Up @@ -1320,8 +1320,11 @@ def legacy_url(self) -> str:

@property
def url(self) -> str:
""":class:`str`: Returns the outfit URL for the ID provided."""
return f"https://impress-2020.openneo.net/outfits/{self.id}"
""":class:`str`: Returns the outfit URL for the ID provided.
Since the 2020 site is soon to be deprecated, this will redirect to the legacy URL.
"""
return self.legacy_url

def image_url(self, *, size: LayerImageSize | None = None) -> str:
"""
Expand Down

0 comments on commit 2af9313

Please sign in to comment.