Merge branch 'uif' into fix-HTTP-500-on-playlist-delete
This commit is contained in:
commit
81d706e434
38
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
38
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
---
|
||||||
|
name: Bug report
|
||||||
|
about: Create a report to help us improve
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**Describe the bug**
|
||||||
|
A clear and concise description of what the bug is.
|
||||||
|
|
||||||
|
**Affected version**
|
||||||
|
The exact version you're using (git commit id). You should **always** only report bugs which you can reproduce on the latest version (`uif` branch), however **always** state the current commit id here (in case there are new commits between your report and us looking at it)
|
||||||
|
|
||||||
|
**To Reproduce**
|
||||||
|
Steps to reproduce the behavior:
|
||||||
|
1. Go to '...'
|
||||||
|
2. Click on '....'
|
||||||
|
3. Scroll down to '....'
|
||||||
|
4. See error
|
||||||
|
|
||||||
|
**Expected behavior**
|
||||||
|
A clear and concise description of what you expected to happen.
|
||||||
|
|
||||||
|
**Screenshots**
|
||||||
|
If applicable, add screenshots to help explain your problem.
|
||||||
|
|
||||||
|
**Desktop (please complete the following information):**
|
||||||
|
- OS: [e.g. iOS]
|
||||||
|
- Browser [e.g. chrome, safari]
|
||||||
|
- Version [e.g. 22]
|
||||||
|
|
||||||
|
**Smartphone (please complete the following information):**
|
||||||
|
- Device: [e.g. iPhone6]
|
||||||
|
- OS: [e.g. iOS8.1]
|
||||||
|
- Browser [e.g. stock browser, safari]
|
||||||
|
- Version [e.g. 22]
|
||||||
|
|
||||||
|
**Additional context**
|
||||||
|
Add any other context about the problem here.
|
17
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
17
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
---
|
||||||
|
name: Feature request
|
||||||
|
about: Suggest an idea for this project
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**Is your feature request related to a problem? Please describe.**
|
||||||
|
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
||||||
|
|
||||||
|
**Describe the solution you'd like**
|
||||||
|
A clear and concise description of what you want to happen.
|
||||||
|
|
||||||
|
**Describe alternatives you've considered**
|
||||||
|
A clear and concise description of any alternative solutions or features you've considered.
|
||||||
|
|
||||||
|
**Additional context**
|
||||||
|
Add any other context or screenshots about the feature request here.
|
@ -85,7 +85,7 @@ def index():
|
|||||||
files = music_library.get_files_recursively(folder)
|
files = music_library.get_files_recursively(folder)
|
||||||
else:
|
else:
|
||||||
files = music_library.get_files(folder)
|
files = music_library.get_files(folder)
|
||||||
files = list(map(lambda file: ('file', folder + '/' + file, datetime.now().timestamp()), files))
|
files = list(map(lambda file: ('file', os.path.join(folder, file), datetime.now().timestamp()), files))
|
||||||
print('Adding to playlist: ', files)
|
print('Adding to playlist: ', files)
|
||||||
var.playlist.extend(files)
|
var.playlist.extend(files)
|
||||||
elif 'delete_music' in request.form:
|
elif 'delete_music' in request.form:
|
||||||
|
5
util.py
5
util.py
@ -9,7 +9,7 @@ import zipfile
|
|||||||
def get_recursive_filelist_sorted(path):
|
def get_recursive_filelist_sorted(path):
|
||||||
filelist = []
|
filelist = []
|
||||||
for root, dirs, files in os.walk(path):
|
for root, dirs, files in os.walk(path):
|
||||||
relroot = root.replace(path, '')
|
relroot = root.replace(path, '', 1)
|
||||||
if relroot != '' and relroot in var.config.get('bot', 'ignored_folders'):
|
if relroot != '' and relroot in var.config.get('bot', 'ignored_folders'):
|
||||||
continue
|
continue
|
||||||
if len(relroot):
|
if len(relroot):
|
||||||
@ -60,13 +60,12 @@ class Dir(object):
|
|||||||
def __init__(self, path):
|
def __init__(self, path):
|
||||||
self.name = os.path.basename(path.strip('/'))
|
self.name = os.path.basename(path.strip('/'))
|
||||||
self.fullpath = path
|
self.fullpath = path
|
||||||
print(self.name, self.fullpath)
|
|
||||||
self.subdirs = {}
|
self.subdirs = {}
|
||||||
self.files = []
|
self.files = []
|
||||||
|
|
||||||
def add_file(self, file):
|
def add_file(self, file):
|
||||||
if file.startswith(self.name + '/'):
|
if file.startswith(self.name + '/'):
|
||||||
file = file.replace(self.name + '/', '')
|
file = file.replace(self.name + '/', '', 1)
|
||||||
|
|
||||||
if '/' in file:
|
if '/' in file:
|
||||||
# This file is in a subdir
|
# This file is in a subdir
|
||||||
|
Loading…
x
Reference in New Issue
Block a user