Skip to content
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

Do not treat strm as playlist #13774

Closed
wants to merge 1 commit into from
Closed

Do not treat strm as playlist #13774

wants to merge 1 commit into from

Conversation

angelblue05
Copy link
Contributor

Description

Removed the .strm extension from being detected as a playlist. Also removed the workaround, which is no longer needed for strm to display the information dialog.

Motivation and Context

As discussed with FernetMenta. This change is to allow for strm to be treated the same as regular videos. Having strm being treated as a playlist breaks "play next automatically" since it clears the current playlist to play the dynamic path contained within. This rendered strm less useful when contained within a video library alongside regular videos.

Forum post: https://forum.kodi.tv/showthread.php?tid=329366&pid=2721587#pid2721587

How Has This Been Tested?

I compiled Kodi on windows x64 to test the changes.

Types of change

  • Bug fix (non-breaking change which fixes an issue)
  • Improvement (non-breaking change which improves existing functionality)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the Code guidelines of this project
  • My change requires a change to the documentation, either Doxygen or wiki
  • I have updated the documentation accordingly
  • I have read the CONTRIBUTING document
  • I have added tests to cover my change
  • All new and existing tests passed

@FernetMenta
Copy link
Contributor

strm files are still treated as m3u playlists, see CPlayListFactory::Create. This is required for expanding them.
I think we need to distinguish between strm files that result in just a single plyable item and real playlists. If we only have a single item, we have to keep the original item and put the playable URL as dynPath. If the original path is not kept, the item is not highlighted be the gui.

Can you point me the the locations of IsPlaylist in the code that cause trouble?

@angelblue05
Copy link
Contributor Author

angelblue05 commented Apr 16, 2018

No problem. Without these changes, playback ends after playing the strm file instead of moving to the next one. So IsPlaylist is being picked up somewhere and clears the playlist. If I had to guess, this would be where, but I can recompile with log lines if you wish, to confirm:

bool CGUIMediaWindow::OnPlayMedia(int iItem, const std::string &player)
{
// Reset Playlistplayer, playback started now does
// not use the playlistplayer.
CServiceBroker::GetPlaylistPlayer().Reset();
CServiceBroker::GetPlaylistPlayer().SetCurrentPlaylist(PLAYLIST_NONE);
CFileItemPtr pItem=m_vecItems->Get(iItem);
CLog::Log(LOGDEBUG, "%s %s", __FUNCTION__, CURL::GetRedacted(pItem->GetPath()).c_str());
bool bResult = false;
if (pItem->IsInternetStream() || pItem->IsPlayList())
bResult = g_application.PlayMedia(*pItem, player, m_guiState->GetPlaylist());
else
bResult = g_application.PlayFile(*pItem, player);
if (pItem->m_lStartOffset == STARTOFFSET_RESUME)
pItem->m_lStartOffset = 0;
return bResult;
}

Edit: I am compiling right now to make sure.

@angelblue05
Copy link
Contributor Author

@FernetMenta
Put a pin in it. What I linked above doesn't seem to be it. I'll dig some more tomorrow and let you know where the playlist is being cleared.

@FernetMenta
Copy link
Contributor

Instead of not treating strm files as playlists, it is better to remove the limitation of having nested playlists: #13777

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants