zou 0.20.49__py3-none-any.whl → 0.20.51__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- zou/__init__.py +1 -1
- zou/app/blueprints/source/csv/task_type_estimations.py +39 -35
- zou/app/services/entities_service.py +5 -1
- zou/app/services/playlists_service.py +1 -1
- zou/app/services/projects_service.py +1 -2
- zou/cli.py +3 -0
- zou/migrations/alembic.ini +1 -1
- zou/plugin_template/migrations/alembic.ini +1 -1
- {zou-0.20.49.dist-info → zou-0.20.51.dist-info}/METADATA +1 -1
- {zou-0.20.49.dist-info → zou-0.20.51.dist-info}/RECORD +14 -14
- {zou-0.20.49.dist-info → zou-0.20.51.dist-info}/WHEEL +0 -0
- {zou-0.20.49.dist-info → zou-0.20.51.dist-info}/entry_points.txt +0 -0
- {zou-0.20.49.dist-info → zou-0.20.51.dist-info}/licenses/LICENSE +0 -0
- {zou-0.20.49.dist-info → zou-0.20.51.dist-info}/top_level.txt +0 -0
zou/__init__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "0.20.
|
|
1
|
+
__version__ = "0.20.51"
|
|
@@ -46,56 +46,60 @@ class TaskTypeEstimationsCsvImportResource(BaseCsvProjectImportResource):
|
|
|
46
46
|
400:
|
|
47
47
|
description: Format error
|
|
48
48
|
"""
|
|
49
|
-
|
|
49
|
+
task_type = tasks_service.get_task_type(task_type_id)
|
|
50
|
+
return super().post(project_id, task_type, episode_id)
|
|
50
51
|
|
|
51
|
-
def prepare_import(self, project_id,
|
|
52
|
+
def prepare_import(self, project_id, task_type, episode_id=None):
|
|
52
53
|
self.organisation = persons_service.get_organisation()
|
|
53
54
|
self.assets_map = {}
|
|
54
55
|
self.shots_map = {}
|
|
55
56
|
self.tasks_map = {}
|
|
56
57
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
criterions_assets = {"project_id": project_id}
|
|
63
|
-
if episode_id is not None and episode_id not in ["main", "all"]:
|
|
64
|
-
criterions_assets["source_id"] = episode_id
|
|
65
|
-
assets = assets_service.get_assets(criterions_assets)
|
|
66
|
-
for asset in assets:
|
|
67
|
-
key = "%s%s" % (
|
|
68
|
-
asset_types_map[asset["entity_type_id"]],
|
|
69
|
-
slugify(asset["name"]),
|
|
58
|
+
if task_type["for_entity"] == "Asset":
|
|
59
|
+
asset_types_map = {}
|
|
60
|
+
asset_types = assets_service.get_asset_types_for_project(
|
|
61
|
+
project_id
|
|
70
62
|
)
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
63
|
+
for asset_type in asset_types:
|
|
64
|
+
asset_types_map[asset_type["id"]] = slugify(asset_type["name"])
|
|
65
|
+
|
|
66
|
+
criterions_assets = {"project_id": project_id}
|
|
67
|
+
if episode_id is not None and episode_id not in ["main", "all"]:
|
|
68
|
+
criterions_assets["source_id"] = episode_id
|
|
69
|
+
assets = assets_service.get_assets(criterions_assets)
|
|
70
|
+
for asset in assets:
|
|
71
|
+
key = "%s%s" % (
|
|
72
|
+
asset_types_map[asset["entity_type_id"]],
|
|
73
|
+
slugify(asset["name"]),
|
|
74
|
+
)
|
|
75
|
+
self.assets_map[key] = asset["id"]
|
|
76
|
+
elif task_type["for_entity"] == "Shot":
|
|
77
|
+
sequences_map = {}
|
|
78
|
+
criterions_sequences = {"project_id": project_id}
|
|
79
|
+
if episode_id is not None and episode_id not in ["main", "all"]:
|
|
80
|
+
criterions_sequences["parent_id"] = episode_id
|
|
81
|
+
sequences = shots_service.get_sequences(criterions_sequences)
|
|
82
|
+
for sequence in sequences:
|
|
83
|
+
sequences_map[sequence["id"]] = slugify(sequence["name"])
|
|
84
|
+
|
|
85
|
+
shots = shots_service.get_shots({"project_id": project_id})
|
|
86
|
+
for shot in shots:
|
|
87
|
+
sequence_key = sequences_map.get(shot["parent_id"])
|
|
88
|
+
if sequence_key is not None:
|
|
89
|
+
key = "%s%s" % (sequence_key, slugify(shot["name"]))
|
|
90
|
+
self.shots_map[key] = shot["id"]
|
|
87
91
|
|
|
88
92
|
for task in tasks_service.get_tasks_for_project_and_task_type(
|
|
89
|
-
project_id,
|
|
93
|
+
project_id, task_type["id"]
|
|
90
94
|
):
|
|
91
95
|
self.tasks_map[task["entity_id"]] = task["id"]
|
|
92
96
|
|
|
93
|
-
def import_row(self, row, project_id,
|
|
97
|
+
def import_row(self, row, project_id, task_type, episode_id=None):
|
|
94
98
|
key = slugify("%s%s" % (row["Parent"], row["Entity"]))
|
|
95
99
|
|
|
96
|
-
if self.assets_map.get(key):
|
|
100
|
+
if task_type["for_entity"] == "Asset" and self.assets_map.get(key):
|
|
97
101
|
entity_id = self.assets_map[key]
|
|
98
|
-
elif self.shots_map.get(key):
|
|
102
|
+
elif task_type["for_entity"] == "Shot" and self.shots_map.get(key):
|
|
99
103
|
entity_id = self.shots_map[key]
|
|
100
104
|
else:
|
|
101
105
|
raise RowException(f"Entity {key} not found")
|
|
@@ -149,7 +149,11 @@ def get_for_entity_from_task(task):
|
|
|
149
149
|
entity_type = get_entity_type(entity["entity_type_id"])
|
|
150
150
|
for_entity = entity_type["name"]
|
|
151
151
|
if for_entity.lower() not in [
|
|
152
|
-
"shot",
|
|
152
|
+
"shot",
|
|
153
|
+
"sequence",
|
|
154
|
+
"episode",
|
|
155
|
+
"edit",
|
|
156
|
+
"concept",
|
|
153
157
|
]:
|
|
154
158
|
for_entity = "Asset"
|
|
155
159
|
return for_entity
|
|
@@ -887,7 +887,7 @@ def generate_playlisted_entity_from_task(task_id, task_type_links):
|
|
|
887
887
|
]
|
|
888
888
|
if len(available_task_types) > 0:
|
|
889
889
|
task_type_id = available_task_types[0]
|
|
890
|
-
preview_file = preview_files[
|
|
890
|
+
preview_file = preview_files[task_type_id][0]
|
|
891
891
|
|
|
892
892
|
if preview_file is not None:
|
|
893
893
|
playlisted_entity.update(
|
|
@@ -705,8 +705,7 @@ def get_task_type_links(project_id, for_entity="Asset"):
|
|
|
705
705
|
Return a lisk of links for given project and entity type.
|
|
706
706
|
"""
|
|
707
707
|
task_type_links = (
|
|
708
|
-
ProjectTaskTypeLink.query
|
|
709
|
-
.join(TaskType)
|
|
708
|
+
ProjectTaskTypeLink.query.join(TaskType)
|
|
710
709
|
.filter(ProjectTaskTypeLink.project_id == project_id)
|
|
711
710
|
.filter(TaskType.for_entity == for_entity)
|
|
712
711
|
.order_by(ProjectTaskTypeLink.priority.desc())
|
zou/cli.py
CHANGED
zou/migrations/alembic.ini
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
zou/__init__.py,sha256=
|
|
2
|
-
zou/cli.py,sha256=
|
|
1
|
+
zou/__init__.py,sha256=jKuoU0n-XXsegDJBRz_IGknA1tJmBjiSh3HA8TFJDGg,24
|
|
2
|
+
zou/cli.py,sha256=W7nhMII-gyl8AlL6zgDmverSdFphDV_WnuN3BHrHc8w,22448
|
|
3
3
|
zou/debug.py,sha256=1fawPbkD4wn0Y9Gk0BiBFSa-CQe5agFi8R9uJYl2Uyk,520
|
|
4
4
|
zou/event_stream.py,sha256=yTU1Z3r55SiYm8Y5twtJIo5kTnhbBK-XKc8apdgvzNw,8291
|
|
5
5
|
zou/job_settings.py,sha256=_aqBhujt2Q8sXRWIbgbDf-LUdXRdBimdtTc-fZbiXoY,202
|
|
@@ -112,7 +112,7 @@ zou/app/blueprints/source/csv/casting.py,sha256=zUlwEnSheoCMTIgvRlKJgNv3hYPDjfSr
|
|
|
112
112
|
zou/app/blueprints/source/csv/edits.py,sha256=yL1RcClBxPNakLt326M2aJk6pVv0H7CrNXALuKHkDZ8,8386
|
|
113
113
|
zou/app/blueprints/source/csv/persons.py,sha256=QciJ47B3rAPyUQTAeToCUAhEai16J4s37oOErjdC_Vw,2582
|
|
114
114
|
zou/app/blueprints/source/csv/shots.py,sha256=5OI0IBY8C72aBbDFrIkvN-ZkWWCHsvOGUQ0Z9rWsnDs,9748
|
|
115
|
-
zou/app/blueprints/source/csv/task_type_estimations.py,sha256=
|
|
115
|
+
zou/app/blueprints/source/csv/task_type_estimations.py,sha256=L4urkpixLQv3wqpZKgJl8QcNz30D1ZW6OAr-pytnau8,6205
|
|
116
116
|
zou/app/blueprints/source/shotgun/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
117
117
|
zou/app/blueprints/source/shotgun/assets.py,sha256=vuRvy0oUszImYRawrbWC2h7CHYSBvGXDJPoa6ZqpG_U,4980
|
|
118
118
|
zou/app/blueprints/source/shotgun/base.py,sha256=Y0sX8X3oN0AQWiBqjLX-cijnBZH8UzZp4iC8BQpf_tk,6193
|
|
@@ -200,7 +200,7 @@ zou/app/services/custom_actions_service.py,sha256=fWISEOOdthadrxeHuacEel5Xj6msn0
|
|
|
200
200
|
zou/app/services/deletion_service.py,sha256=jZzNzyfmKJK1Sro9PUV0v9cVh6QQ2qh-0bQ4Ajuk77I,17434
|
|
201
201
|
zou/app/services/edits_service.py,sha256=P3-eBoHSikYjtuHeulTv_WuILEe502sU4qFObfokcQY,12114
|
|
202
202
|
zou/app/services/emails_service.py,sha256=i9EP3zw02ZteVt9OZTvkfaoU19_T4kLhRmrhIvYw2SQ,11965
|
|
203
|
-
zou/app/services/entities_service.py,sha256=
|
|
203
|
+
zou/app/services/entities_service.py,sha256=tiKZpv28PMJqTT0S4W6T_4E_gOGytps2QhENB5IvOwQ,17373
|
|
204
204
|
zou/app/services/events_service.py,sha256=Ew-bY5hqrWLmpbVj1_xd3E2S3JtyAGzdgw2XjudTZjc,2700
|
|
205
205
|
zou/app/services/exception.py,sha256=miD3RCXUgGezLvm2hqZfNqGEdodybu1TTLifPKgb5-E,4349
|
|
206
206
|
zou/app/services/file_tree_service.py,sha256=8JNBDgnXtV-AmSJ3gnUGB4oSwLjPgi1WYyL0Kc98JRE,33875
|
|
@@ -210,10 +210,10 @@ zou/app/services/names_service.py,sha256=TOSrintROmxcAlcFQE0i2E3PBLnw81GAztNselp
|
|
|
210
210
|
zou/app/services/news_service.py,sha256=eOXkvLhOcgncI2NrgiJEccV28oxZX5CsZVqaE-l4kWQ,9084
|
|
211
211
|
zou/app/services/notifications_service.py,sha256=7GDRio_mGaRYV5BHOAdpxBZjA_LLYUfVpbwZqy1n9pI,15685
|
|
212
212
|
zou/app/services/persons_service.py,sha256=HjV-su80Y2BO9l5zoBKHMNF0mDGtkWqPhEOs3nQ3nlI,16566
|
|
213
|
-
zou/app/services/playlists_service.py,sha256=
|
|
213
|
+
zou/app/services/playlists_service.py,sha256=IKjvT3RZigwXsrhsRFqaWWlm-tZSN6-jgMDf0Hn3w3Q,33179
|
|
214
214
|
zou/app/services/plugins_service.py,sha256=dbU-2f7t3eo6VISQBsASM8Or4Y8ha6Vt8ZHgtizdOi0,1917
|
|
215
215
|
zou/app/services/preview_files_service.py,sha256=673xVNvyK2LoMqWZ6b-g6n1krXOPFVFUh2wonDNLyck,36030
|
|
216
|
-
zou/app/services/projects_service.py,sha256=
|
|
216
|
+
zou/app/services/projects_service.py,sha256=TF9WcGLxQUzZkVIp3q4p8uALn2i0JEutvFtkJ0HvMt0,21840
|
|
217
217
|
zou/app/services/scenes_service.py,sha256=iXN19HU4njPF5VtZXuUrVJ-W23ZQuQNPC3ADXltbWtU,992
|
|
218
218
|
zou/app/services/schedule_service.py,sha256=E99HKYsXgnK2sw58fw-NNHXWBgVJiA60upztjkNSCaM,6989
|
|
219
219
|
zou/app/services/shots_service.py,sha256=MfBvw0hhVwi_KSQVnM-V4O3LnNkJB2imJWF6n9J6xfc,54747
|
|
@@ -260,7 +260,7 @@ zou/app/utils/string.py,sha256=MX-zsf55ecyhedu4mk55FhByx_hOc_dSe7B1aVjJzO0,458
|
|
|
260
260
|
zou/app/utils/thumbnail.py,sha256=eUb25So1fbjxZKYRpTOxLcZ0vww5zXNVkfVIa_tu5Dk,6625
|
|
261
261
|
zou/migrations/README,sha256=MVlc9TYmr57RbhXET6QxgyCcwWP7w-vLkEsirENqiIQ,38
|
|
262
262
|
zou/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
263
|
-
zou/migrations/alembic.ini,sha256=
|
|
263
|
+
zou/migrations/alembic.ini,sha256=skJWHDQKAhG_DCx0AM58QOx_54nEdcUEvUrR2dSXxGc,770
|
|
264
264
|
zou/migrations/env.py,sha256=lAFtfge8JEI70kC-I_Juv6hTYN4hcbprCrAIdooE9mI,1928
|
|
265
265
|
zou/migrations/script.py.mako,sha256=FrHLRpJcpRUI3pK_qYEohmCNbc9JRJFNP0P8Atjj-iw,518
|
|
266
266
|
zou/migrations/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -437,7 +437,7 @@ zou/migrations/versions/ffeed4956ab1_add_more_details_to_projects.py,sha256=cgRc
|
|
|
437
437
|
zou/plugin_template/__init__.py,sha256=f-p3Ds5rRK48camU6WCflKkpdYi9IhLPaifqluFygVw,772
|
|
438
438
|
zou/plugin_template/models.py,sha256=ExGehrSCC5vhrFeabgqicDZclLiFlIyUHonTOC61A_4,459
|
|
439
439
|
zou/plugin_template/routes.py,sha256=w0KNl2YoErxwnCoTt1EQiaUUCDDgSTNJd9dY6wfCCV4,341
|
|
440
|
-
zou/plugin_template/migrations/alembic.ini,sha256=
|
|
440
|
+
zou/plugin_template/migrations/alembic.ini,sha256=skJWHDQKAhG_DCx0AM58QOx_54nEdcUEvUrR2dSXxGc,770
|
|
441
441
|
zou/plugin_template/migrations/env.py,sha256=QEv3_y4ynLhq2kiH6Huw0yUKW-KTjzoqn7TGB6Ryxbo,2053
|
|
442
442
|
zou/plugin_template/migrations/script.py.mako,sha256=FrHLRpJcpRUI3pK_qYEohmCNbc9JRJFNP0P8Atjj-iw,518
|
|
443
443
|
zou/remote/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -446,9 +446,9 @@ zou/remote/normalize_movie.py,sha256=zNfEY3N1UbAHZfddGONTg2Sff3ieLVWd4dfZa1dpnes
|
|
|
446
446
|
zou/remote/playlist.py,sha256=AsDo0bgYhDcd6DfNRV6r6Jj3URWwavE2ZN3VkKRPbLU,3293
|
|
447
447
|
zou/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
448
448
|
zou/utils/movie.py,sha256=d67fIL9dVBKt-E_qCGXRbNNdbJaJR5sHvZeX3hf8ldE,16559
|
|
449
|
-
zou-0.20.
|
|
450
|
-
zou-0.20.
|
|
451
|
-
zou-0.20.
|
|
452
|
-
zou-0.20.
|
|
453
|
-
zou-0.20.
|
|
454
|
-
zou-0.20.
|
|
449
|
+
zou-0.20.51.dist-info/licenses/LICENSE,sha256=dql8h4yceoMhuzlcK0TT_i-NgTFNIZsgE47Q4t3dUYI,34520
|
|
450
|
+
zou-0.20.51.dist-info/METADATA,sha256=2-YCRFAvnrZKvyN8gJiTnGublubTooVWfmLl4A6dyOQ,6698
|
|
451
|
+
zou-0.20.51.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
452
|
+
zou-0.20.51.dist-info/entry_points.txt,sha256=PelQoIx3qhQ_Tmne7wrLY-1m2izuzgpwokoURwSohy4,130
|
|
453
|
+
zou-0.20.51.dist-info/top_level.txt,sha256=4S7G_jk4MzpToeDItHGjPhHx_fRdX52zJZWTD4SL54g,4
|
|
454
|
+
zou-0.20.51.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|