Log these objects using their str instead of .id.
This commit is contained in:
parent
8821491ff3
commit
6370e36c84
2 changed files with 5 additions and 5 deletions
|
@ -151,7 +151,7 @@ class Channel(ObjectBase):
|
|||
|
||||
@worms.transaction
|
||||
def refresh(self, *, force=False, rss_assisted=True):
|
||||
log.info('Refreshing %s.', self.id)
|
||||
log.info('Refreshing %s.', self)
|
||||
|
||||
if force or (not self.uploads_playlist):
|
||||
self.reset_uploads_playlist_id()
|
||||
|
@ -270,7 +270,7 @@ class Channel(ObjectBase):
|
|||
|
||||
@worms.transaction
|
||||
def set_uploads_playlist_id(self, playlist_id):
|
||||
log.debug('Setting %s upload playlist to %s.', self.id, playlist_id)
|
||||
log.debug('Setting %s upload playlist to %s.', self, playlist_id)
|
||||
if not isinstance(playlist_id, str):
|
||||
raise TypeError(f'Playlist id must be a string, not {type(playlist_id)}.')
|
||||
|
||||
|
|
|
@ -186,7 +186,7 @@ class YCDLDBVideoMixin:
|
|||
raise TypeError(video)
|
||||
|
||||
if video.state != 'pending' and not force:
|
||||
log.debug('%s does not need to be downloaded.', video.id)
|
||||
log.debug('%s does not need to be downloaded.', video)
|
||||
return
|
||||
|
||||
try:
|
||||
|
@ -331,10 +331,10 @@ class YCDLDBVideoMixin:
|
|||
}
|
||||
|
||||
if existing:
|
||||
log.loud('Updating Video %s.', video.id)
|
||||
log.loud('Updating Video %s.', video)
|
||||
self.update(table='videos', pairs=data, where_key='id')
|
||||
else:
|
||||
log.loud('Inserting Video %s.', video.id)
|
||||
log.loud('Inserting Video %s.', video)
|
||||
self.insert(table='videos', data=data)
|
||||
|
||||
# Override the cached copy with the new copy so that the cache contains
|
||||
|
|
Loading…
Reference in a new issue