Commit graph

10 commits

Author SHA1 Message Date
Profpatsch
1b887b43da refactor(users/Profpatsch/whatcd-resolver): split table data fetch
Change-Id: Ic9b2f1e6a5ff0c65b93c1662bad75fb41c86bfcd
Reviewed-on: https://cl.tvl.fyi/c/depot/+/11759
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
Autosubmit: Profpatsch <mail@profpatsch.de>
2024-06-07 12:12:50 +00:00
Profpatsch
ea89572f98 fix(users/Profpatsch/whatcd-resolver): fix torrent link
The redacted URL needs the torrent group id to go to the album page,
not the torrent id.

Also open the external link in a separate tab.

Change-Id: Ie6d73cb02137855bb388859d2800968cd56ece49
Reviewed-on: https://cl.tvl.fyi/c/depot/+/11745
Reviewed-by: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
Autosubmit: Profpatsch <mail@profpatsch.de>
2024-06-03 14:55:13 +00:00
Profpatsch
8bb27c98b0 feat(users/Profpatsch/whatcd-resolver): add redacted torrent link
Change-Id: I9e2cd1935a67260cc7e4b72b247c01495e130949
Reviewed-on: https://cl.tvl.fyi/c/depot/+/11744
Autosubmit: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
2024-06-03 14:55:13 +00:00
Profpatsch
94ea6fd69e fix(users/Profpatsch/whatcd-resolver): db_id -> redacted_id
We’re using the redacted id, not the database id.
This is more stable.

Change-Id: I4d24e5bc6cc469d811cb1402a83157359576ef77
Reviewed-on: https://cl.tvl.fyi/c/depot/+/11683
Autosubmit: Profpatsch <mail@profpatsch.de>
Reviewed-by: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
2024-06-03 14:55:13 +00:00
Profpatsch
c5555f25da fix(users/Profpatsch/whatcd-resolver): speed up table query
This took a while to figure out, but essentially sorting a thing with
one million queries takes a long time, as compared to doing it on a
small subset of things and then joining against the final ordering.

The generated column helps, too.

Change-Id: I1bf283e2be060748eebda92576e3d062c51a6777
Reviewed-on: https://cl.tvl.fyi/c/depot/+/11681
Autosubmit: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
2024-06-03 14:55:13 +00:00
Profpatsch
b54ad3e580 feat(users/Profpatsch/whatcd-resolver): add artist albums
Simple artist album page that only shows albums the artist was
involved with.

Change-Id: Icff34afc6d1b39b6fb17765c1b3ea500dd4b4d95
Reviewed-on: https://cl.tvl.fyi/c/depot/+/11675
Tested-by: BuildkiteCI
Autosubmit: Profpatsch <mail@profpatsch.de>
Reviewed-by: Profpatsch <mail@profpatsch.de>
2024-06-03 14:55:13 +00:00
Profpatsch
c1598cd2d2 feat(users/Profpatsch/whatcd-resolver): display all artists
apparently the `torrent_group` json only contains one artist, while
the torrent itself contains a list of them.

This is important, because we need the artist id and the
`torrent_group` does not provide it, only the torrent one.

Change-Id: I3db45f454f14e89ea8c8dafba2065ecd55f5bcda
Reviewed-on: https://cl.tvl.fyi/c/depot/+/11670
Autosubmit: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
2024-06-03 14:55:13 +00:00
Profpatsch
a2d56cedaf feat(users/Profpatsch/whatcd-resolver): allow listing only download
When showing the best torrents table, we want to be able to filter for
“only downloaded”.

Change-Id: Ibfe9212f3d422d305f858fbef023ee985c1183d6
Reviewed-on: https://cl.tvl.fyi/c/depot/+/11650
Autosubmit: Profpatsch <mail@profpatsch.de>
Reviewed-by: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
2024-05-13 14:50:17 +00:00
Profpatsch
eeb5e7abd6 feat(users/Profpatsch/whatcd-resolver): trace http requests
Move the http calls into their own module, so we can trace the request
and provide a simple copy-to-replay command.

We have to work around a bug in the otel library, which would limit
our attribute value length to 128 bytes because it uses the wrong
option value.

~~~

`ifExists` is finally made more useful for dealing with optional
attributes in e.g. lists.

Change-Id: Iafab523e9ec4b00136db43f31fdc12aeefb7f77c
Reviewed-on: https://cl.tvl.fyi/c/depot/+/11241
Tested-by: BuildkiteCI
Autosubmit: Profpatsch <mail@profpatsch.de>
Reviewed-by: Profpatsch <mail@profpatsch.de>
2024-03-23 19:51:59 +00:00
Profpatsch
c2856dc2cd chore(users/Profpatsch/whatcd-resolver): Transmission & Redacted
Move the functionality into two coarse modules.

There’s still the question about whether functions that change the
database tables should be in their own storage module, but let’s see
if it gets too confusing.

Change-Id: Ied1d47b353dd4597ffea35f111f440aad22e981d
Reviewed-on: https://cl.tvl.fyi/c/depot/+/11238
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
Autosubmit: Profpatsch <mail@profpatsch.de>
2024-03-23 05:27:30 +00:00