diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index d9bdb34a..7ff67c3e 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -44,10 +44,13 @@ class ApplicationController < ActionController::Base def need_transcode?(song) song_format = song.format - return true if !browser.safari? && !song_format.in?(Stream::WEB_SUPPORTED_FORMATS) - # Non-Safari browsers don't support ALAC format. So we need to transcode it. - return true if !browser.safari? && song_format == "m4a" && song.lossless? - return true if browser.safari? && !song_format.in?(Stream::SAFARI_SUPPORTED_FORMATS) + unless native_app? + return true if !browser.safari? && !song_format.in?(Stream::WEB_SUPPORTED_FORMATS) + # Non-Safari browsers don't support ALAC format. So we need to transcode it. + return true if !browser.safari? && song_format == "m4a" && song.lossless? + return true if browser.safari? && !song_format.in?(Stream::SAFARI_SUPPORTED_FORMATS) + end + return true if ios_app? && !song_format.in?(Stream::IOS_SUPPORTED_FORMATS) return true if android_app? && !song_format.in?(Stream::ANDROID_SUPPORTED_FORMATS)