Skip to content

Commit

Permalink
bump max for albums to 20x20 (#128)
Browse files Browse the repository at this point in the history
  • Loading branch information
TheDen authored Aug 19, 2023
1 parent 20f3c99 commit 4978aea
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions internal/api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ type CollageRequest struct {
Period string `in:"query=period;default=7day" validate:"required,validatePeriod"`
Height uint `in:"query=height;default=0" validate:"gte=0,lte=3000"`
Width uint `in:"query=width;default=0" validate:"gte=0,lte=3000"`
Rows int `in:"query=rows;default=3" validate:"required,gte=1,lte=15"`
Rows int `in:"query=rows;default=3" validate:"required,gte=1,lte=20"`
FontSize int `in:"query=fontsize;default=12" validate:"gte=8,lte=30"`
Columns int `in:"query=columns;default=3" validate:"required,gte=1,lte=15"`
Columns int `in:"query=columns;default=3" validate:"required,gte=1,lte=20"`
DisplayAlbum bool `in:"query=album;default=false"`
DisplayTrack bool `in:"query=track;default=false"`
PlayCount bool `in:"query=playcount;default=false"`
Expand Down
2 changes: 1 addition & 1 deletion internal/collages/album.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ func (a *LastFMTopAlbums) GetTotalFetched() int {
}

func GenerateCollageForAlbum(ctx context.Context, username string, period constants.Period, count int, imageSize string, displayOptions generator.DisplayOptions) (*image.Image, *bytes.Buffer, error) {
if count > 225 {
if count > 400 {
return nil, nil, constants.ErrTooManyImages
}
albums, err := getAlbums(ctx, username, period, count, imageSize)
Expand Down
4 changes: 2 additions & 2 deletions ui/src/lib/Form.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,9 @@
showTrack = $data.method === 'track';
showAlbum = $data.method !== 'artist';
maxRows =
$data.method === 'track' ? 5 : $data.method === 'artist' ? 10 : 15;
$data.method === 'track' ? 5 : $data.method === 'artist' ? 10 : 20;
maxColumns =
$data.method === 'track' ? 5 : $data.method === 'artist' ? 10 : 15;
$data.method === 'track' ? 5 : $data.method === 'artist' ? 10 : 20;
if ($isSubmitting && !$isValid) {
window.location.href = '#top';
}
Expand Down

0 comments on commit 4978aea

Please sign in to comment.