Add statistics and data-consistency menus, recently-added folder
This commit is contained in:
@@ -335,6 +335,18 @@ class TestApplyCsfdTags:
|
||||
movie_file.add_tag("Rok/1999")
|
||||
assert movie_file.name_context()["year"] == "1999"
|
||||
|
||||
def test_added_timestamp_uses_stored_added(self, movie_file):
|
||||
movie_file.added = "2026-06-16T12:00:00"
|
||||
from datetime import datetime
|
||||
assert movie_file.added_timestamp() == datetime.fromisoformat(
|
||||
"2026-06-16T12:00:00").timestamp()
|
||||
|
||||
def test_added_timestamp_falls_back_to_mtime(self, movie_file):
|
||||
movie_file.added = None
|
||||
import os
|
||||
expected = os.stat(movie_file.file_path).st_mtime
|
||||
assert movie_file.added_timestamp() == expected
|
||||
|
||||
def test_set_attribute_persists_and_in_context(self, movie_file):
|
||||
movie_file.set_attribute("collection_sort", "03")
|
||||
assert movie_file.attributes["collection_sort"] == "03"
|
||||
|
||||
Reference in New Issue
Block a user