File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -333,6 +333,13 @@ def detectDevice():
333333 # Retrieves the device name from FL Studio
334334 deviceName = device .getName ()
335335
336+ # Saves the 22th character of the device name for the S-Series check to isolate the extraction and avoid errors stopping the execution of the script
337+ char21 = None
338+ try :
339+ char21 = deviceName [21 ]
340+ except :
341+ char21 = None
342+
336343 # Sets DEVICE_NAME depending on the retrieved name
337344 if deviceName == "Komplete Kontrol A DAW" :
338345 DEVICE_SERIES = "A_SERIES"
@@ -342,13 +349,12 @@ def detectDevice():
342349 DEVICE_SERIES = "M_SERIES"
343350 print ("Detected device: Komplete Kontrol M-Series" )
344351
345- elif deviceName [ 21 ] == "-" : # Gets the 18th char on the name to see if it matches the "Komplete Kontrol DAW - X" naming scheme S-Series devices follow
352+ elif char21 == "-" : # Gets the 18th char on the name to see if it matches the "Komplete Kontrol DAW - X" naming scheme S-Series devices follow
346353 DEVICE_SERIES = "S_SERIES"
347354 print ("Detected device: Komplete Kontrol S-Series" )
348355
349356 else :
350- DEVICE_SERIES = "S_SERIES"
351- print ("Device detection failed. Going with Komplete Kontrol S-Series." )
357+ print ("Device detection failed. Going with the manually specified device on the script:" , DEVICE_SERIES )
352358
353359
354360######################################################################################################################
You can’t perform that action at this time.
0 commit comments