mirror of
https://github.com/stashapp/stash.git
synced 2025-12-18 04:44:37 +03:00
Adds ability to configure sort order for DLNA videos (#3645)
This commit is contained in:
@@ -444,10 +444,15 @@ func (me *contentDirectoryService) getVideos(sceneFilter *models.SceneFilterType
|
||||
var objs []interface{}
|
||||
|
||||
if err := txn.WithReadTxn(context.TODO(), me.txnManager, func(ctx context.Context) error {
|
||||
sort := "title"
|
||||
sort := me.VideoSortOrder
|
||||
direction := models.SortDirectionEnumDesc
|
||||
if sort == "title" {
|
||||
direction = models.SortDirectionEnumAsc
|
||||
}
|
||||
findFilter := &models.FindFilterType{
|
||||
PerPage: &pageSize,
|
||||
Sort: &sort,
|
||||
PerPage: &pageSize,
|
||||
Sort: &sort,
|
||||
Direction: &direction,
|
||||
}
|
||||
|
||||
scenes, total, err := scene.QueryWithCount(ctx, me.repository.SceneFinder, sceneFilter, findFilter)
|
||||
|
||||
Reference in New Issue
Block a user