mirror of
https://github.com/fergalmoran/picard.git
synced 2026-02-20 06:34:05 +00:00
Introduce ImageList.copy()
- imagelist[:] returns a list, not an ImageList - it returns an instance of ImageList
This commit is contained in:
@@ -275,7 +275,7 @@ class Metadata(MutableMapping):
|
||||
del self[tag]
|
||||
|
||||
if other.images:
|
||||
self.images = other.images[:]
|
||||
self.images = other.images.copy()
|
||||
if other.length:
|
||||
self.length = other.length
|
||||
|
||||
|
||||
@@ -51,6 +51,9 @@ class ImageList(MutableSequence):
|
||||
def __eq__(self, other):
|
||||
return self._sorted() == other._sorted()
|
||||
|
||||
def copy(self):
|
||||
return self.__class__(self._images)
|
||||
|
||||
def get_front_image(self):
|
||||
for img in self:
|
||||
if img.is_front_image():
|
||||
|
||||
Reference in New Issue
Block a user