mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-11-23 00:16:19 -05:00
Not re-favoriting videos.
This commit is contained in:
parent
b5a9e45806
commit
6883a4734a
1 changed files with 5 additions and 2 deletions
|
|
@ -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}')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue