Skip to content

Commit

Permalink
Tagger (#266)
Browse files Browse the repository at this point in the history
* check enabled_poster for taging

* update dependencies
  • Loading branch information
DirtyRacer1337 authored Jan 3, 2025
1 parent f5c7660 commit e0e6028
Show file tree
Hide file tree
Showing 4 changed files with 1,096 additions and 994 deletions.
6 changes: 4 additions & 2 deletions namer/namer.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,10 @@ def tag_in_place(video: Optional[Path], config: NamerConfig, new_metadata: Looke
if new_metadata and video:
poster = None
if config.enabled_tagging and video.suffix.lower() == '.mp4':
random = ''.join(choices(population=string.ascii_uppercase + string.digits, k=10))
poster = get_image(new_metadata.poster_url, random, video, config) if new_metadata.poster_url else None
if config.enabled_poster:
random = ''.join(choices(population=string.ascii_uppercase + string.digits, k=10))
poster = get_image(new_metadata.poster_url, random, video, config) if new_metadata.poster_url else None

logger.info('Updating file metadata (atoms): {}', video)
update_mp4_file(video, new_metadata, poster, ffprobe_results, config)

Expand Down
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,26 +32,26 @@
"@babel/core": "^7.26.0",
"@babel/preset-env": "^7.26.0",
"@eslint/eslintrc": "^3.2.0",
"@eslint/js": "^9.16.0",
"@eslint/js": "^9.17.0",
"babel-loader": "^9.2.1",
"copy-webpack-plugin": "^12.0.2",
"css-loader": "^7.1.2",
"css-minimizer-webpack-plugin": "^7.0.0",
"eslint": "^9.16.0",
"eslint": "^9.17.0",
"eslint-config-standard": "^17.1.0",
"file-loader": "^6.2.0",
"globals": "^15.13.0",
"globals": "^15.14.0",
"html-minimizer-webpack-plugin": "^5.0.0",
"husky": "^9.1.7",
"lint-staged": "^15.2.10",
"lint-staged": "^15.3.0",
"mini-css-extract-plugin": "^2.9.2",
"postcss": "^8.4.49",
"postcss-loader": "^8.1.1",
"postcss-preset-env": "^10.1.1",
"sass": "^1.82.0",
"postcss-preset-env": "^10.1.3",
"sass": "^1.83.0",
"sass-loader": "^16.0.4",
"terser-webpack-plugin": "^5.3.10",
"terser-webpack-plugin": "^5.3.11",
"webpack": "^5.97.1",
"webpack-cli": "^5.1.4"
"webpack-cli": "^6.0.1"
}
}
Loading

0 comments on commit e0e6028

Please sign in to comment.