mirror of
https://github.com/meeb/tubesync.git
synced 2025-06-23 21:46:44 +00:00
Fixes for ruff check
in models/media.py
This commit is contained in:
parent
565fe79183
commit
6f8bc52c0a
@ -17,7 +17,6 @@ from common.logger import log
|
|||||||
from common.errors import NoFormatException
|
from common.errors import NoFormatException
|
||||||
from common.utils import (
|
from common.utils import (
|
||||||
clean_filename, clean_emoji,
|
clean_filename, clean_emoji,
|
||||||
django_queryset_generator as qs_gen,
|
|
||||||
)
|
)
|
||||||
from ..youtube import (
|
from ..youtube import (
|
||||||
get_media_info as get_youtube_media_info,
|
get_media_info as get_youtube_media_info,
|
||||||
@ -688,7 +687,7 @@ class Media(models.Model):
|
|||||||
pass
|
pass
|
||||||
setattr(self, '_cached_metadata_dict', data)
|
setattr(self, '_cached_metadata_dict', data)
|
||||||
return data
|
return data
|
||||||
except Exception as e:
|
except Exception:
|
||||||
return {}
|
return {}
|
||||||
|
|
||||||
|
|
||||||
@ -1219,7 +1218,7 @@ class Media(models.Model):
|
|||||||
parent_dir.rmdir()
|
parent_dir.rmdir()
|
||||||
log.info(f'Removed empty directory: {parent_dir!s}')
|
log.info(f'Removed empty directory: {parent_dir!s}')
|
||||||
parent_dir = parent_dir.parent
|
parent_dir = parent_dir.parent
|
||||||
except OSError as e:
|
except OSError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user