KodiSave 1.4 FanArt# as integerSee
above the
updated source code 1.4.
kittmaster wrote:
be warning me every time it exports even though it works as expected
This behavior is by design. Since, the KodiSave message in the status bar could disappear,
we use the Error window to persist the message as a warning even if it is
not a
warning or an
error.
If you do
not wish any message in the Error window, put in comment adding ";" in the beginning of the line 154:
(gimp-message (string-append "KodiSave: " fullSkin))
Alternatively, if you do not wish to put in comment gimp-message, you can delete this line.
kittmaster wrote:
Exported Fanart - Spinner set to 6 -> Failed, added suffix unexpectedly as fanart5.XXXXXXX
Do you remember if you moved the cursor or clicked to upper arrow of the spinner?
For unknown reason
![Crash puter :crash](./images/smilies/Crash.gif)
, the
FanArt only index was incremented from 5 to the float number 5.7073
To fix the issue:
- We removed the cursor keeping only the spinner: type = 1 instead of 0 in the last parameter.
SF-ADJUSTMENT "FanArt only" '(0 0 30 1 10 0 1)
- The procedure (define (KodiSkinPath path basename artTypeIdx fanArtNbr) has been improved to convert fanArtNbr from float to integer in case where the spinner would return a float number. Normally, the spinner should not return a float since the step is the integer 1 without any decimal dot.
How to convert a float to an integer in Script-Fu?You can copy and paste the following code in the Script-Fu console.
6
The boundary is at the half of the interval between 5.0 and 6.0: 5.5
6
5
Into the bargain, if there is a decimal dot in the conversion from number to string, we split the string with the known function
strbreakup used to split a filename into a root and a file extension:
(car (strbreakup (number->string 5.7073 10) "."))
"5"
You can try without the function car to get the list of the numbers before and after the decimal dot:
(strbreakup (number->string 5.7073 10) ".")
("5" "7073")
Finally, if the issue occurs too often, put in comment adding ";" in the beginning of the line "SF-ADJUSTMENT".
Then remove ";" in the line below starting with "SF-VALUE". The spinner will be replaced with an input box initialized with "0".
Before: with the spinner
SF-ADJUSTMENT "FanArt only" '(0 0 30 1 10 0 1)
;SF-ADJUSTMENT "slider name" '(value lower upper step_inc page_inc digits type)
; SF-VALUE "FanArt only" "0"
After: without the spinner but a basic input box
; SF-ADJUSTMENT "FanArt only" '(0 0 30 1 10 0 1)
;SF-ADJUSTMENT "slider name" '(value lower upper step_inc page_inc digits type)
SF-VALUE "FanArt only" "0"
In the free editor NotePad++, adding ";" in the beginning of the line renders the line as a
green comment.
After the editing of a Script-Fu source code .
scm such as KodiSave.scm, we recommend to close Gimp then restart Gimp even if there is the menu "Filter" > "Script-Fu" > "Refresh scripts".
So we are sure that the memory used by Script-Fu will be correctly released.
![Sun glasses :sglasses](./images/smilies/bigglasses.gif)