-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix stream playlists as directory #14284
Fix stream playlists as directory #14284
Conversation
This patch does not change much but requires the indentation of a block of code. That is why it looks as if much was changed. The first commit holds the changes in code. The second is only cosmetic. As a drawback: This solution still tries to expand the playlists as a directory. |
@@ -435,39 +435,43 @@ static int PlayMedia(const std::vector<std::string>& params) | |||
std::string extensions = CServiceBroker::GetFileExtensionProvider().GetVideoExtensions() + "|" + CServiceBroker::GetFileExtensionProvider().GetMusicExtensions(); | |||
XFILE::CDirectory::GetDirectory(item.GetPath(), items, extensions, XFILE::DIR_FLAG_DEFAULTS); | |||
|
|||
bool containsMusic = false, containsVideo = false; | |||
for (int i = 0; i < items.Size(); i++) | |||
if (items.Size() != 0) // fall through on non expandable playlist |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
wanna take a stab at removing the historic error that strm files are playlists? |
oh, and please squash the fix commit into the first one. |
CFileItemList use IsEmpty instead of Size==0
squashed and rebased. |
Nonetheless, this fix is still needed because m3u playlists can be lists of streams too. The strm problem should be a different pull-request. |
Absolutely, i have already approved this.. |
strm files can be anything, including playlists, i.e. a strm file can contain a m3u URL |
As I could not find any definition of what a strm file may or may not contain, they sure can be what ever they want :-) |
you are right, the strm by its own can never be a playlist. sorry for the noise |
Description
Workaround for broken STRM playback from favorites after #14183
Motivation and Context
Patch #14183 introduced a regression, preventing playlists with streams from being played correctly.
This fixes the problem.,
How Has This Been Tested?
Ubuntu 18.04, self built master. Tested playback of local playlist and playlist with stream.
Types of change
Checklist: