Skip to content

Commit

Permalink
[eListboxPythonServiceContent]
Browse files Browse the repository at this point in the history
* add isFolder flag to setBuildArgs
  • Loading branch information
jbleyel committed Dec 6, 2023
1 parent 43f915d commit ce527b6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/service/elistboxservicecontent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -567,8 +567,9 @@ bool eListboxPythonServiceContent::getIsMarked(int selected)
void eListboxPythonServiceContent::setBuildArgs(int selected)
{
eServiceReference &ref = *m_service_cursor;
bool isFolder = ref.flags & eServiceReference::isDirectory;
bool isMarker = ref.flags & eServiceReference::isMarker;
bool isPlayable = !(ref.flags & eServiceReference::isDirectory || isMarker);
bool isPlayable = !(isFolder || isMarker);
bool isRecorded = m_record_indicator_mode && isPlayable && checkServiceIsRecorded(ref,pNavigation::RecordType(pNavigation::isRealRecording|pNavigation::isUnknownRecording));
bool isStreamed = m_record_indicator_mode && isPlayable && checkServiceIsRecorded(ref,pNavigation::isStreaming);
bool isPseudoRecorded = m_record_indicator_mode && isPlayable && checkServiceIsRecorded(ref,pNavigation::isPseudoRecording);
Expand All @@ -582,8 +583,9 @@ void eListboxPythonServiceContent::setBuildArgs(int selected)
// 16 isRecorded
// 32 isStreamed
// 64 isPseudoRecorded
// 128 isFolder

int status = (selected << 0) + (marked << 1) + (isMarker << 2) + (isPlayable << 3) + (isRecorded << 4) + (isStreamed << 5) + (isPseudoRecorded << 6);
int status = (selected << 0) + (marked << 1) + (isMarker << 2) + (isPlayable << 3) + (isRecorded << 4) + (isStreamed << 5) + (isPseudoRecorded << 6) + (isFolder << 7);

m_pArgs = PyTuple_New(2);
PyTuple_SET_ITEM(m_pArgs, 0, NEW_eServiceReference(ref));
Expand Down

0 comments on commit ce527b6

Please sign in to comment.