Add custom source input for manually adding communities
- Add 'Custom Source' text input field to polling form - Allows manual entry of subreddits (r/subreddit) or RSS URLs - Custom input overrides dropdown selection if filled - Dropdown becomes optional when custom source is entered - Backend prioritizes custom_source_id over dropdown source_id 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
5
app.py
5
app.py
@@ -1347,9 +1347,14 @@ def admin_polling_add():
|
||||
|
||||
platform = request.form.get('platform')
|
||||
source_id = request.form.get('source_id')
|
||||
custom_source_id = request.form.get('custom_source_id')
|
||||
display_name = request.form.get('display_name')
|
||||
poll_interval = int(request.form.get('poll_interval', 60))
|
||||
|
||||
# Use custom source if provided, otherwise use dropdown
|
||||
if custom_source_id and custom_source_id.strip():
|
||||
source_id = custom_source_id.strip()
|
||||
|
||||
if not platform or not source_id or not display_name:
|
||||
flash('Missing required fields', 'error')
|
||||
return redirect(url_for('admin_polling'))
|
||||
|
||||
Reference in New Issue
Block a user