Skip to content

Conversation

@oskarrough
Copy link
Contributor

Closes #28

@oskarrough oskarrough requested a review from 4www December 1, 2025 10:15
@oskarrough oskarrough self-assigned this Dec 1, 2025
@supabase
Copy link

supabase bot commented Dec 1, 2025

Updates to Preview Branch (random-channel-view) ↗︎

Deployments Status Updated
Database Mon, 01 Dec 2025 10:19:30 UTC
Services Mon, 01 Dec 2025 10:19:30 UTC
APIs Mon, 01 Dec 2025 10:19:30 UTC

Tasks are run on every commit but only new migration files are pushed.
Close and reopen this PR if you want to apply changes from existing seed or migration files.

Tasks Status Updated
Configurations Mon, 01 Dec 2025 10:19:41 UTC
Migrations Mon, 01 Dec 2025 10:19:51 UTC
Seeding Mon, 01 Dec 2025 10:19:52 UTC
Edge Functions Mon, 01 Dec 2025 10:19:54 UTC

View logs for this Workflow Run ↗︎.
Learn more about Supabase for Git ↗︎.

@4www
Copy link
Contributor

4www commented Dec 1, 2025

Nice nice !
What about make some sort of filter for channels with > X tracks?
So we can use this feature to display random channels on the non-logged-in homepage ala r4 v1? https://v1.radio4000.com/

@oskarrough
Copy link
Contributor Author

Yes, so since it's a view it works just like any other table and can be queried via SQL, Postgrest API or the SDK.

Copy paste this into the browser console on https://sdk.radio4000.com

(await sdk.supabase.from('random_channels_with_tracks').select('').gt('track_count', 5).limit(2))
  .data.map(channel => `${channel.name}.${channel.track_count}`)

@oskarrough oskarrough marked this pull request as ready for review December 2, 2025 09:06
@4www
Copy link
Contributor

4www commented Dec 2, 2025

excellent! magnifico

@oskarrough oskarrough merged commit 4e8fc38 into main Dec 2, 2025
1 check passed
@oskarrough oskarrough deleted the random-channel-view branch December 13, 2025 10:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

create virtual table to get random channels (postgresql rand())

3 participants