playlist/registry: remove duplicate function ExtractMimeTypeMainPart()
This is the same as GetMimeTypeBase(), which has already been applied.
This commit is contained in:
@@ -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>
|
||||||
|
Reference in New Issue
Block a user