Skip to content

Commit

Permalink
service api GetVideoList: Fix bug
Browse files Browse the repository at this point in the history
Bug in code to cater for directories starting with slash.
  • Loading branch information
bennettpeter committed Nov 9, 2023
1 parent 5820460 commit caa7993
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions mythtv/programs/mythbackend/servicesv2/v2video.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,8 @@ V2VideoMetadataInfoList* V2Video::GetVideoList( const QString &Folder,
sql.append(sort);
if (partList.length() > 1 && partList[1].compare("DESC",Qt::CaseInsensitive) == 0)
sql.append(" DESC");
else if (partList.length() > 1 && partList[1].compare("ASC",Qt::CaseInsensitive) == 0)
sql.append(" ASC");
else
sql.append(defSeq);
next = true;
Expand Down Expand Up @@ -339,8 +341,8 @@ V2VideoMetadataInfoList* V2Video::GetVideoList( const QString &Folder,
if (CollapseSubDirs)
{
QString fnPart = metadata->GetFilename().mid(folderlen);
int slashPos = fnPart.indexOf('/');
if (slashPos > 0)
int slashPos = fnPart.indexOf('/',1);
if (slashPos >= 0)
continue;
}

Expand Down

0 comments on commit caa7993

Please sign in to comment.