Update 'plugins'
parent
92e3d1b0c2
commit
4df744da8e
1 changed files with 8 additions and 4 deletions
12
plugins.md
12
plugins.md
|
|
@ -20,11 +20,15 @@ Example
|
||||||
parts = path.split('/')
|
parts = path.split('/')
|
||||||
if len(parts) != 3:
|
if len(parts) != 3:
|
||||||
return None
|
return None
|
||||||
|
date = parts[0]
|
||||||
|
title = parts[1]
|
||||||
|
filename = parts[-1]
|
||||||
|
extension = filename.split('.')[-1].lower()
|
||||||
return {
|
return {
|
||||||
'date': parts[0],
|
'date': date,
|
||||||
'title': parts[1],
|
'title': title,
|
||||||
'extension': parts[-1].split('.')[-1].lower(),
|
'extension': extension,
|
||||||
'type': parts[-1].split('.')[-1].lower() in ('avi', 'mov', 'webm') and 'video' or None
|
'type': filename.split('.')[-1].lower() in ('avi', 'mov', 'webm', 'dv') and 'video' or None
|
||||||
}
|
}
|
||||||
|
|
||||||
def example_path(client):
|
def example_path(client):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue