import run if __name__ == '__main__': # Main section # Set logging Logging() # Create directories Remove_folder(Script_folder) Preconditions(Script_folder) Preconditions(Video_folder) Preconditions(Converted_folder) # Connecting to server client_factory = connection.ClientFactory() client = connection.Connection(client_factory) # Get the models list and create main list Models_list_store = modellists.Models_list(client) # Select models for recording according to wishlist Selected_models = modellists.Select_models(Models_list_store) # Parse page for each model and creatr links for rtmpdump modellists.Get_links(client, Selected_models) # Run scripts run.Run_scripts() # First delay before loop logging.info('Waiting for %d seconds' % Time_delay) sleep(Time_delay) while True: # Reassign updated main models list # Connecting to server try: client = connection.Connection(client_factory)
import modellists from time import sleep from config import * from thread import * from model import CBModel if __name__ == '__main__': ## Main section # Set logging Logging() # Create directories Preconditions(Video_folder) # Connecting client = connection.Connection() # Get the models list and create main list Models_list_store = modellists.Models_list(client) # Select models for recording according to wishlist Selected_models = modellists.Select_models(Models_list_store) # Loop to send which model to capture for model in Selected_models: # type: CBModel # For thread to work it needs to be a tuple model = (model, ) # Starting a new thread start_new_thread(modellists.addmodel, model) sleep(1) print('Models currently recorded: ' + str(models_online)) logging.info('Waiting for %d seconds' % Time_delay) sleep(Time_delay) while True: ## Reassign updated main models list # Connecting to server
import connection import modellists import run if __name__ == '__main__': ## Main section # Set logging Logging() # Create directories Remove_folder(Script_folder) Preconditions(Script_folder) Preconditions(Video_folder) # Connecting to server client = connection.Connection() # Get the models list and create main list Models_list_store = modellists.Models_list(client) # Select models for recording according to wishlist Selected_models = modellists.Select_models(Models_list_store) # Parse page for each model and creatr links for rtmpdump modellists.Get_links(client, Selected_models) #Run scripts run.Run_scripts() # First delay before loop logging.info('Waiting for %d seconds' %Time_delay) sleep(Time_delay) while True: ## Reassign updated main models list # Connecting to server client = connection.Connection() #Models_list_store = Compare_lists(Models_list_store, Models_list(client)) logging.info(str(len(Models_list_store)) + ' Models in the list before checking: ' + str(Models_list_store))