couchpotato.core.plugins.scanner module¶
-
class
couchpotato.core.plugins.scanner.
Scanner
[source]¶ Bases:
couchpotato.core.plugins.base.Plugin
-
audio_codec_map
= {8192: 'AC3', 8193: 'DTS', 3: 'WAV', 1: 'PCM', 80: 'MP2', 85: 'MP3', 22358: 'WAV', 26448: 'Vorbis', 30625: 'TTA1', 61868: 'FLAC', 255: 'AAC'}¶
-
clean
= '([ _\\,\\.\\(\\)\\[\\]\\-]|^)(3d|hsbs|sbs|half.sbs|full.sbs|ou|half.ou|full.ou|extended|extended.cut|directors.cut|french|fr|swedisch|sw|danish|dutch|nl|swesub|subs|spanish|german|ac3|dts|custom|dc|divx|divx5|dsr|dsrip|dutch|dvd|dvdr|dvdrip|dvdscr|dvdscreener|screener|dvdivx|cam|fragment|fs|hdtv|hdrip|hdtvrip|webdl|web.dl|webrip|web.rip|internal|limited|multisubs|ntsc|ogg|ogm|pal|pdtv|proper|repack|rerip|retail|r3|r5|bd5|se|svcd|swedish|german|read.nfo|nfofix|unrated|ws|telesync|ts|telecine|tc|brrip|bdrip|video_ts|audio_ts|480p|480i|576p|576i|720p|720i|1080p|1080i|hrhd|hrhdtv|hddvd|bluray|x264|h264|x265|h265|xvid|xvidvd|xxx|www.www|hc|\\[.*\\])(?=[ _\\,\\.\\(\\)\\[\\]\\-]|$)'¶
-
codecs
= {'audio': ['DTS', 'AC3', 'AC3D', 'MP3'], 'video': ['x264', 'H264', 'x265', 'H265', 'DivX', 'Xvid']}¶
-
cp_imdb
= '\\.cp\\((?P<id>tt[0-9]+),?\\s?(?P<random>[A-Za-z0-9]+)?\\)'¶
-
createStringIdentifier
(file_path, folder='', exclude_filename=False)¶
-
determineMedia
(group, release_download=None)¶
-
extensions
= {'subtitle_extra': ['idx'], 'movie_extra': ['mds'], 'nfo': ['nfo', 'txt', 'tag'], 'movie': ['mkv', 'wmv', 'avi', 'mpg', 'mpeg', 'mp4', 'm2ts', 'iso', 'img', 'mdf', 'ts', 'm4v', 'flv'], 'dvd': ['vts_*', 'vob'], 'subtitle': ['sub', 'srt', 'ssa', 'ass'], 'trailer': ['mov', 'mp4', 'flv']}¶
-
file_sizes
= {'movie': {'min': 200}, 'backdrop': {'max': 5, 'min': 0}, 'trailer': {'max': 199, 'min': 2}}¶
-
file_types
= {'subtitle_extra': ('subtitle', 'subtitle_extra'), 'subtitle': ('subtitle', 'subtitle'), 'backdrop': ('image', 'backdrop'), 'poster': ('image', 'poster'), 'nfo': ('nfo', 'nfo'), 'movie': ('video', 'movie'), 'movie_extra': ('movie', 'movie_extra'), 'leftover': ('leftover', 'leftover'), 'thumbnail': ('image', 'thumbnail'), 'trailer': ('video', 'trailer')}¶
-
filesizeBetween
(file, file_size=None)¶
-
findYear
(text)¶
-
get3dType
(filename)¶
-
getCPImdb
(string)¶
-
getCodec
(filename, codecs)¶
-
getDVDFiles
(files)¶
-
getFileSize
(file)¶
-
getGroup
(file)¶
-
getImages
(files)¶
-
getMediaFiles
(files)¶
-
getMeta
(filename)¶
-
getMetaData
(group, folder='', release_download=None)¶
-
getMovieExtras
(files)¶
-
getNfo
(files)¶
-
getPartNumber
(name)¶
-
getReleaseNameYear
(release_name, file_name=None)¶
-
getResolution
(filename)¶
-
getSamples
(files)¶
-
getSourceMedia
(file)¶
-
getSubtitleLanguage
(group)¶
-
getSubtitles
(files)¶
-
getSubtitlesExtras
(files)¶
-
getTrailers
(files)¶
-
ignore_names
= ['extract', 'extracting', 'extracted', 'movie', 'movies', 'film', 'films', 'download', 'downloads', 'video_ts', 'audio_ts', 'bdmv', 'certificate']¶
-
ignored_in_path
= ['/extracted/', 'extracting', '_unpack', '_failed_', '_unknown_', '_exists_', '_failed_remove_', '_failed_rename_', '.appledouble', '.appledb', '.appledesktop', '/._', '.ds_store', 'cp.cpnfo', 'thumbs.db', 'ehthumbs.db', 'desktop.ini']¶
-
isDVDFile
(file_name)¶
-
isSampleFile
(filename)¶
-
keepFile
(filename)¶
-
multipart_regex
= ['[ _\\.-]+cd[ _\\.-]*([0-9a-d]+)', '[ _\\.-]+dvd[ _\\.-]*([0-9a-d]+)', '[ _\\.-]+part[ _\\.-]*([0-9a-d]+)', '[ _\\.-]+dis[ck][ _\\.-]*([0-9a-d]+)', 'cd[ _\\.-]*([0-9a-d]+)$', 'dvd[ _\\.-]*([0-9a-d]+)$', 'part[ _\\.-]*([0-9a-d]+)$', 'dis[ck][ _\\.-]*([0-9a-d]+)$', '()[ _\\.-]+([0-9]*[abcd]+)(\\.....?)$', '([a-z])([0-9]+)(\\.....?)$', '()([ab])(\\.....?)$']¶
-
removeCPTag
(name)¶
-
removeMultipart
(name)¶
-
resolutions
= {'480p': {'resolution_height': 480, 'resolution_width': 640, 'aspect': 1.33}, '720i': {'resolution_height': 720, 'resolution_width': 1280, 'aspect': 1.78}, '1080i': {'resolution_height': 1080, 'resolution_width': 1920, 'aspect': 1.78}, 'default': {'resolution_height': 0, 'resolution_width': 0, 'aspect': 1}, '480i': {'resolution_height': 480, 'resolution_width': 640, 'aspect': 1.33}, '720p': {'resolution_height': 720, 'resolution_width': 1280, 'aspect': 1.78}, '1080p': {'resolution_height': 1080, 'resolution_width': 1920, 'aspect': 1.78}, '2160p': {'resolution_height': 2160, 'resolution_width': 3840, 'aspect': 1.78}}¶
-
scan
(folder=None, files=None, release_download=None, simple=False, newer_than=0, return_ignored=True, check_file_date=True, on_found=None)¶
-
source_media
= {'HD DVD': ['hddvd', 'hd-dvd'], 'DVD': ['dvd'], 'HDTV': ['hdtv'], 'Blu-ray': ['bluray', 'blu-ray', 'brrip', 'br-rip']}¶
-
threed_types
= {'SBS': ['sbs'], 'Full OU': [('full', 'ou'), ('h', 'ou'), 'fou'], 'Half SBS': [('half', 'sbs'), ('h', 'sbs'), 'hsbs'], 'Full SBS': [('full', 'sbs'), ('f', 'sbs'), 'fsbs'], 'OU': ['ou'], 'Frame Packed': ['mvc', ('complete', 'bluray')], 'Half OU': [('half', 'ou'), ('h', 'ou'), 'hou'], '3D': ['3d']}¶
-