26 lines
699 B
Python
26 lines
699 B
Python
class MediaFile:
|
|
|
|
def __init__(self,filename,format,path):
|
|
self.filename = filename
|
|
self.format = format
|
|
self.path = path
|
|
|
|
def __str__(self):
|
|
return f"filename:{self.filename} ,Format:{self.format}, Path Name:{self.path}"
|
|
|
|
def __eq__(self,other):
|
|
if self.filename == other.filename and self.path == other.path:
|
|
return True
|
|
else:
|
|
return False
|
|
class VideoFile(MediaFile):
|
|
|
|
def __init__(self,category,filename,format,path):
|
|
self.category = category
|
|
super().__init__(filename,format,path)
|
|
def __str__(self):
|
|
return f"category:{self.category}:" + super().__str__()
|
|
|
|
|
|
|
|
|