Skip to content

Commit 5be3d3f

Browse files
authored
Merge pull request #22 from michaelb/dev
patch
2 parents 4dfadd1 + 89eca73 commit 5be3d3f

File tree

4 files changed

+11
-4
lines changed

4 files changed

+11
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# auto-ytdl
22

3-
![](https://img.shields.io/badge/Release-v1.2.0-green.svg)
3+
![](https://img.shields.io/badge/Release-v1.2.1-green.svg)
44

55
I know, _yet another_ youtube-dl wrapper. But this one does something others don't: ability to automate your new music downloads, just like package managers automate your updates.
66

autoytdl/metadata_manager.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,18 +92,20 @@ def can_be_music(audio_tuple, config):
9292

9393
def should_add(filepath, config):
9494
list_tags = openlist(config.path_to_metadata)
95+
if config.force:
96+
return True
9597

9698
instanceaudio = list(openaudio(str(Path(filepath))))
9799

98-
if not can_be_music(instanceaudio, config) and not config.force:
100+
if not can_be_music(instanceaudio, config):
99101
print("[probably not a music file, not adding] ", tuple(instanceaudio))
100102
return False
101103

102104
for i in range(len(instanceaudio)):
103105
instanceaudio[i] = str(significant_words(str(instanceaudio[i])))
104106
tuple_audio = tuple(instanceaudio)
105107

106-
if inlist(tuple_audio, list_tags) and not config.force:
108+
if inlist(tuple_audio, list_tags):
107109
print("[already present in metadata archive, skipping]", tuple_audio)
108110
return False
109111
else:

autoytdl/name_cleaner.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ def remove_brackets(string):
1717
string = re.sub(r'\(\ \)', '', string)
1818
string = re.sub(r'\(\ \ \)', '', string)
1919
string = re.sub(r'\(\ \ \ \)', '', string)
20+
string = re.sub(r'\( /\)', '', string)
21+
string = re.sub(r'\(/\)', '', string)
22+
string = re.sub(r'\(/ \)', '', string)
23+
24+
string = re.sub(r'【.*】', '', string)
2025
# dont want to test more compelx regex for this
2126
string = re.sub("[\{\[].*?[\}\]]", "", string)
2227
return string

autoytdl/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# follows semantic versionning
2-
__version__ = "1.2.0"
2+
__version__ = "1.2.1"

0 commit comments

Comments
 (0)