Update in db exist checker
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import mimetypes
|
||||
import os
|
||||
from typing import Tuple, Optional
|
||||
from typing import Optional
|
||||
|
||||
|
||||
class ListGenerator:
|
||||
@@ -36,10 +36,10 @@ class ListGenerator:
|
||||
|
||||
|
||||
class _FileAttrs:
|
||||
def __init__(self, name, path, type, exc):
|
||||
def __init__(self, name, path, _type, exc):
|
||||
self.name = name
|
||||
self.path = path
|
||||
self.mimetype = type
|
||||
self.mimetype = _type
|
||||
self.exc = exc
|
||||
|
||||
def __str__(self):
|
||||
@@ -63,7 +63,7 @@ class _ListGenerationIter:
|
||||
return self
|
||||
|
||||
@property
|
||||
def type(self) -> tuple[Optional[str], Optional[str]]:
|
||||
def _type(self) -> Optional[str]:
|
||||
guess = mimetypes.guess_type(f'{self._path}/{self._list[self._current_index]}')[0]
|
||||
return guess
|
||||
|
||||
|
||||
Reference in New Issue
Block a user