zou 0.20.78__py3-none-any.whl → 0.20.79__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/services/emails_service.py +26 -14
- zou/app/services/notifications_service.py +9 -0
- zou/app/services/user_service.py +7 -0
- {zou-0.20.78.dist-info → zou-0.20.79.dist-info}/METADATA +1 -1
- {zou-0.20.78.dist-info → zou-0.20.79.dist-info}/RECORD +10 -10
- {zou-0.20.78.dist-info → zou-0.20.79.dist-info}/WHEEL +0 -0
- {zou-0.20.78.dist-info → zou-0.20.79.dist-info}/entry_points.txt +0 -0
- {zou-0.20.78.dist-info → zou-0.20.79.dist-info}/licenses/LICENSE +0 -0
- {zou-0.20.78.dist-info → zou-0.20.79.dist-info}/top_level.txt +0 -0
zou/__init__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "0.20.
|
|
1
|
+
__version__ = "0.20.79"
|
|
@@ -164,7 +164,7 @@ _%s_
|
|
|
164
164
|
},
|
|
165
165
|
"discord_message": discord_message,
|
|
166
166
|
}
|
|
167
|
-
send_notification(person_id, subject, messages)
|
|
167
|
+
send_notification(person_id, subject, messages, title)
|
|
168
168
|
|
|
169
169
|
return True
|
|
170
170
|
|
|
@@ -215,7 +215,7 @@ _%s_
|
|
|
215
215
|
task_url,
|
|
216
216
|
comment["text"],
|
|
217
217
|
)
|
|
218
|
-
|
|
218
|
+
title = "New Mention"
|
|
219
219
|
messages = {
|
|
220
220
|
"email_message": email_message,
|
|
221
221
|
"slack_message": slack_message,
|
|
@@ -225,7 +225,7 @@ _%s_
|
|
|
225
225
|
},
|
|
226
226
|
"discord_message": discord_message,
|
|
227
227
|
}
|
|
228
|
-
return send_notification(person_id, subject, messages)
|
|
228
|
+
return send_notification(person_id, subject, messages, title)
|
|
229
229
|
else:
|
|
230
230
|
return True
|
|
231
231
|
|
|
@@ -273,7 +273,7 @@ def send_assignation_notification(person_id, author_id, task):
|
|
|
273
273
|
},
|
|
274
274
|
"discord_message": discord_message,
|
|
275
275
|
}
|
|
276
|
-
return send_notification(person_id, subject, messages)
|
|
276
|
+
return send_notification(person_id, subject, messages, title)
|
|
277
277
|
return True
|
|
278
278
|
|
|
279
279
|
|
|
@@ -372,7 +372,7 @@ _%s_
|
|
|
372
372
|
},
|
|
373
373
|
"discord_message": discord_message,
|
|
374
374
|
}
|
|
375
|
-
send_notification(person_id, subject, messages)
|
|
375
|
+
send_notification(person_id, subject, messages, title)
|
|
376
376
|
return True
|
|
377
377
|
|
|
378
378
|
|
|
@@ -397,25 +397,37 @@ def send_playlist_ready_notification(person_id, author_id, playlist):
|
|
|
397
397
|
or person["notifications_mattermost_enabled"]
|
|
398
398
|
or person["notifications_discord_enabled"]
|
|
399
399
|
):
|
|
400
|
+
|
|
401
|
+
playlist_url = f"{config.DOMAIN_PROTOCOL}://{config.DOMAIN_NAME}/productions/{playlist['project_id']}/"
|
|
402
|
+
|
|
400
403
|
if episode is not None:
|
|
401
|
-
playlist_url
|
|
404
|
+
playlist_url += f"episodes/{episode['id']}/playlists/{playlist['id']}"
|
|
405
|
+
elif project["production_type"] == "tvshow" and \
|
|
406
|
+
playlist["for_entity"] == "asset":
|
|
407
|
+
if playlist["is_for_all"] == True:
|
|
408
|
+
playlist_url += f"episodes/all/playlists/{playlist['id']}"
|
|
409
|
+
else:
|
|
410
|
+
playlist_url += f"episodes/main/playlists/{playlist['id']}"
|
|
402
411
|
else:
|
|
403
|
-
playlist_url
|
|
412
|
+
playlist_url += f"playlists/{playlist['id']}"
|
|
404
413
|
|
|
405
|
-
title = "Playlist Ready"
|
|
414
|
+
title = "New Playlist Ready"
|
|
406
415
|
episode_segment = ""
|
|
407
416
|
if episode is not None:
|
|
408
|
-
episode_segment = f"the episode {episode['name']} of"
|
|
409
|
-
subject =
|
|
417
|
+
episode_segment = f"the episode {episode['name']} of "
|
|
418
|
+
subject = f'[Kitsu] The playlist {playlist["name"]} in project {project["name"]} is ready for review'
|
|
410
419
|
|
|
411
|
-
email_message = f"""<p><strong>{author["full_name"]}</strong> notifies you that playlist <a href="{playlist_url}">{playlist["name"]}</a> is ready for a review under {episode_segment}
|
|
420
|
+
email_message = f"""<p><strong>{author["full_name"]}</strong> notifies you that playlist <a href="{playlist_url}">{playlist["name"]}</a> is ready for a review under {episode_segment}the project {project["name"]}.</p>
|
|
421
|
+
"""
|
|
412
422
|
|
|
413
|
-
|
|
423
|
+
if len(playlist["shots"]) > 1:
|
|
424
|
+
email_message += f"""
|
|
425
|
+
<p>{len(playlist["shots"])} elements are listed in the playlist.</p>
|
|
414
426
|
"""
|
|
415
427
|
|
|
416
|
-
slack_message = f"*{author['full_name']}* notifies you that a playlist <{playlist_url}|{playlist['name']}> is ready for a review under {episode_segment}
|
|
428
|
+
slack_message = f"*{author['full_name']}* notifies you that a playlist <{playlist_url}|{playlist['name']}> is ready for a review under {episode_segment}the project {project['name']}."
|
|
417
429
|
|
|
418
|
-
discord_message = f"*{author['full_name']}* notifies you that a playlist [{playlist['name']}]({playlist_url}) is ready for a review under {episode_segment}
|
|
430
|
+
discord_message = f"*{author['full_name']}* notifies you that a playlist [{playlist['name']}]({playlist_url}) is ready for a review under {episode_segment}the project {project['name']}."
|
|
419
431
|
messages = {
|
|
420
432
|
"email_message": email_message,
|
|
421
433
|
"slack_message": slack_message,
|
|
@@ -529,3 +529,12 @@ def notify_clients_playlist_ready(playlist, studio_id=None):
|
|
|
529
529
|
emails_service.send_playlist_ready_notification(
|
|
530
530
|
recipient_id, author_id, playlist
|
|
531
531
|
)
|
|
532
|
+
events.emit(
|
|
533
|
+
"notification:new",
|
|
534
|
+
{
|
|
535
|
+
"notification_id": notification["id"],
|
|
536
|
+
"person_id": recipient_id,
|
|
537
|
+
},
|
|
538
|
+
project_id=playlist["project_id"],
|
|
539
|
+
persist=False,
|
|
540
|
+
)
|
zou/app/services/user_service.py
CHANGED
|
@@ -1461,6 +1461,8 @@ def get_last_notifications(
|
|
|
1461
1461
|
full_entity_name, episode_id, entity_preview_file_id = "", None, None
|
|
1462
1462
|
playlist_id = notification.playlist_id
|
|
1463
1463
|
playlist_name = ""
|
|
1464
|
+
playlist_for_entity = ""
|
|
1465
|
+
playlist_is_for_all = False
|
|
1464
1466
|
if notification.playlist_id is None:
|
|
1465
1467
|
(full_entity_name, episode_id, entity_preview_file_id) = (
|
|
1466
1468
|
names_service.get_full_entity_name(task_entity_id)
|
|
@@ -1474,6 +1476,9 @@ def get_last_notifications(
|
|
|
1474
1476
|
project_id = project["id"]
|
|
1475
1477
|
project_name = project["name"]
|
|
1476
1478
|
playlist_name = playlist["name"]
|
|
1479
|
+
playlist_for_entity = playlist["for_entity"]
|
|
1480
|
+
playlist_is_for_all = playlist["is_for_all"]
|
|
1481
|
+
|
|
1477
1482
|
preview_file_id = None
|
|
1478
1483
|
mentions = []
|
|
1479
1484
|
department_mentions = []
|
|
@@ -1539,6 +1544,8 @@ def get_last_notifications(
|
|
|
1539
1544
|
"subscription_id": subscription_id,
|
|
1540
1545
|
"playlist_id": playlist_id,
|
|
1541
1546
|
"playlist_name": playlist_name,
|
|
1547
|
+
"playlist_for_entity": playlist_for_entity,
|
|
1548
|
+
"playlist_is_for_all": playlist_is_for_all,
|
|
1542
1549
|
}
|
|
1543
1550
|
)
|
|
1544
1551
|
)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
zou/__init__.py,sha256=
|
|
1
|
+
zou/__init__.py,sha256=LXoEcDo6khk2OppbVEFdEec8-nd6EVOMY4kgq866Voo,24
|
|
2
2
|
zou/cli.py,sha256=N9FyrL4TDgIiCUa-I3xIzOgiVLM14kz8_QLQ48y51oE,22767
|
|
3
3
|
zou/debug.py,sha256=1fawPbkD4wn0Y9Gk0BiBFSa-CQe5agFi8R9uJYl2Uyk,520
|
|
4
4
|
zou/event_stream.py,sha256=9O1PE_vDW8p3yfHJNSZ8w0ybD-660x8oGN0izgJdTjM,8575
|
|
@@ -206,7 +206,7 @@ zou/app/services/custom_actions_service.py,sha256=fWISEOOdthadrxeHuacEel5Xj6msn0
|
|
|
206
206
|
zou/app/services/deletion_service.py,sha256=UPojg4oyyCKjUObfwv9nY6tD0SVDeimpv0xgbcSmyyk,17372
|
|
207
207
|
zou/app/services/departments_service.py,sha256=7jLKH7ziToc6uHZsZKdBUzN2Ubi2YloHCX7PecE51LU,4596
|
|
208
208
|
zou/app/services/edits_service.py,sha256=hfg6Fk9J9W41Qyw96UF35cSgbXqCYci6H8OY5rL_cIk,12075
|
|
209
|
-
zou/app/services/emails_service.py,sha256=
|
|
209
|
+
zou/app/services/emails_service.py,sha256=FqcLiTlaagjiU5XQeN9Rk5gdkd_Fs6bnKZXKxesIfEg,14767
|
|
210
210
|
zou/app/services/entities_service.py,sha256=H9fMuRmrcS_ZxZ7vEo30m93UCRwXCKsIaPU7SYTgoK8,17792
|
|
211
211
|
zou/app/services/events_service.py,sha256=Ew-bY5hqrWLmpbVj1_xd3E2S3JtyAGzdgw2XjudTZjc,2700
|
|
212
212
|
zou/app/services/exception.py,sha256=VaQbvvv7yJ-lCFOlvAPKkYPuw7MjCaSAo1F40fS3kZ8,4478
|
|
@@ -215,7 +215,7 @@ zou/app/services/files_service.py,sha256=df1_9v-vwE5HVi9XjtilTPWHuiWunvrwPyQh_IX
|
|
|
215
215
|
zou/app/services/index_service.py,sha256=IaffQz_oj6GPEbuDp4a2qnSc6n-hhIcmA_LrTm3Wots,10201
|
|
216
216
|
zou/app/services/names_service.py,sha256=TOSrintROmxcAlcFQE0i2E3PBLnw81GAztNselpTn18,2947
|
|
217
217
|
zou/app/services/news_service.py,sha256=oXdEiSaTdkpYutm_UtmNWTDw4BPUBMFJDOEHhJ28q6w,10047
|
|
218
|
-
zou/app/services/notifications_service.py,sha256=
|
|
218
|
+
zou/app/services/notifications_service.py,sha256=yCcS5NpEQe1H9bHO-Oae1E8lmEh-oGwcHut4DRq1OIM,17104
|
|
219
219
|
zou/app/services/persons_service.py,sha256=HjV-su80Y2BO9l5zoBKHMNF0mDGtkWqPhEOs3nQ3nlI,16566
|
|
220
220
|
zou/app/services/playlists_service.py,sha256=IKjvT3RZigwXsrhsRFqaWWlm-tZSN6-jgMDf0Hn3w3Q,33179
|
|
221
221
|
zou/app/services/plugins_service.py,sha256=dbU-2f7t3eo6VISQBsASM8Or4Y8ha6Vt8ZHgtizdOi0,1917
|
|
@@ -231,7 +231,7 @@ zou/app/services/tasks_service.py,sha256=ZLUi6_XhLU_SLwERFHx4QwcXdS-ncrVH_rIl-Lt
|
|
|
231
231
|
zou/app/services/telemetry_services.py,sha256=xQm1h1t_JxSFW59zQGf4NuNdUi1UfMa_6pQ-ytRbmGA,1029
|
|
232
232
|
zou/app/services/template_services.py,sha256=26iK-ptX3SyPF3zj1l4dWVRRGcTHxUD990P_wUDyck4,38050
|
|
233
233
|
zou/app/services/time_spents_service.py,sha256=AIMDyBkVVxqUqVBqsUhwjLMxYKgHcgoSRJyKJkPORTk,18636
|
|
234
|
-
zou/app/services/user_service.py,sha256=
|
|
234
|
+
zou/app/services/user_service.py,sha256=KoMmcJgo3kakLW-UNjqLLDeVjiUojRT-6LitJTPuUb8,54058
|
|
235
235
|
zou/app/stores/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
236
236
|
zou/app/stores/auth_tokens_store.py,sha256=-qOJPybLHvnMOq3PWk073OW9HJwOHGhFLZeOIlX1UVw,1290
|
|
237
237
|
zou/app/stores/file_store.py,sha256=yLQDM6mNbj9oe0vsWdBqun7D8Dw-eSjD1yHCCftX0OI,4045
|
|
@@ -473,9 +473,9 @@ zou/remote/normalize_movie.py,sha256=zNfEY3N1UbAHZfddGONTg2Sff3ieLVWd4dfZa1dpnes
|
|
|
473
473
|
zou/remote/playlist.py,sha256=AsDo0bgYhDcd6DfNRV6r6Jj3URWwavE2ZN3VkKRPbLU,3293
|
|
474
474
|
zou/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
475
475
|
zou/utils/movie.py,sha256=d67fIL9dVBKt-E_qCGXRbNNdbJaJR5sHvZeX3hf8ldE,16559
|
|
476
|
-
zou-0.20.
|
|
477
|
-
zou-0.20.
|
|
478
|
-
zou-0.20.
|
|
479
|
-
zou-0.20.
|
|
480
|
-
zou-0.20.
|
|
481
|
-
zou-0.20.
|
|
476
|
+
zou-0.20.79.dist-info/licenses/LICENSE,sha256=dql8h4yceoMhuzlcK0TT_i-NgTFNIZsgE47Q4t3dUYI,34520
|
|
477
|
+
zou-0.20.79.dist-info/METADATA,sha256=3-qEmV2mmCpTddGL6nfshPTxj-49KVawwTa6E7nucHs,6698
|
|
478
|
+
zou-0.20.79.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
479
|
+
zou-0.20.79.dist-info/entry_points.txt,sha256=PelQoIx3qhQ_Tmne7wrLY-1m2izuzgpwokoURwSohy4,130
|
|
480
|
+
zou-0.20.79.dist-info/top_level.txt,sha256=4S7G_jk4MzpToeDItHGjPhHx_fRdX52zJZWTD4SL54g,4
|
|
481
|
+
zou-0.20.79.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|