xspf2m3u

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

commit
1ad6b752feea4b9df273e3c8bb4b7c57f2ba75d3
parent
2e48e6277a6c2e3bcb050bc7ab2538edd513804e
Author
Tobias Bengfort <tobias.bengfort@posteo.de>
Date
2022-03-06 15:35
Gardening

Diffstat

M xspf2m3u.py 8 ++++----

1 files changed, 4 insertions, 4 deletions


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

@@ -1,9 +1,7 @@
    1     1 #!/usr/bin/env python
    2     2 
    3    -1 import sys
    4     3 import os
    5     4 import re
    6    -1 import codecs
    7     5 import argparse
    8     6 from xml.etree import ElementTree
    9     7 
@@ -38,8 +36,10 @@ def simp(s):
   38    36 def find_by_title(title, fields, files):
   39    37 	for dirpath, filename in files:
   40    38 		path = os.path.join(dirpath, filename)
   41    -1 		if (simp(title) in simp(filename) and
   42    -1 				all(simp(o) in simp(path) for o in fields)):
   -1    39 		if (
   -1    40 			simp(title) in simp(filename)
   -1    41 			and all(simp(o) in simp(path) for o in fields)
   -1    42 		):
   43    43 			return path
   44    44 
   45    45