Not re-favoriting videos.

This commit is contained in:
Roland 2023-03-27 10:27:18 -06:00
parent b5a9e45806
commit 6883a4734a
No known key found for this signature in database
GPG key ID: 9D6DBD3ACF11AB93

View file

@ -466,8 +466,11 @@ def import_channels_config():
# Favorite in the config is the name of the video_path. Add the channel directory onto this
# video_path, so we can match the complete path for the Video.
video_path = channel_dir / video_path
file_group = FileGroup.find_by_path(video_path, session)
if file_group:
file_group: FileGroup = FileGroup.find_by_path(video_path, session)
if file_group.tag_files:
# Video is already tagged or favorited.
pass
elif file_group:
file_group.add_tag(favorites_tag, session)
else:
channel_import_logger.warning(f'Cannot find video to favorite: {video_path}')