Commit 51e5b56b authored by Max Kellermann's avatar Max Kellermann

playlist/registry: remove duplicate function ExtractMimeTypeMainPart()

This is the same as GetMimeTypeBase(), which has already been applied.
parent bb07fd42
...@@ -215,23 +215,12 @@ playlist_list_open_stream_mime2(InputStreamPtr &&is, StringView mime) ...@@ -215,23 +215,12 @@ playlist_list_open_stream_mime2(InputStreamPtr &&is, StringView mime)
return nullptr; return nullptr;
} }
/**
* Extract the "main" part of a MIME type string, i.e. the portion
* before the semicolon (if one exists).
*/
gcc_pure
static StringView
ExtractMimeTypeMainPart(StringView s) noexcept
{
return s.Split(';').first;
}
static std::unique_ptr<SongEnumerator> static std::unique_ptr<SongEnumerator>
playlist_list_open_stream_mime(InputStreamPtr &&is, std::string_view full_mime) playlist_list_open_stream_mime(InputStreamPtr &&is, std::string_view mime)
{ {
/* probe only the portion before the semicolon*/ /* probe only the portion before the semicolon*/
return playlist_list_open_stream_mime2(std::move(is), return playlist_list_open_stream_mime2(std::move(is),
ExtractMimeTypeMainPart(full_mime)); mime);
} }
std::unique_ptr<SongEnumerator> std::unique_ptr<SongEnumerator>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment