1234567891011121314151617181920 |
- #!./bin/python3
- import os
- from handler.filelist import FileListHandler
- class DirectoryHandler(FileListHandler):
- def getPlaylistItems(self, item):
- path = item["path"]
- items = []
- items = sorted([{
- "name" : self.toDisplayName(f),
- "path" : os.path.join(path, f)
- } for f in os.listdir(path)], key=lambda i: i["name"])
- print("GOT items:", items)
- return items
|