1
0
Fork 0
mirror of https://github.com/Yetangitu/ampache synced 2025-10-05 19:41:55 +02:00

Add video support to playlist (fix #675)

This commit is contained in:
Afterster 2015-12-27 21:25:30 +01:00
parent 9d9f7a2711
commit aa19993358
23 changed files with 284 additions and 135 deletions

View file

@ -1314,7 +1314,7 @@ class Plex_XML_Data
//$xpl->addAttribute('composite', '');
$xpl->addAttribute('playlistType', 'audio');
$xpl->addAttribute('duration', $playlist->get_total_duration() * 1000);
$xpl->addAttribute('leafCount', $playlist->get_song_count());
$xpl->addAttribute('leafCount', $playlist->get_media_count('song'));
$xpl->addAttribute('addedAt', '');
$xpl->addAttribute('updatedAt', '');
}
@ -1322,7 +1322,7 @@ class Plex_XML_Data
public static function setPlaylistItems(SimpleXMLElement $xml, $playlist)
{
$xml->addAttribute('duration', $playlist->get_total_duration() * 1000);
$xml->addAttribute('leafCount', $playlist->get_song_count());
$xml->addAttribute('leafCount', $playlist->get_media_count('song'));
$items = $playlist->get_items();
self::addPlaylistsItems($xml, $items);
}