Since upgrading from fb2k 2.0 to 2.1, I found all of my Internet radio URLs in a file-based playlist no longer work. fb2k screams loudly:
Unable to open item for playback (Length of object is unknown):
"https://somafm.com/m3u/darkzone64.m3u"
Unable to open item for playback (Length of object is unknown):
"https://somafm.com/m3u/deepspaceone64.m3u"
What the file-based playlist consists of:
#
https://somafm.com/m3u/darkzone64.m3u
https://somafm.com/m3u/deepspaceone64.m3u
If we examine what the server returns for the first URL, we can see Content-Length is provided, along with an actual playlist itself:
$ curl -v 'https://somafm.com/m3u/darkzone64.m3u'
* Trying 173.239.76.147:443...
* Connected to somafm.com (173.239.76.147) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
* successfully set certificate verify locations:
* CAfile: /usr/local/share/certs/ca-root-nss.crt
* CApath: none
* TLSv1.2 (OUT), TLS header, Certificate Status (22):
* TLSv1.2 (OUT), TLS handshake, Client hello (1):
* TLSv1.2 (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
* TLSv1.2 (IN), TLS handshake, Server finished (14):
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
* TLSv1.2 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.2 (OUT), TLS handshake, Finished (20):
* TLSv1.2 (IN), TLS change cipher, Change cipher spec (1):
* TLSv1.2 (IN), TLS handshake, Finished (20):
* SSL connection using TLSv1.2 / ECDHE-RSA-AES256-GCM-SHA384
* ALPN, server accepted to use http/1.1
* Server certificate:
* subject: CN=somafm.com
* start date: Nov 22 00:00:00 2023 GMT
* expire date: Feb 20 23:59:59 2024 GMT
* subjectAltName: host "somafm.com" matched cert's "somafm.com"
* issuer: C=AT; O=ZeroSSL; CN=ZeroSSL RSA Domain Secure Site CA
* SSL certificate verify ok.
> GET /m3u/darkzone64.m3u HTTP/1.1
> Host: somafm.com
> User-Agent: curl/7.79.1
> Accept: */*
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< Server: nginx
< Date: Thu, 28 Dec 2023 11:40:20 GMT
< Content-Type: audio/x-mpegurl
< Content-Length: 375
< Connection: keep-alive
< Last-Modified: Thu, 28 Dec 2023 11:40:11 GMT
< ETag: "177-60d9060d1dced"
< Content-Security-Policy-Report-Only: default-src http://somafm.com https://somafm.com http://*.somafm.com https://*.somafm.com https://checkout.stripe.com blob:; style-src 'self' https://checkout.stripe.com 'unsafe-inline' ; img-src * https://* http://* data:; font-src 'self' data:; script-src 'self' http://somafm.com https://somafm.com http://*.somafm.com https://*.somafm.com https://js.stripe.com https://checkout.stripe.com blob: 'unsafe-eval' 'unsafe-inline' ; frame-src 'self' https://js.stripe.com https://hooks.stripe.com https://checkout.stripe.com https://*.soundcloud.com/ http://www.youtube.com/embed/ https://www.youtube.com/embed/ ; media-src http://somafm.com https://somafm.com http://*.somafm.com https://*.somafm.com https://w.soundcloud.com https://api.soundcloud.com blob:; object-src 'self' http://*.somafm.com https://*.somafm.com blob:; connect-src http://somafm.com https://somafm.com http://*.somafm.com https://*.somafm.com https://checkout.stripe.com https://api.stripe.com
< X-Content-Type-Options: nosniff
< Access-Control-Allow-Headers: *
< Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS
< Feature-Policy: camera 'none'; magnetometer 'none'; gyroscope 'none';microphone 'none'; speaker 'self'
< X-Frame-Options: SAMEORIGIN
< Referrer-Policy: no-referrer-when-downgrade, strict-origin-when-cross-origin
< Expires: Thu, 28 Dec 2023 11:40:40 GMT
< Cache-Control: max-age=20
< X-Proxy-Cache: MISS
< Access-Control-Allow-Origin: *
< X-SomaVersion: 202110181757
< Accept-Ranges: bytes
<
#EXTM3U
#EXTINF:-1,SomaFM - The Dark Zone
http://ice2.somafm.com/darkzone-64-aac
#EXTINF:-1,SomaFM - The Dark Zone
http://ice1.somafm.com/darkzone-64-aac
#EXTINF:-1,SomaFM - The Dark Zone
http://ice4.somafm.com/darkzone-64-aac
#EXTINF:-1,SomaFM - The Dark Zone
http://ice6.somafm.com/darkzone-64-aac
#EXTINF:-1,SomaFM - The Dark Zone
http://ice5.somafm.com/darkzone-64-aac
* Connection #0 to host somafm.com left intact
The bug/issue: if I *don't* use a file-based playlist, i.e. I manually choose File -> Add location -> https://somafm.com/m3u/darkzone64.m3u then things play fine (obviously all 5 server endpoints show up in the playlist).
How I was using this originally: having URLs in a file-based playlist, and letting fb2k read the actual M3U playlist (from the initial URL) and let fb2k use whatever server gets returned first. In other words: in the above example, fb2k would fetch https://somafm.com/m3u/darkzone64.m3u for the "actual" playlist, then pick a server/endpoint from that list (I assume the first one).
Why I do it this way: it ensures if SomaFM (Internet radio/streaming provider) changes their playlist (add/remove servers), that fb2k always has an accurate list. If I was to simply save the M3U from the server in a local file, if they added/removed servers I'd never know.
Workaround: change the file-based playlist to contain the direct streaming servers themselves. This is annoying/silly (see above):
#
http://ice2.somafm.com/darkzone-64-aac
http://ice2.somafm.com/deepspaceone-64-aac