From f61b59955b2bd41544173ae96496c2ce798d6b00 Mon Sep 17 00:00:00 2001 From: janis Date: Wed, 29 Mar 2023 11:54:18 +0200 Subject: [PATCH] fix crashing --- bin/__pycache__/handler.cpython-310.pyc | Bin 7123 -> 7119 bytes bin/__pycache__/probe.cpython-310.pyc | Bin 2242 -> 2238 bytes fsrimagevideoupscaler-cli.py | 45 ++++++++++++++---------- 3 files changed, 26 insertions(+), 19 deletions(-) diff --git a/bin/__pycache__/handler.cpython-310.pyc b/bin/__pycache__/handler.cpython-310.pyc index 51db6da3bd5b94126165d41c2be48614fadb191a..83095d10e46f10329d07190d3e20aec02c96f518 100644 GIT binary patch delta 31 lcmca?e%_orpO=@50SMM|sBGj8W@2=l9M5F5c`B2gBmjN^2ciG~ delta 36 qcmX?ae%YKmpO=@50SJCFDR1NsW@2=m9M5FL67QEkxKEHfpO=@50SI&zg*S40Gcnpv4remj+{ 0 ): - go = True; - else: + if ( args.sharpening != None ): + if ( float( args.sharpening ) > 0 ): + go = True; + else: + go = False; + else: + print( 'Missing argument for Sharpening. Please specify that argument and try again!' ) go = False; - if ( go ): + if ( args.sharpening != None ): if ( float( args.sharpening ) > 1 ): print( 'Invalid argument for Sharpening, please specify value between 0 and 1!' ) - else: - if ( args.scalefactor ): - if ( args.scalefactor[ len(args.scalefactor) -1: ] == 'x' ): - if ( args.threads != None ): - handler.handler( 'bin/lib/FidelityFX_CLI.exe', args.inputfile, 'custom', args.scalefactor, args.outputfile, args.sharpening, args.noscaling, threads=int( args.threads ) ); - else: - handler.handler( 'bin/lib/FidelityFX_CLI.exe', args.inputfile, 'custom', args.scalefactor, args.outputfile, args.sharpening, args.noscaling ); - else: - raise NameError( 'Argument Scale does require to be of form 2x! (it has to end in x)' ) - else: - if ( args.threads != None ): - handler.handler( 'bin/lib/FidelityFX_CLI.exe', args.inputfile, 'custom', '2x', args.outputfile, args.sharpening, args.noscaling, threads=int( args.threads ) ); - else: - handler.handler( 'bin/lib/FidelityFX_CLI.exe', args.inputfile, 'custom', '2x', args.outputfile, args.sharpening, args.noscaling ) - print( '\n\n---------------------------------------------------------------------------------\n\nDONE \n\nFSRImageVideoUpscalerFrontend V1.1.0\n\nCopyright 2023 FSRImageVideoUpscalerFrontend contributors\nThis application comes with absolutely no warranty to the extent permitted by applicable law\n\n' ) + go = False; + + + if ( go ): + if ( args.scalefactor ): + if ( args.scalefactor[ len(args.scalefactor) -1: ] == 'x' ): + if ( args.threads != None ): + handler.handler( 'bin/lib/FidelityFX_CLI.exe', args.inputfile, 'custom', args.scalefactor, args.outputfile, args.sharpening, args.noscaling, threads=int( args.threads ) ); + else: + handler.handler( 'bin/lib/FidelityFX_CLI.exe', args.inputfile, 'custom', args.scalefactor, args.outputfile, args.sharpening, args.noscaling ); + else: + raise NameError( 'Argument Scale does require to be of form 2x! (it has to end in x)' ) + else: + if ( args.threads != None ): + handler.handler( 'bin/lib/FidelityFX_CLI.exe', args.inputfile, 'custom', '2x', args.outputfile, args.sharpening, args.noscaling, threads=int( args.threads ) ); + else: + handler.handler( 'bin/lib/FidelityFX_CLI.exe', args.inputfile, 'custom', '2x', args.outputfile, args.sharpening, args.noscaling ) + print( '\n\n---------------------------------------------------------------------------------\n\nDONE \n\nFSRImageVideoUpscalerFrontend V1.1.0\n\nCopyright 2023 FSRImageVideoUpscalerFrontend contributors\nThis application comes with absolutely no warranty to the extent permitted by applicable law\n\n' )