zou 0.19.64__py3-none-any.whl → 0.19.66__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 CHANGED
@@ -1 +1 @@
1
- __version__ = "0.19.64"
1
+ __version__ = "0.19.66"
@@ -2,7 +2,12 @@ from flask_restful import Resource, inputs
2
2
  from flask_jwt_extended import jwt_required
3
3
 
4
4
  from zou.app.mixin import ArgsMixin
5
- from zou.app.services import news_service, projects_service, user_service
5
+ from zou.app.services import (
6
+ news_service,
7
+ projects_service,
8
+ user_service,
9
+ persons_service,
10
+ )
6
11
  from zou.app.services.exception import NewsNotFoundException
7
12
  from zou.app.utils import permissions
8
13
 
@@ -21,6 +26,8 @@ class NewsMixin(ArgsMixin):
21
26
  before,
22
27
  ) = self.get_arguments()
23
28
 
29
+ current_user = persons_service.get_current_user_raw()
30
+
24
31
  after = self.parse_date_parameter(after)
25
32
  before = self.parse_date_parameter(before)
26
33
  result = news_service.get_last_news_for_project(
@@ -34,6 +41,7 @@ class NewsMixin(ArgsMixin):
34
41
  page_size=page_size,
35
42
  after=after,
36
43
  before=before,
44
+ current_user=current_user,
37
45
  )
38
46
  stats = news_service.get_news_stats_for_project(
39
47
  project_ids=project_ids,
@@ -44,6 +52,7 @@ class NewsMixin(ArgsMixin):
44
52
  author_id=person_id,
45
53
  after=after,
46
54
  before=before,
55
+ current_user=current_user,
47
56
  )
48
57
  result["stats"] = stats
49
58
  return result
zou/app/models/person.py CHANGED
@@ -182,6 +182,7 @@ class Person(db.Model, BaseMixin, SerializerMixin):
182
182
  )
