MCPcopy Create free account
hub / github.com/TechifyBots/Rename-Bot / metadata_text

Function metadata_text

helper/utils.py:141–161  ·  view source on GitHub ↗
(metadata_text)

Source from the content-addressed store, hash-verified

139 os.remove(path)
140
141async def metadata_text(metadata_text):
142 author = None
143 title = None
144 video_title = None
145 audio_title = None
146 subtitle_title = None
147
148 flags = [i.strip() for i in metadata_text.split('--')]
149 for f in flags:
150 if "change-author" in f:
151 author = f[len("change-author"):].strip()
152 if "change-title" in f:
153 title = f[len("change-title"):].strip()
154 if "change-video-title" in f:
155 video_title = f[len("change-video-title"):].strip()
156 if "change-audio-title" in f:
157 audio_title = f[len("change-audio-title"):].strip()
158 if "change-subtitle-title" in f:
159 subtitle_title = f[len("change-subtitle-title"):].strip()
160
161 return author, title, video_title, audio_title, subtitle_title

Callers 1

change_metadataFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected