Skip to content

Commit

Permalink
Add pydoc on new video tag and add version on video_select.js call
Browse files Browse the repository at this point in the history
  • Loading branch information
pampletousse authored and pampletousse committed Dec 13, 2023
1 parent 25e92a9 commit b015287
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pod/video/templates/videos/video_list_grid_selectable.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@
</div>
{% endspaceless %}
<script src="{% static 'playlist/js/utils-playlist.js' %}?ver={{VERSION}}"></script>
<script defer src="{% static 'js/video_select.js' %}"></script>
<script defer src="{% static 'js/video_select.js' %}?ver={{VERSION}}"></script>
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@
{% trans "Loading..." %}
</div>
{% endspaceless %}
<script defer src="{% static 'js/video_select.js' %}"></script>
<script defer src="{% static 'js/video_select.js' %}?ver={{VERSION}}"></script>
9 changes: 9 additions & 0 deletions pod/video/templatetags/video_tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,15 @@ def get_last_videos(context):

@register.simple_tag(name="get_video_infos")
def get_video_infos(video):
"""
Get videos infos (password, draft and chaptered) to display in list mode.
Args:
video ::class::`pod.video.models.Video`: Video model class.
Returns:
Return composite object of video's infos to be accessible in template
"""
is_password_protected = video.password or video.is_restricted
is_chaptered = video.chapter_set.all().count() > 0
return {
Expand Down

0 comments on commit b015287

Please sign in to comment.