xspf2m3u

simple XSPF to M3U conversion
git clone https://git.ce9e.org/xspf2m3u.git

commit
a94678c4b8edfbc0f0704f59ec7221a45eb48be1
parent
a9fd607c920be4c97111e2167c62da50b939bb6c
Author
Tobias Bengfort <tobias.bengfort@posteo.de>
Date
2022-03-06 16:43
refactor: better function name

Diffstat

M xspf2m3u.py 6 +++---

1 files changed, 3 insertions, 3 deletions


diff --git a/xspf2m3u.py b/xspf2m3u.py

@@ -59,7 +59,7 @@ def iter_files(folder):
   59    59 				yield dirpath, filename
   60    60 
   61    61 
   62    -1 def simp(s):
   -1    62 def simplify(s):
   63    63 	s = s.lower()
   64    64 	s = s.encode('ascii', errors='replace').decode('ascii')
   65    65 	return CHARS.sub('', s)
@@ -69,8 +69,8 @@ def find_by_title(title, fields, files):
   69    69 	for dirpath, filename in files:
   70    70 		path = os.path.join(dirpath, filename)
   71    71 		if (
   72    -1 			simp(title) in simp(filename)
   73    -1 			and all(simp(o) in simp(path) for o in fields)
   -1    72 			simplify(title) in simplify(filename)
   -1    73 			and all(simplify(o) in simplify(path) for o in fields)
   74    74 		):
   75    75 			return path
   76    76