Skip to content

Conversation

@cavis
Copy link
Member

@cavis cavis commented Nov 25, 2025

Starting on the UI to configure a live stream recording:

image

This will end up written to a config file at s3://prx-feed/streams.json, containing something like:

[
  {
    "id": 1,
    "podcast_id": 284,
    "job_id": "284/1/:date/:hour",
    "url": "http://backbonenetworks.streamguys.com/remixxm.mp3",
    "start_date": "2025-12-17",
    "end_date": null,
    "record_days": null,
    "record_hours": [13, 19, 22],
    "callback": "https://sqs.us-east-1.amazonaws.com/123456/ryan_feeder_fixer_callback"
  }
]

Open to suggestions on the format/contents of that JSON. Figuring out what's enough for the orchestration layer to make hourly recordings, and callback them to Feeder SQS.

@cavis cavis self-assigned this Nov 25, 2025
label = I18n.t("helpers.label.stream_recording.record_all_days")
all = [label, "", {selected: val.blank?, data: {mandatory: true}}]
opts = StreamRecording::ALL_DAYS.map { |d| [I18n.t("date.day_names")[d % 7], d] }
options_for_select(opts.prepend(all), val)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Working around some slim-select-y limitations here. Made the Every Day option an empty string, and mark it as mandatory, so you can't remove it.

But the "exclusive" code in the stimulus controller will remove it if you select Wednesday or something.


export default class extends Controller {
static values = { groupSelect: Boolean, exclusive: Array }
static values = { exclusive: Array }
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Upgraded to slim select V3 to fix some pre-existing bugs with the "exclusive" value. (Only used on the episode planner, when you select "every other week" vs "week 1" etc).

Had to make a few changes here to get everything working again.

bucket: s3_bucket,
cache_control: "max-age=60",
content_type: "application/json",
key: S3_KEY
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hopefully okay to just make this file public? Nothing secret in there.

record_days: s.record_days,
record_hours: s.record_hours,
callback: PorterUtils.callback_sqs
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Open to feedback on what this config is.

@cavis cavis marked this pull request as ready for review December 1, 2025 21:26
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cavis created a new Sass file for slim-select styles

--ss-bg-color: #{$white};
--ss-font-color: #{$gray-700};
--ss-border-color: #{$border-color};
--ss-border-radius: #{$border-radius};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here lie the Slim Select overrides, allowed me to remove a few lines from the old form.scss file

// overrides Slim Select v3 component styles
--ss-bg-color: #{$navy-900};
--ss-font-color: #{$white};
--ss-border-color: #{$border-color-dark};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dark mode overrides are now much simpler with these.

.ss-option.ss-highlighted,
.ss-option:not(.ss-disabled).ss-selected {
--ss-bg-color: #{$white};
color: var(--ss-bg-color);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Except this. WHY!?!

Might be worth a gripe to the maintainer.

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.

3 participants