This issue respects the following points:
Description of the bug
A filler list cannot be deleted after it has previously been used for playback, even when it is no longer assigned to any channel.
Deleting the filler list through Library → Filler Lists produces a generic error in the web UI. The useful error is only visible in the container logs:
/api/filler-lists/:id
SqliteError: FOREIGN KEY constraint failed
code: SQLITE_CONSTRAINT_FOREIGNKEY
at Yg.deleteFiller
Database inspection shows that the filler list is no longer present in channel_filler_show, but it is still referenced by historical rows in program_play_history.filler_list_id.
The relevant foreign key is defined with ON DELETE NO ACTION:
FOREIGN KEY (`filler_list_id`)
REFERENCES `filler_show`(`uuid`)
ON UPDATE no action
ON DELETE no action
In this case, 28 playback-history rows referenced the filler list. That historical reference prevented the filler-list record from being deleted.
This appears to be a schema or deletion-transaction issue: deleteFiller does not clear or otherwise handle existing program_play_history.filler_list_id references before deleting the filler list.
Additional database evidence
The filler list had no current channel assignments:
SELECT c.name
FROM channel_filler_show cf
JOIN channel c ON c.uuid = cf.channel_uuid
WHERE cf.filler_show_uuid = '<filler-list-uuid>';
Result:
However, it still had playback-history references:
SELECT COUNT(*)
FROM program_play_history
WHERE filler_list_id = '<filler-list-uuid>';
Result:
Running PRAGMA foreign_key_check; before the attempted deletion returned no existing violations. The failure is caused specifically by the attempted deletion.
No manual database repair was performed.
Reproduction steps
- Create a filler list containing one or more programs.
- Assign the filler list to a channel.
- Play the channel long enough for Tunarr to record filler playback in
program_play_history.
- Remove the filler list from the channel.
- Confirm that the filler list is no longer referenced by
channel_filler_show.
- Navigate to Library → Filler Lists.
- Attempt to delete the previously used filler list.
- Confirm the deletion in the dialog.
What is the current bug behavior?
The UI displays a generic deletion error and the filler list remains present.
The backend logs report:
SqliteError: FOREIGN KEY constraint failed
code: SQLITE_CONSTRAINT_FOREIGNKEY
The deletion is blocked because program_play_history.filler_list_id still references the filler list, despite the list no longer being assigned to any channel.
What is the expected correct behavior?
A filler list that is no longer assigned to a channel should be deletable.
Tunarr could handle the historical references in one of these ways:
- Set
program_play_history.filler_list_id to NULL when the filler list is deleted, preserving the rest of the playback-history record.
- Define this relationship using
ON DELETE SET NULL.
- Explicitly clear the historical filler-list references inside the
deleteFiller transaction.
The first or second option would preserve playback history while allowing removal of the filler list.
The UI should also display the underlying constraint error, or explain why deletion is blocked, instead of showing only a generic error.
Tunarr version
Latest
FFMPEG encoder type
Software
Specify full Edge version id
No response
Specify Alpha release number
No response
Specify version number
1.3.13
What browser did you experience the the problem on? Please provide if the issue is related to the Web UI and definitely not the server.
No response
Deployment Type
Docker
What operating system are you using?
macOS Tahoe 26.5.1 (25F80)
Full server logs
### Full relevant server logs
[error]: /api/filler-lists/:id
err: {
"type": "SqliteError",
"message": "FOREIGN KEY constraint failed",
"stack":
SqliteError: FOREIGN KEY constraint failed
at PDe.run (/snapshot/dist/bundle.cjs:1275:12408)
at QueryPromise.run (/snapshot/dist/bundle.cjs:928:106062)
at Function.<anonymous> (/snapshot/dist/bundle.cjs:1350:7101)
at Function.sqliteTransaction (/snapshot/dist/bundle.cjs:57:3087)
at Hte.transaction (/snapshot/dist/bundle.cjs:1275:11659)
at ODe.transaction (/snapshot/dist/bundle.cjs:940:18223)
at Yg.deleteFiller (/snapshot/dist/bundle.cjs:1350:6277)
at Object.<anonymous> (/snapshot/dist/bundle.cjs:1397:106802)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
"code": "SQLITE_CONSTRAINT_FOREIGNKEY"
}
[error]: {"url":"/api/filler-lists/:id"}
error: {
"code": "SQLITE_CONSTRAINT_FOREIGNKEY"
}
This issue respects the following points:
Description of the bug
A filler list cannot be deleted after it has previously been used for playback, even when it is no longer assigned to any channel.
Deleting the filler list through Library → Filler Lists produces a generic error in the web UI. The useful error is only visible in the container logs:
Database inspection shows that the filler list is no longer present in
channel_filler_show, but it is still referenced by historical rows inprogram_play_history.filler_list_id.The relevant foreign key is defined with
ON DELETE NO ACTION:In this case, 28 playback-history rows referenced the filler list. That historical reference prevented the filler-list record from being deleted.
This appears to be a schema or deletion-transaction issue:
deleteFillerdoes not clear or otherwise handle existingprogram_play_history.filler_list_idreferences before deleting the filler list.Additional database evidence
The filler list had no current channel assignments:
Result:
However, it still had playback-history references:
Result:
Running
PRAGMA foreign_key_check;before the attempted deletion returned no existing violations. The failure is caused specifically by the attempted deletion.No manual database repair was performed.
Reproduction steps
program_play_history.channel_filler_show.What is the current bug behavior?
The UI displays a generic deletion error and the filler list remains present.
The backend logs report:
The deletion is blocked because
program_play_history.filler_list_idstill references the filler list, despite the list no longer being assigned to any channel.What is the expected correct behavior?
A filler list that is no longer assigned to a channel should be deletable.
Tunarr could handle the historical references in one of these ways:
program_play_history.filler_list_idtoNULLwhen the filler list is deleted, preserving the rest of the playback-history record.ON DELETE SET NULL.deleteFillertransaction.The first or second option would preserve playback history while allowing removal of the filler list.
The UI should also display the underlying constraint error, or explain why deletion is blocked, instead of showing only a generic error.
Tunarr version
Latest
FFMPEG encoder type
Software
Specify full Edge version id
No response
Specify Alpha release number
No response
Specify version number
1.3.13
What browser did you experience the the problem on? Please provide if the issue is related to the Web UI and definitely not the server.
No response
Deployment Type
Docker
What operating system are you using?
macOS Tahoe 26.5.1 (25F80)
Full server logs