def _path_add_base(self, a):
return os.path.join(self.base_directory, a)
+ def _path_m3u_rel(self, a):
+ return os.path.join(os.path.dirname(self.source), a)
+
def _log(self, level, msg):
try:
obj = {}
f = open(self.media_source, 'r')
try:
for path in f.readlines():
+ path = path.strip()
if '#' != path[0]:
- fp = self._path_add_base(path.strip())
+ fp = self._path_m3u_rel(path)
if os.path.isfile(fp):
file_list.append(fp)
except:
- media/source (except for stations created using the stationfolder method)
- record/dir
- feeds/dir
- - All paths read from the file specified by media/m3u or media/source
If the parameter path begins with a slash, it is assumed to be an absolute path and
prepending does not occur (see https://docs.python.org/2/library/os.path.html#os.path.join )