183
183
  return {
184
184
  "id": data["id"],
185
+ "type": data["type"],
185
186
  "first_name": data["first_name"],
186
187
  "last_name": data["last_name"],
187
188
  "full_name": self.full_name,
@@ -96,6 +96,7 @@ def get_last_news_for_project(
96
96
  before=None,
97
97
  after=None,
98
98
  episode_id=None,
99
+ current_user=None,
99
100
  ):
100
101
  """
101
102
  Return last 50 news for given project. Add related information to make it
@@ -120,6 +121,9 @@ def get_last_news_for_project(
120
121
 
121
122
  if len(project_ids) > 0:
122
123
  query = query.filter(Project.id.in_(project_ids))
124
+ elif current_user is not None:
125
+ if current_user.role.code != "admin":
126
+ query = query.filter(Project.team.contains(current_user))
123
127
 
124
128
  if entity_id is not None:
125
129
  query = query.filter(Entity.id == entity_id)
@@ -239,6 +243,7 @@ def get_news_stats_for_project(
239
243
  author_id=None,
240
244
  before=None,
241
245
  after=None,
246
+ current_user=None,
242
247
  ):
243
248
  """
244
249
  Return the number of news by task status for given project and filters.
@@ -262,6 +267,9 @@ def get_news_stats_for_project(
262
267
 
263
268
  if len(project_ids) > 0:
264
269
  query = query.filter(Project.id.in_(project_ids))
270
+ elif current_user is not None:
271
+ if current_user.role.code != "admin":
272
+ query = query.filter(Project.team.contains(current_user))
265
273
 
266
274
  if task_status_id is not None:
267
275
  query = query.filter(Comment.task_status_id == task_status_id)
zou/utils/movie.py CHANGED
@@ -108,7 +108,9 @@ def generate_tile(movie_path):
108
108
  height = 100
109
109
  width = math.ceil(height * ratio)
110
110
  if rows == 480:
111
- select = f"select='not(mod(n\,{math.ceil(duration_in_frames/3840)}))',"
111
+ select = (
112
+ rf"select='not(mod(n\,{math.ceil(duration_in_frames/3840)}))',"
113
+ )
112
114
  else:
113
115
  select = ""
114
116
  try:
@@ -493,7 +495,11 @@ def concat_demuxer(in_files, output_path, *args):
493
495
 
494
496
  stream = ffmpeg.input(temp.name, format="concat", safe=0)
495
497
  stream = ffmpeg.output(
496
- stream.video, stream.audio, output_path, c="copy"
498
+ stream.video,
499
+ stream.audio,
500
+ output_path,
501
+ vf="select=concatdec_select",
502
+ af="aselect=concatdec_select,aresample=async=1",
497
503
  )
498
504
  return run_ffmpeg(stream, "-xerror")
499
505
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: zou
3
- Version: 0.19.64
3
+ Version: 0.19.66
4
4
  Summary: API to store and manage the data of your animation production
5
5
  Home-page: https://zou.cg-wire.com
6
6
  Author: CG Wire
@@ -15,81 +15,83 @@ Classifier: Programming Language :: Python :: 3.9
15
15
  Classifier: Programming Language :: Python :: 3.10
16
16
  Classifier: Programming Language :: Python :: 3.11
17
17
  Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Programming Language :: Python :: 3.13
18
19
  Classifier: Programming Language :: Python :: Implementation :: CPython
19
20
  Classifier: Programming Language :: Python :: Implementation :: PyPy
20
21
  Classifier: Topic :: Multimedia :: Graphics
21
- Requires-Python: >=3.9, <3.13
22
+ Requires-Python: >=3.9, <3.14
22
23
  License-File: LICENSE
23
- Requires-Dist: babel ==2.16.0
24
- Requires-Dist: click ==8.1.7
25
- Requires-Dist: discord.py ==2.4.0
26
- Requires-Dist: email-validator ==2.2.0
27
- Requires-Dist: ffmpeg-python ==0.2.0
28
- Requires-Dist: fido2 ==1.1.3
29
- Requires-Dist: flasgger ==0.9.7.1
30
- Requires-Dist: flask-bcrypt ==1.0.1
31
- Requires-Dist: flask-caching ==2.3.0
32
- Requires-Dist: flask-fixtures ==0.3.8
33
- Requires-Dist: flask-mail ==0.10.0
34
- Requires-Dist: flask-principal ==0.4.0
35
- Requires-Dist: flask-restful ==0.3.10
36
- Requires-Dist: flask-sqlalchemy ==3.1.1
37
- Requires-Dist: flask-fs2[s3,swift] ==0.7.27
38
- Requires-Dist: flask-jwt-extended ==4.6.0
39
- Requires-Dist: flask-migrate ==4.0.7
40
- Requires-Dist: flask-socketio ==5.4.1
41
- Requires-Dist: flask ==3.0.3
42
- Requires-Dist: gazu ==0.10.16
43
- Requires-Dist: gevent-websocket ==0.10.1
44
- Requires-Dist: gevent ==24.11.1
45
- Requires-Dist: gunicorn ==23.0.0
46
- Requires-Dist: isoweek ==1.3.3
47
- Requires-Dist: itsdangerous ==2.2.0
48
- Requires-Dist: Jinja2 ==3.1.4
49
- Requires-Dist: ldap3 ==2.9.1
50
- Requires-Dist: matterhook ==0.2
51
- Requires-Dist: meilisearch ==0.31.6
52
- Requires-Dist: opencv-python ==4.10.0.84
53
- Requires-Dist: OpenTimelineIO ==0.17.0
54
- Requires-Dist: OpenTimelineIO-Plugins ==0.17.0
55
- Requires-Dist: orjson ==3.10.11
56
- Requires-Dist: pillow ==11.0.0
57
- Requires-Dist: psutil ==6.1.0
58
- Requires-Dist: psycopg[binary] ==3.2.3
59
- Requires-Dist: pyotp ==2.9.0
60
- Requires-Dist: pysaml2 ==7.5.0
61
- Requires-Dist: python-nomad ==2.0.1
62
- Requires-Dist: python-slugify ==8.0.4
63
- Requires-Dist: python-socketio ==5.11.4
64
- Requires-Dist: pytz ==2024.2
65
- Requires-Dist: redis ==5.2.0
66
- Requires-Dist: requests ==2.32.3
67
- Requires-Dist: rq ==2.0.0
68
- Requires-Dist: slackclient ==2.9.4
69
- Requires-Dist: sqlalchemy-utils ==0.41.2
70
- Requires-Dist: sqlalchemy ==2.0.36
71
- Requires-Dist: ua-parser ==0.18.0
72
- Requires-Dist: werkzeug ==3.0.6
73
- Requires-Dist: numpy ==2.0.1 ; python_version == "3.9"
74
- Requires-Dist: numpy ==2.1.3 ; python_version >= "3.10"
75
- Provides-Extra: dev
76
- Requires-Dist: wheel ; extra == 'dev'
77
- Provides-Extra: lint
78
- Requires-Dist: autoflake ==2.3.1 ; extra == 'lint'
79
- Requires-Dist: black ==24.10.0 ; extra == 'lint'
80
- Requires-Dist: pre-commit ==4.0.1 ; extra == 'lint'
81
- Provides-Extra: monitoring
82
- Requires-Dist: prometheus-flask-exporter ==0.23.1 ; extra == 'monitoring'
83
- Requires-Dist: pygelf ==0.4.2 ; extra == 'monitoring'
84
- Requires-Dist: sentry-sdk ==2.18.0 ; extra == 'monitoring'
24
+ Requires-Dist: audioop-lts==0.2.1; python_version >= "3.13"
25
+ Requires-Dist: babel==2.16.0
26
+ Requires-Dist: click==8.1.7
27
+ Requires-Dist: discord.py==2.4.0
28
+ Requires-Dist: email-validator==2.2.0
29
+ Requires-Dist: ffmpeg-python==0.2.0
30
+ Requires-Dist: fido2==1.1.3
31
+ Requires-Dist: flasgger==0.9.7.1
32
+ Requires-Dist: flask_bcrypt==1.0.1
33
+ Requires-Dist: flask_caching==2.3.0
34
+ Requires-Dist: flask_fixtures==0.3.8
35
+ Requires-Dist: flask_mail==0.10.0
36
+ Requires-Dist: flask_principal==0.4.0
37
+ Requires-Dist: flask_restful==0.3.10
38
+ Requires-Dist: flask_sqlalchemy==3.1.1
39
+ Requires-Dist: flask-fs2[s3,swift]==0.7.27
40
+ Requires-Dist: flask-jwt-extended==4.7.0
41
+ Requires-Dist: flask-migrate==4.0.7
42
+ Requires-Dist: flask-socketio==5.4.1
43
+ Requires-Dist: flask==3.1.0
44
+ Requires-Dist: gazu==0.10.19
45
+ Requires-Dist: gevent-websocket==0.10.1
46
+ Requires-Dist: gevent==24.11.1
47
+ Requires-Dist: gunicorn==23.0.0
48
+ Requires-Dist: isoweek==1.3.3
49
+ Requires-Dist: itsdangerous==2.2.0
50
+ Requires-Dist: Jinja2==3.1.4
51
+ Requires-Dist: ldap3==2.9.1
52
+ Requires-Dist: matterhook==0.2
53
+ Requires-Dist: meilisearch==0.31.6
54
+ Requires-Dist: numpy==2.0.1; python_version == "3.9"
55
+ Requires-Dist: numpy==2.1.3; python_version >= "3.10"
56
+ Requires-Dist: opencv-python==4.10.0.84
57
+ Requires-Dist: OpenTimelineIO==0.17.0
58
+ Requires-Dist: OpenTimelineIO-Plugins==0.17.0
59
+ Requires-Dist: orjson==3.10.11
60
+ Requires-Dist: pillow==11.0.0
61
+ Requires-Dist: psutil==6.1.0
62
+ Requires-Dist: psycopg[binary]==3.2.3
63
+ Requires-Dist: pyotp==2.9.0
64
+ Requires-Dist: pysaml2==7.5.0
65
+ Requires-Dist: python-nomad==2.0.1
66
+ Requires-Dist: python-slugify==8.0.4
67
+ Requires-Dist: python-socketio==5.11.4
68
+ Requires-Dist: pytz==2024.2
69
+ Requires-Dist: redis==5.2.0
70
+ Requires-Dist: requests==2.32.3
71
+ Requires-Dist: rq==2.0.0
72
+ Requires-Dist: slackclient==2.9.4
73
+ Requires-Dist: sqlalchemy_utils==0.41.2
74
+ Requires-Dist: sqlalchemy==2.0.36
75
+ Requires-Dist: ua-parser==0.18.0
76
+ Requires-Dist: werkzeug==3.1.3
85
77
  Provides-Extra: prod
86
- Requires-Dist: gunicorn ; extra == 'prod'
87
- Requires-Dist: gevent ; extra == 'prod'
78
+ Requires-Dist: gunicorn; extra == "prod"
79
+ Requires-Dist: gevent; extra == "prod"
80
+ Provides-Extra: dev
81
+ Requires-Dist: wheel; extra == "dev"
88
82
  Provides-Extra: test
89
- Requires-Dist: fakeredis ==2.26.1 ; extra == 'test'
90
- Requires-Dist: mixer ==7.2.2 ; extra == 'test'
91
- Requires-Dist: pytest-cov ==6.0.0 ; extra == 'test'
92
- Requires-Dist: pytest ==8.3.3 ; extra == 'test'
83
+ Requires-Dist: fakeredis==2.26.1; extra == "test"
84
+ Requires-Dist: mixer==7.2.2; extra == "test"
85
+ Requires-Dist: pytest-cov==6.0.0; extra == "test"
86
+ Requires-Dist: pytest==8.3.3; extra == "test"
87
+ Provides-Extra: monitoring
88
+ Requires-Dist: prometheus-flask-exporter==0.23.1; extra == "monitoring"
89
+ Requires-Dist: pygelf==0.4.2; extra == "monitoring"
90
+ Requires-Dist: sentry-sdk==2.18.0; extra == "monitoring"
91
+ Provides-Extra: lint
92
+ Requires-Dist: autoflake==2.3.1; extra == "lint"
93
+ Requires-Dist: black==24.10.0; extra == "lint"
94
+ Requires-Dist: pre-commit==4.0.1; extra == "lint"
93
95
 
94
96
  .. figure:: https://zou.cg-wire.com/kitsu.png
95
97
  :alt: Kitsu Logo
@@ -1,4 +1,4 @@
1
- zou/__init__.py,sha256=AE0rp3sVhFtsB8DowQYoE-zLLutz3QrJPjwvcxH2Z-w,24
1
+ zou/__init__.py,sha256=Cw-hkkLBzXXYINYI0D9ELPausx7d8TqjQhEq4-hNpPM,24
2
2
  zou/cli.py,sha256=E7rinikQMEAoSzyV4VH2IrTR4HRDBgqHAcYswEfyFnU,18893
3
3
  zou/debug.py,sha256=1fawPbkD4wn0Y9Gk0BiBFSa-CQe5agFi8R9uJYl2Uyk,520
4
4
  zou/event_stream.py,sha256=_tue9Ry3aqCniZpKGhWJaY1Eo_fd6zOAfnzPvh_mJzU,8489
@@ -85,7 +85,7 @@ zou/app/blueprints/files/resources.py,sha256=8SIV8kaqv3dxyL8nyqG3QiZmk5ZYIvUxw6k
85
85
  zou/app/blueprints/index/__init__.py,sha256=Dh3oQiirpg8RCkfVOuk3irIjSvUvuRf0jPxE6oGubz0,828
86
86
  zou/app/blueprints/index/resources.py,sha256=_JiNodmq3-XCIz4vF0MYkkkg1Wdzh7Fl19KU0TTia1M,8742
87
87
  zou/app/blueprints/news/__init__.py,sha256=HxBXjC15dVbotNAZ0CLf02iwUjxJr20kgf8_kT_9nwM,505
88
- zou/app/blueprints/news/resources.py,sha256=SL0RYo-fs23GjQU1IW4kuEBg2SHdaXaonrOoOnWafdw,7183
88
+ zou/app/blueprints/news/resources.py,sha256=5sN4iHTD3W2SEi1MhVHpeR1OjeTdW-XarkD8tyINLzU,7362
89
89
  zou/app/blueprints/persons/__init__.py,sha256=0cnHHw3K_8OEMm0qOi3wKVomSAg9IJSnVjAXabMeHks,3893
90
90
  zou/app/blueprints/persons/resources.py,sha256=0EBI6w63WhjqDSj-COYGk4NO6V1oRyAzfH4f7dXNYoE,42793
91
91
  zou/app/blueprints/playlists/__init__.py,sha256=vuEk1F3hFHsmuKWhdepMoLyOzmNKDn1YrjjfcaIz0lQ,1596
@@ -159,7 +159,7 @@ zou/app/models/notification.py,sha256=1ODOymGPeB4oxgX_3WhOgIL_Lsz-JR7miDkBS6W8t_
159
159
  zou/app/models/organisation.py,sha256=jVDsS3C3ani0NYeKKMnsnkGzeeQor9jMU1qkHxkSa9c,1938
160
160
  zou/app/models/output_file.py,sha256=hyLGrpsgrk0aisDXppRQrB7ItCwyuyw-X0ZwVAHabsA,2569
161
161
  zou/app/models/output_type.py,sha256=us_lCUCEvuP4vi_XmmOcEl1J2MtZhMX5ZheBqEFCgWA,381
162
- zou/app/models/person.py,sha256=-JpYBpzqZ3LDD6HW1YgjrD7szhWSxQ0ti4GrrGvja2w,7466
162
+ zou/app/models/person.py,sha256=E6Q3KyE4QDon41Fz9sJSCYdR6obqWHtvv2jBOYYFGik,7500
163
163
  zou/app/models/playlist.py,sha256=YGgAk84u0_fdIEY02Dal4kfk8APVZvWFwWYV74qvrio,1503
164
164
  zou/app/models/preview_background_file.py,sha256=j8LgRmY7INnlB07hFwwB-8ssQrRC8vsb8VcpsTbt6tA,559
165
165
  zou/app/models/preview_file.py,sha256=Ur45Wau2X3qyKULh04EUcMbnBmaQc8y4IMs5NgELiAQ,3134
@@ -198,7 +198,7 @@ zou/app/services/file_tree_service.py,sha256=8JNBDgnXtV-AmSJ3gnUGB4oSwLjPgi1WYyL
198
198
  zou/app/services/files_service.py,sha256=df1_9v-vwE5HVi9XjtilTPWHuiWunvrwPyQh_IXupNM,28517
199
199
  zou/app/services/index_service.py,sha256=1w8rGJ7ArYC13B43hD4JOPtVhaRsbseJVVY-GnU_3tA,9874
200
200
  zou/app/services/names_service.py,sha256=TOSrintROmxcAlcFQE0i2E3PBLnw81GAztNselpTn18,2947
201
- zou/app/services/news_service.py,sha256=g-QlITBbEvhvm-pLv7GtGACKX4uBPa-IKxfNOgMgaHo,8768
201
+ zou/app/services/news_service.py,sha256=Wq262gOPP4EThXXcpT9o0QW8Z3lDQuPV6It-7IEzA5U,9116
202
202
  zou/app/services/notifications_service.py,sha256=7GDRio_mGaRYV5BHOAdpxBZjA_LLYUfVpbwZqy1n9pI,15685
203
203
  zou/app/services/persons_service.py,sha256=0CKYrmHDUq34VNNgLSWDKN37EgmD68ZqyrUmm4ABj18,16356
204
204
  zou/app/services/playlists_service.py,sha256=pAlPHET4jNdST5jsmJrFUkf1SVhfSoML9zdNpZ_88l4,32439
@@ -412,10 +412,10 @@ zou/remote/config_payload.py,sha256=7b1xTZ0AHP1Y1KVWozQ4sNMS34s7fg3WO6nNbdDZBDc,
412
412
  zou/remote/normalize_movie.py,sha256=zNfEY3N1UbAHZfddGONTg2Sff3ieLVWd4dfZa1dpnes,2164
413
413
  zou/remote/playlist.py,sha256=AsDo0bgYhDcd6DfNRV6r6Jj3URWwavE2ZN3VkKRPbLU,3293
414
414
  zou/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
415
- zou/utils/movie.py,sha256=u9LCEOvmkxwm-KiZ6jKNdB9LSC6XXUDwJpVx8LkDwJg,16416
416
- zou-0.19.64.dist-info/LICENSE,sha256=dql8h4yceoMhuzlcK0TT_i-NgTFNIZsgE47Q4t3dUYI,34520
417
- zou-0.19.64.dist-info/METADATA,sha256=C-XgzvidRw9iFYCbEg3gXBgcVa7XVocH5OdY0dPG1Pw,6676
418
- zou-0.19.64.dist-info/WHEEL,sha256=R06PA3UVYHThwHvxuRWMqaGcr-PuniXahwjmQRFMEkY,91
419
- zou-0.19.64.dist-info/entry_points.txt,sha256=PelQoIx3qhQ_Tmne7wrLY-1m2izuzgpwokoURwSohy4,130
420
- zou-0.19.64.dist-info/top_level.txt,sha256=4S7G_jk4MzpToeDItHGjPhHx_fRdX52zJZWTD4SL54g,4
421
- zou-0.19.64.dist-info/RECORD,,
415
+ zou/utils/movie.py,sha256=d67fIL9dVBKt-E_qCGXRbNNdbJaJR5sHvZeX3hf8ldE,16559
416
+ zou-0.19.66.dist-info/LICENSE,sha256=dql8h4yceoMhuzlcK0TT_i-NgTFNIZsgE47Q4t3dUYI,34520
417
+ zou-0.19.66.dist-info/METADATA,sha256=VAEd-Y-aeo17VIIrV9ej5A0CLKnJEw6jpivTFxCqJDs,6710
418
+ zou-0.19.66.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
419
+ zou-0.19.66.dist-info/entry_points.txt,sha256=PelQoIx3qhQ_Tmne7wrLY-1m2izuzgpwokoURwSohy4,130
420
+ zou-0.19.66.dist-info/top_level.txt,sha256=4S7G_jk4MzpToeDItHGjPhHx_fRdX52zJZWTD4SL54g,4
421
+ zou-0.19.66.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.5.0)
2
+ Generator: setuptools (75.6.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
File without changes