Skip to content

Commit 5dd4ac0

Browse files
authored
[media-columns] display bitrate for videos (#414)
* display bitrate for videos * display bitrate for videos * update changelog ref #414
1 parent f8a6003 commit 5dd4ac0

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

nemo-media-columns/nemo-media-columns.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/usr/bin/python3
22

33
# change log:
4+
# HarHarLinks: fix video bitrate support
45
# geb666: original bsc.py, based on work by Giacomo Bordiga
56
# jmdsdf: version 2 adds extra ID3 and EXIF tag support
67
# jmdsdf: added better error handling for ID3 tags, added mp3 length support, distinguished
@@ -271,10 +272,6 @@ def file_is_one_of_these(mimetype_list):
271272
pass
272273

273274
if track["track_type"] == "Audio":
274-
try:
275-
info.bitrate = track['other_bit_rate'][0]
276-
except:
277-
pass
278275
try:
279276
info.samplerate = track['other_sampling_rate'][0]
280277
except:
@@ -286,6 +283,10 @@ def file_is_one_of_these(mimetype_list):
286283
pass
287284

288285
if track["track_type"] == "General":
286+
try:
287+
info.bitrate = track['other_overall_bit_rate'][0]
288+
except:
289+
pass
289290
try:
290291
if duration == 0:
291292
duration = int(track['duration'])

0 commit comments

Comments
 (0)