Skip to content

Commit

Permalink
Minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
geirawsm committed Jan 9, 2024
1 parent dc68875 commit a9dddac
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
5 changes: 4 additions & 1 deletion sausage_bot/cogs/youtube.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,10 @@ async def process_links_for_posting_or_editing(
async def post_videos():
log.log('Starting `post_videos`')
# Make sure that the feed links aren't stale / 404
await feeds_core.review_feeds_status('youtube')
review_feeds = await feeds_core.review_feeds_status('youtube')
if review_feeds in [None, False]:
log.log('No videos to post')
return
# Start processing feeds
feeds = await db_helper.get_output(
template_info=envs.youtube_db_schema,
Expand Down
1 change: 1 addition & 0 deletions sausage_bot/util/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ def config():
BOT_ID = env('BOT_ID')
except EnvError:
print('You need to set `BOT_ID` in .env for this to work')
sys.exit()


try:
Expand Down
3 changes: 3 additions & 0 deletions sausage_bot/util/feeds_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,9 @@ async def review_feeds_status(feed_type: str = None):
),
order_by=[('feed_name', 'DESC')]
)
if feeds_status_db_in is None:
log.log('No feeds to review')
return None
db_updates = {}
for feed in feeds_status_db_in:
log.debug('Got this feed: ', pretty=feed)
Expand Down

0 comments on commit a9dddac

Please sign in to comment.