mirror of
https://github.com/cyberboy666/r_e_c_u_r.git
synced 2025-12-12 03:10:17 +01:00
started getting video duration
This commit is contained in:
@@ -5,6 +5,7 @@ import os
|
|||||||
from random import randint
|
from random import randint
|
||||||
import time
|
import time
|
||||||
import inspect
|
import inspect
|
||||||
|
from ffprobe import FFProbe
|
||||||
|
|
||||||
######## sets names for the persistant data objects ########
|
######## sets names for the persistant data objects ########
|
||||||
NEXT_BANK_JSON = 'next_bank_number.json'
|
NEXT_BANK_JSON = 'next_bank_number.json'
|
||||||
@@ -165,8 +166,7 @@ def create_new_bank_mapping(bank_number,file_name,memory_bank=[]):
|
|||||||
update_a_banks_data(bank_number, new_bank, memory_bank)
|
update_a_banks_data(bank_number, new_bank, memory_bank)
|
||||||
|
|
||||||
def get_length_for_file(location):
|
def get_length_for_file(location):
|
||||||
#TODO: will have omx.player get length of file probs..
|
return FFProbe(location).streams[0].duration
|
||||||
pass
|
|
||||||
|
|
||||||
def get_path_for_file(file_name):
|
def get_path_for_file(file_name):
|
||||||
######## returns full path for a given file name ########
|
######## returns full path for a given file name ########
|
||||||
|
|||||||
Reference in New Issue
Block a user