8000 #17: add `short_repr` for input and output nodes · equalent/ffmpeg-python@c6e2f05 · GitHub
[go: up one dir, main page]

Skip to content

Commit c6e2f05

Browse filesBrowse files
committed
kkroening#17: add short_repr for input and output nodes
1 parent 8337d34 commit c6e2f05

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

ffmpeg/nodes.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
from __future__ import unicode_literals
22

3-
from builtins import object
43
from .dag import KwargReprNode
54
from ._utils import get_hash_int
5+
from builtins import object
6+
import os
67

78

89
def _is_of_types(obj, types):
@@ -115,6 +116,10 @@ def __init__(self, name, args=[], kwargs={}):
115116
kwargs=kwargs
116117
)
117118

119+
@property
120+
def short_repr(self):
121+
return os.path.basename(self.kwargs['filename'])
122+
118123

119124
class FilterNode(Node):
120125
def __init__(self, stream_spec, name, max_inputs=1, args=[], kwargs={}):
@@ -152,6 +157,10 @@ def __init__(self, stream, name, args=[], kwargs={}):
152157
kwargs=kwargs
153158
)
154159

160+
@property
161+
def short_repr(self):
162+
return os.path.basename(self.kwargs['filename'])
163+
155164

156165
class OutputStream(Stream):
157166
def __init__(self, upstream_node, upstream_label):

0 commit comments

Comments
 (0)
0