Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added 1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 21 additions & 2 deletions AV_Data_Capture.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

import glob
Expand All @@ -10,6 +10,7 @@
import json
import shutil
from configparser import ConfigParser
import fnmatch
os.chdir(os.getcwd())

# ============global var===========
Expand All @@ -18,11 +19,28 @@

config = ConfigParser()
config.read(config_file, encoding='UTF-8')

fromPath=config['movie']['path']
Platform = sys.platform

# ==========global var end=========

def moveMovies(fromPath):
movieFiles = []
if Platform == 'win32':
movieFormat = ["avi", "rmvb", "wmv", "mov", "mp4", "mkv", "flv", "ts"]
else:
movieFormat = ["AVI", "RMVB", "WMV", "MOV", "MP4", "MKV", "FLV", "TS","avi", "rmvb", "wmv", "mov", "mp4", "mkv", "flv", "ts"]
for fm in movieFormat:
movieFiles = movieFiles + [os.path.join(dirpath, f)
for dirpath, dirnames, files in os.walk(fromPath)
for f in fnmatch.filter(files, '*.' + fm)]
for movie in movieFiles:
movieName = movie.split('/')[-1]
print("Move file " + movieName)
if (os.path.exists(os.path.curdir + '/' + movieName)):
print(movieName + "exists, skip.")
else:
shutil.move(movie, os.path.curdir)
def UpdateCheck():
if UpdateCheckSwitch() == '1':
html2 = get_html('https://raw.githubusercontent.com/yoshiko2/AV_Data_Capture/master/update_check.json')
Expand Down Expand Up @@ -128,6 +146,7 @@ def RunCore():
print('[*]=====================================')
CreatFailedFolder()
UpdateCheck()
moveMovies(fromPath)
os.chdir(os.getcwd())

count = 0
Expand Down
9 changes: 8 additions & 1 deletion config.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ failed_output_folder=failed
success_output_folder=JAV_output

[proxy]
proxy=127.0.0.1:1080
proxy=10.168.1.254:3128
#proxy=127.0.0.1:1080
timeout=10
retry=3

Expand All @@ -21,3 +22,9 @@ media_warehouse=emby

[directory_capture]
directory=

[escape]
literals=\()

[movie]
path=/root/sort/test
Loading