• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

EsupPortail / Esup-Pod / 8702385459

16 Apr 2024 08:26AM UTC coverage: 70.485%. First build
8702385459

Pull #1085

github

web-flow
bad link videojs lang file in claim_record page (#1105)

Co-authored-by: Charneau Franck <franck.charneau@univ-lr.fr>
Pull Request #1085: [DONE - FREEZE] Develop #3.6.0

739 of 989 new or added lines in 37 files covered. (74.72%)

10570 of 14996 relevant lines covered (70.49%)

0.7 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

81.25
/pod/dressing/utils.py
1
"""Esup-Pod dressing utilities."""
2

3
import os
1✔
4
from .models import Dressing
1✔
5
from django.conf import settings
1✔
6
from django.db.models import Q
1✔
7

8

9
def get_dressing_input(dressing: Dressing, ffmpeg_dressing_input: str) -> str:
1✔
10
    """
11
    Obtain the files necessary for encoding a dressed video.
12

13
    Args:
14
        dressing (:class:`pod.dressing.models.Dressing`): The dressing object.
15
        ffmpeg_dressing_input (str): Source file for encoding.
16

17
    Returns:
18
        command (str): params for the ffmpeg command.
19
    """
20
    command = ""
1✔
21
    if dressing.watermark:
1✔
NEW
22
        command += ffmpeg_dressing_input % {"input": dressing.watermark.file.path}
×
23
    if dressing.opening_credits:
1✔
NEW
24
        command += ffmpeg_dressing_input % {
×
25
            "input": os.path.join(
26
                settings.MEDIA_ROOT, str(dressing.opening_credits.video)
27
            )
28
        }
29
    if dressing.ending_credits:
1✔
NEW
30
        command += ffmpeg_dressing_input % {
×
31
            "input": os.path.join(settings.MEDIA_ROOT, str(dressing.ending_credits.video))
32
        }
33
    return command
1✔
34

35

36
def get_dressings(user, accessgroup_set) -> list:
1✔
37
    """
38
    Return the list of dressings that the user can use.
39

40
    Args:
41
        user (:class:`django.contrib.auth.models.User`): The user object.
42
        accessgroup_set (:class:`pod.authentication.models.AccessGroup`): User acess groups.
43

44
    Returns:
45
        dressings (list): list of dressings.
46
    """
47
    dressings = Dressing.objects.filter(
1✔
48
        Q(owners=user) | Q(users=user) | Q(allow_to_groups__in=accessgroup_set)
49
    ).distinct()
50
    return dressings
1✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc