m3u playlist customization

361 views
Skip to first unread message

Honza Rindt

unread,
Jul 13, 2015, 11:27:39 AM7/13/15
to amp...@googlegroups.com
Hi,
it is possible to edit m3u playlist creation pattern? If user generates a playlist, it contains no album information although album is displayed when the song is played because it is set-up in catalogue creation.
Thank you very much.

Afterster

unread,
Jul 14, 2015, 2:03:29 AM7/14/15
to Honza Rindt, amp...@googlegroups.com
I believe you're talking about the m3u file created when play mode is on "Stream". This m3u is generated according to https://github.com/ampache/ampache/blob/11b3689a674887f9878cd0b9242584f550e00c47/lib/class/stream_playlist.class.php#L307
How would you put the album name in the m3u, using #EXTALB (not sure it is standard)?

--
You received this message because you are subscribed to the Google Groups "Ampache" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ampache+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ampache/cfe4bf30-5d75-4659-91b1-734f47f0a8b7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Honza Rindt

unread,
Jul 14, 2015, 3:28:04 AM7/14/15
to Afterster, amp...@googlegroups.com
Yes! That's the exactly what I was looking for.
So, let's give an example. When creating new catalog, there is an option for filename pattern, by default, there is %a - %T - %t. But for my catalog of music, I decided to rather have it in %a - %A - %T - %t pattern.
Now, when creating m3u playlist using Stream mode, the file contains:
#EXTM3U
#EXTINF:216,Dave Matthews Band - I Did It and url. When I load m3u in my favorite player, it will display name of song from m3u file, but when the player actually starts playing that song, it will load the name in pattern specified in catalog. So it becomes Dave Matthews Band - Everyday - I Did It.
Now I wanted to Ampache created m3u playlist in this pattern. To do that, I edited line 313 to echo '#EXTINF:' . $url->time, ',' . $url->author . ' - ' . $url->album . ' - ' . $url->title . "\n"; and everything is fine now.
It might be worth try to edit that peace of code to respect Filename pattern, specified while creating a catalog.

 

Message has been deleted

Afterster

unread,
Jul 16, 2015, 1:42:01 AM7/16/15
to Honza Rindt, amp...@googlegroups.com
Ok.
Filename pattern is for catalog import, it does not always means you want the same output. But itt could be a new setting. Could you make a new feature request on github according to this discussion? Thank you.

2015-07-14 9:29 GMT+02:00 Honza Rindt <honza...@gmail.com>:


Yes! That's the exactly what I was looking for.
So, let's give an example. When creating new catalog, there is an option for filename pattern, by default, there is %a - %T - %t. But for my catalog of music, I decided to rather have it in %a - %A - %T - %t pattern.
Now, when creating m3u playlist using Stream mode, the file contains:
#EXTM3U
#EXTINF:216,Dave Matthews Band - I Did It and url. When I load m3u in my favorite player, it will display name of song from m3u file, but when the player actually starts playing that song, it will load the name in pattern specified in catalog. So it becomes Dave Matthews Band - Everyday - I Did It.
Now I wanted to Ampache created m3u playlist in this pattern. To do that, I edited line 313 to echo '#EXTINF:' . $url->time, ',' . $url->author . ' - ' . $url->album . ' - ' . $url->title . "\n"; and everything is fine now.
It might be worth try to edit that peace of code to respect Filename pattern, specified while creating a catalog.

 


Dne úterý 14. července 2015 8:03:29 UTC+2 Afterster napsal(a):
Reply all
Reply to author
Forward
0 new messages