Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Neto committed May 20, 2024
1 parent 316d3d2 commit 9cde1f8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
13 changes: 11 additions & 2 deletions objects/playlist.php
Original file line number Diff line number Diff line change
Expand Up @@ -487,6 +487,15 @@ public static function getVideosIndexFromPlaylistLight($playlists_id, $videos_id
return 0;
}

private static function getOrderBy($prefix=''){
$order = " ORDER BY {$prefix}`order` ASC, id ASC";

//if add in the top
//$order = " ORDER BY {$prefix}`order` ASC, id DESC";

return $order;
}

public static function getVideosIDFromPlaylistLight($playlists_id)
{
global $global, $getVideosIDFromPlaylistLight;
Expand All @@ -504,7 +513,7 @@ public static function getVideosIDFromPlaylistLight($playlists_id)
$formats = 's';
$values = [Video::$statusActive];
} else {
$sql = "SELECT * FROM playlists_has_videos p WHERE playlists_id = ? ORDER BY `order` ASC ";
$sql = "SELECT * FROM playlists_has_videos p WHERE playlists_id = ? ".self::getOrderBy('p.');
$formats = 'i';
$values = [$playlists_id];
}
Expand Down Expand Up @@ -716,7 +725,7 @@ public static function getAllSubPlayLists($playlists_id, $NOTSubPlaylists = 0)
$sql .= ' AND serie_playlists_id IS NOT NULL ';
}

$sql .= ' ORDER BY p.`order` ASC ';
$sql .= self::getOrderBy('p.');

$res = sqlDAL::readSql($sql, "i", [$playlists_id]);
$fullData = sqlDAL::fetchAllAssoc($res);
Expand Down
1 change: 0 additions & 1 deletion view/js/videojs-youtube
Submodule videojs-youtube deleted from 050c1e

0 comments on commit 9cde1f8

Please sign in to comment.