docs: api comments say what the endpoints do, not how they came to be (#6277)
Rewrites the internal/api comment blocks to rule 32: task, milestone and rule ids gone, the stories behind them restated as the constraint they left, stale references corrected (the stream secret is wired from config, the timezone handler already refreshes the scheduler, the Android app is the native client, the design docs cited are not in the repo). Also rewraps comment lines over 80 columns left by the earlier batches. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -55,9 +55,9 @@ func yearFromDate(d pgtype.Date) int {
|
||||
return d.Time.Year()
|
||||
}
|
||||
|
||||
// durationMsToSec converts millisecond durations (as stored in tracks.duration_ms)
|
||||
// to seconds, rounding to nearest. Callers display seconds; sub-second precision
|
||||
// is not useful in UI.
|
||||
// durationMsToSec converts millisecond durations (as stored in
|
||||
// tracks.duration_ms) to seconds, rounding to nearest. Callers display seconds;
|
||||
// sub-second precision is not useful in UI.
|
||||
func durationMsToSec(ms int32) int {
|
||||
return int((ms + 500) / 1000)
|
||||
}
|
||||
@@ -79,7 +79,7 @@ func streamURL(trackID pgtype.UUID) string {
|
||||
// cast tokens. Sonos's URL probe gates duration detection on a recognizable
|
||||
// audio file extension; the bare `/stream` shape reports TrackDuration=0
|
||||
// and breaks seek/auto-advance. The bare /stream route stays mounted as an
|
||||
// alias for legacy / web / Subsonic clients. See task #610.
|
||||
// alias for web and Subsonic clients.
|
||||
func streamURLWithExt(trackID pgtype.UUID, ext string) string {
|
||||
return streamURL(trackID) + "." + ext
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user