TheWicklowWolf / LidaTube

Find and download missing Lidarr albums via yt-dlp.
GNU General Public License v3.0
96 stars 8 forks source link

Lidarr API sortKey does not work with external Postgres backend #11

Closed ionfury closed 7 months ago

ionfury commented 7 months ago

Reference Issue in lidar

Trying out lidarr requests:

curl --location 'https://{lidarr}/api/v1/wanted/missing?includeArtist=true&apikey={key}&sortKey=artists.sortname&sortDirection=ascending'

Exception data:\n    Severity: ERROR\n    SqlState: 42703\n    MessageText: column \"Sortname\" does not exist\n    Hint: Perhaps you meant to reference the column \"Artists.SortName\".\n    Position: 536\n    File: parse_relation.c\n    Line: 3656\n    Routine: errorMissingColumn"

curl --location 'https://{lidarr}/api/v1/wanted/missing?includeArtist=true&apikey={key}&sortKey=artists.sortName&sortDirection=ascending'

Exception data:\n    Severity: ERROR\n    SqlState: 42803\n    MessageText: column \"Artists.SortName\" must appear in the GROUP BY clause or be used in an aggregate function\n    Position: 536\n    File: parse_agg.c\n    Line: 1433\n    Routine: check_ungrouped_columns_walker"

Would it be possible to disable sorting until the above lidarr issue is resolved?

TheWicklowWolf commented 7 months ago

Only Lidarr standard form is supported, you'll have to fork it to suit.

TheWicklowWolf commented 7 months ago

I've removed sortKey and sortDirection as the sorting is now done after the API call. So this should resolve your issue.

TheWicklowWolf commented 7 months ago

closed in b21c9e16ecb717c82e2fba4476ce579ebb2b4fc0

ionfury commented 7 months ago

Great, thanks!