Commit 91875150 authored by petitminion's avatar petitminion
Browse files

Update api/funkwhale_api/playlists/utils.py

parent 7af11d3f
Pipeline #15218 failed with stages
in 19 seconds
import logging
import re
# /!\ The next import have xml vulnerabilities but this shouldn't have security implication in funkwhale
# since there are only used to generate xspf file.
from xml.etree.ElementTree import Element, SubElement
......@@ -81,7 +82,7 @@ def generate_xspf_from_playlist(playlist_id):
This returns a string containing playlist data in xspf format
"""
fw_playlist = Playlist.objects.get(id=playlist_id)
plt_tracks = fw_playlist.playlist_tracks.prefetch_related('track')
plt_tracks = fw_playlist.playlist_tracks.prefetch_related('track')
top = Element("playlist")
top.set("version", "1")
title_xspf = SubElement(top, "title")
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment