Fix RSS content-type

pull/592/head
Omar Roth 6 years ago
parent 0b1c57b39f
commit 801dffd571
No known key found for this signature in database
GPG Key ID: B8254FB7EC3D37F2

@ -2439,7 +2439,7 @@ end
get "/feed/channel/:ucid" do |env| get "/feed/channel/:ucid" do |env|
locale = LOCALES[env.get("preferences").as(Preferences).locale]? locale = LOCALES[env.get("preferences").as(Preferences).locale]?
env.response.content_type = "text/xml; charset=UTF-8" env.response.content_type = "application/atom+xml"
ucid = env.params.url["ucid"] ucid = env.params.url["ucid"]
@ -2513,7 +2513,7 @@ end
get "/feed/private" do |env| get "/feed/private" do |env|
locale = LOCALES[env.get("preferences").as(Preferences).locale]? locale = LOCALES[env.get("preferences").as(Preferences).locale]?
env.response.content_type = "text/xml; charset=UTF-8" env.response.content_type = "application/atom+xml"
token = env.params.query["token"]? token = env.params.query["token"]?
@ -2557,7 +2557,7 @@ end
get "/feed/playlist/:plid" do |env| get "/feed/playlist/:plid" do |env|
locale = LOCALES[env.get("preferences").as(Preferences).locale]? locale = LOCALES[env.get("preferences").as(Preferences).locale]?
env.response.content_type = "text/xml; charset=UTF-8" env.response.content_type = "application/atom+xml"
plid = env.params.url["plid"] plid = env.params.url["plid"]

@ -332,7 +332,7 @@ def subscribe_pubsub(topic, key, config)
case topic case topic
when .match(/^UC[A-Za-z0-9_-]{22}$/) when .match(/^UC[A-Za-z0-9_-]{22}$/)
topic = "channel_id=#{topic}" topic = "channel_id=#{topic}"
when .match(/^(?:PL|LL|EC|UU|FL|UL|OLAK5uy_)[0-9A-Za-z-_]{10,}$/) when .match(/^(PL|LL|EC|UU|FL|UL|OLAK5uy_)[0-9A-Za-z-_]{10,}$/)
# There's a couple missing from the above regex, namely TL and RD, which # There's a couple missing from the above regex, namely TL and RD, which
# don't have feeds # don't have feeds
topic = "playlist_id=#{topic}" topic = "playlist_id=#{topic}"

Loading…
Cancel
Save