Skip to content

Commit

Permalink
Update sleap/gui/dataviews.py
Browse files Browse the repository at this point in the history
Co-authored-by: Liezl Maree <[email protected]>
  • Loading branch information
7174Andy and roomrys authored Dec 17, 2024
1 parent 7529acc commit 9d747cb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sleap/gui/dataviews.py
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,8 @@ def item_to_data(self, obj, item: "Video"):
data = {}
for property in self.properties:
if property == "name":
data[property] = getattr(item, "filename").split("/")[-1]
filename = getattr(item, "filename")
name = Path(filename).name
elif property == "filepath":
splitted = getattr(item, "filename").split("/")[:-1]
data[property] = "/".join(splitted)
Expand Down

0 comments on commit 9d747cb

Please sign in to comment.