You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: paging.go
    path of file: ./repos/stash/internal/dlna
    
    the code of the file until where you have to start completion: package dlna

import (
	"context"
	"fmt"
	"math"
	"strconv"

	"github.com/stashapp/stash/pkg/models"
	"github.com/stashapp/stash/pkg/scene"
)

type scenePager struct {
	sceneFilter *models.SceneFilterType
	parentID    string
}

func (p *scenePager) getPageID(page int) string {
	return p.parentID + "/page/" + strconv.Itoa(page)
}

func (p *scenePager) getPages(ctx context.Context, r models.SceneQueryer, total int) ([]interface{}, error) {
	var objs []interface{}

	// get the first scene of each page to set an appropriate title
	pages := int(m
    
func (p *scenePager) getPageVideos(ctx context.Context, r SceneFinder, f models.FileGetter, page int, host string, sort string, direction models.SortDirectionEnum) ([]interface{}, error) {
	var objs []interface{}

	findFilter := &models.FindFilterType{
		PerPage:   &pageSize,
		Page:      &page,
		Sort:      &sort,
		Direction: &direction,
	}

	scenes, err := scene.Query(ctx, r, p.sceneFilter, findFilter)
	if err != nil {
		return nil, err
	}

	for _, s := range scenes {
		if err := s.LoadPrimaryFile(ctx, f); err != nil {
			return nil, err
		}

		objs = append(objs, sceneToContainer(s, p.parentID, host))
	}

	return objs, nil
}