It is currently Sun Jun 30, 2024 5:08 am


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 42 posts ]  Go to page Previous  1, 2, 3  Next
Author Message
 Post subject: Re: Shortening mouse/keystrokes save/export script or method to implem
PostPosted: Tue Apr 25, 2023 9:49 am  (#21) 
Offline
GimpChat Member

Joined: Dec 27, 2022
Posts: 22
I was trying 1.4 out but not for fanart (other things to complete), I went to export as banner and ran into this output error:


Attachments:
File comment: Save as banner operation
Screenshot 2023-04-25 104744.png
Screenshot 2023-04-25 104744.png [ 88.36 KiB | Viewed 637 times ]
Top
 Post subject: Re: Shortening mouse/keystrokes save/export script or method to implem
PostPosted: Wed Apr 26, 2023 2:30 pm  (#22) 
Offline
GimpChat Member

Joined: Dec 27, 2022
Posts: 22
Also, can you guide me to a scheme debugger so I can single step and try and learn the code sequence?

I found DrRacket, but it was not working as I expect with GIMP script. I do use Visual Studio for C++ and VB, so it isn't a stretch to learn, just knowing the right tool and getting it setup so I can learn and adapt to a different environment.

Thanks again for all your help, will continue to try and understand how scheme works.

Chris


Top
 Post subject: Error: car: argument 1 must be: pair
PostPosted: Wed Apr 26, 2023 5:24 pm  (#23) 
Offline
GimpChat Member
User avatar

Joined: Oct 23, 2021
Posts: 67
I cannot reproduce the following issue with art type "Banner" index 2 in KodiSave 1.4
Try to indicate more context such as full path of picture, states of each element of the KodiSave dialog box.

Error: car: argument 1 must be: pair

Run the Script-Fu console by "Filters" > "Script-Fu" > "Console" (Alt+R S C).

The function car retrieves the first element of a given list such as '("root" "png")
(car '("root" "png"))

"root"

Let us remove manually the first element. The list becomes '("png")
(car '("png"))

"png"

Let us remove again the first element. The list becomes empty '()
(car '())

Error: car: argument 1 must be: pair :gaah
In other words, car does not like the empty list.

In KodiSave 1.4, I mainly introduced car in KodiSkinPath in the affection of the local variable strFanArt of type string.
(strFanArt   (car (strbreakup (number->string intFanArt 10) ".")))

You cannot directly run this affection.
But try to run the examples in comment starting with ";" above the define such as the last one:

Do not copy the ";" but after from the opening parenthesis until the corresponding closing parenthesis.
(KodiSkinPath "C:\\Movies\\Aliens (1986)" "Aliens (1986)" 7 5.1)

"C:\\Movies\\Aliens (1986)\\Aliens (1986)-fanart5.jpg"
It does not matter if the path exists or not.
The expected result is also supplied as a comment before the define.

Try to reproduce your own context about:
  • your path of picture. Do not forget to double backslash in Windows;
  • your art type banner has for index 2 instead of fanart at 7;
  • fanArtNbr should be 0 but indicate the real number of the spinner.


Last edited by AlSchemist on Wed Apr 26, 2023 5:41 pm, edited 1 time in total.

Top
 Post subject: Debugging Script-Fu
PostPosted: Wed Apr 26, 2023 5:31 pm  (#24) 
Offline
GimpChat Member
User avatar

Joined: Oct 23, 2021
Posts: 67
Debugging Script-Fu

You can debug only in the Script-Fu console.
Close Gimp then restart it
You must reproduce the parameters during the call of (script-fu-kodi-save img layer artTypeIdx fanArtNbr)
  • img should be 1 if it is the first picture in Gimp. To confirm, run: (gimp-image-get-id)
  • layer, run: (car (gimp-image-get-active-drawable 1)) ; if img is 1, the layer could be 2 ;
    Alternatively, try: (car (gimp-image-get-active-drawable (gimp-image-get-id)))
  • artTypeIdx: for banner, indicate the index 2
  • fanArtNbr: should be 0

So clicking to the menu File > KodiSave is equivalent to the call in the console:
(script-fu-kodi-save 1 2 2 0)

(#t)

If you do not want to manage the first two parameters,
replace img and layer by the call of their respective functions, but it is longer:
(script-fu-kodi-save (gimp-image-get-id) (car (gimp-image-get-active-drawable (gimp-image-get-id))) 2 0)

(#t)

In the console, you can enable tracing for debugging purpose by:
(tracing 1)

"Gives: 0" should be the Script-Fu's answer displaying the previous state of tracing.

tracing will trace all calls until the fatal error.

Disable the tracing by:
(tracing 0)

Eval: (tracing 0)
Eval: tracing
Eval: 0
Apply to: (0)1

Tracing is extremely verbose: 4 instructions are displayed to disable the tracing.
You could insert (tracing 1) inside any function to start tracing only on purpose.
But choose the function that could be the closest of the bug.
Otherwise, you could have a lot of traces and the performance is dramatically reduced.

When you call a function in the console, you can use:
(display "text")

text#t

and
(displayln "return to the line")

return to the line
#t

display could be more useful than:
(gimp-message "warning")

gimp-message displays a warning in the Error window.

Finally, try to run all the calls in comment and compare with each expected result.
Search the functions that call car.

You can remove the body of let* to check only if the local variables work. :hi5
See in post #6 "let* us introduce local variables:".

If all local variables work, reintroduce step by step the body of let* until the fatal error is found.


Last edited by AlSchemist on Fri Apr 28, 2023 12:20 pm, edited 2 times in total.

Top
 Post subject: Environment of developement for Script-Fu
PostPosted: Wed Apr 26, 2023 5:40 pm  (#25) 
Offline
GimpChat Member
User avatar

Joined: Oct 23, 2021
Posts: 67
Environment of developement for Script-Fu

DrRacket is the best to learn the different dialects about Scheme.
However starting DrRacket is very long.
You cannot simulate the Gimp API: so all functions beginning with "gimp-" do not work.

Try DrRacket to learn the basic primitives of Scheme. DrRacket has a classical debugger
If you select for example "let*" then press F1, there is a contextual help online

Visual Studio or VScode could edit .scm source file: search "scheme" in the free extensions to color the keywords.

I prefer Notepad++ menu "Language" > "Scheme" because the loading of the editor is faster.
Ctrl+Alt+B on the closing parenthesis selects the entire Scheme expression until the corresponding open parenthesis.
It is very useful to copy and paste a call to a function and its parameters in the console.

In all cases, only the Script-Fu console must be used to run Script-Fu source code .scm

Running remotely Gimp as a Script-Fu server from the client NotePad++ or VScode is out of the scope of this post.
Gimp menu "Filter" > "Script-Fu" > "Start Server..." :ninja


Top
 Post subject: Re: Error: car: argument 1 must be: pair
PostPosted: Thu Apr 27, 2023 8:34 pm  (#26) 
Offline
GimpChat Member

Joined: Dec 27, 2022
Posts: 22
AlSchemist wrote:
I cannot reproduce the following issue with art type "Banner" index 2 in KodiSave 1.4
Try to indicate more context such as full path of picture, states of each element of the KodiSave dialog box.

Error: car: argument 1 must be: pair

Run the Script-Fu console by "Filters" > "Script-Fu" > "Console" (Alt+R S C).

The function car retrieves the first element of a given list such as '("root" "png")
(car '("root" "png"))

"root"

Let us remove manually the first element. The list becomes '("png")
(car '("png"))

"png"

Let us remove again the first element. The list becomes empty '()
(car '())

Error: car: argument 1 must be: pair :gaah
In other words, car does not like the empty list.

In KodiSave 1.4, I mainly introduced car in KodiSkinPath in the affection of the local variable strFanArt of type string.
(strFanArt   (car (strbreakup (number->string intFanArt 10) ".")))

You cannot directly run this affection.
But try to run the examples in comment starting with ";" above the define such as the last one:

Do not copy the ";" but after from the opening parenthesis until the corresponding closing parenthesis.
(KodiSkinPath "C:\\Movies\\Aliens (1986)" "Aliens (1986)" 7 5.1)

"C:\\Movies\\Aliens (1986)\\Aliens (1986)-fanart5.jpg"
It does not matter if the path exists or not.
The expected result is also supplied as a comment before the define.

Try to reproduce your own context about:
  • your path of picture. Do not forget to double backslash in Windows;
  • your art type banner has for index 2 instead of fanart at 7;
  • fanArtNbr should be 0 but indicate the real number of the spinner.


I have found the reason but not sure the fix.

I open gimp, images located in "C:\Users\chris\Desktop\Kodi\1883 (2023)", load image file 1, load image file 2, merge 1 and 2 into template (banner > local template to me 1000x185)... click on KodiSave... "Error: car: argument 1 must be: pair"

Now, if I do a File > Save As > Whatever.xcf

Return and Click "KodiSave".... select banner > works as it did before......all good.

So something strange with the initial save aspect??

I am using your info about debugging in console to trace, some things I can see/understand, many of the things I try I get:

> PathInfoPic
#<CLOSURE>


Top
 Post subject: Re: Shortening mouse/keystrokes save/export script or method to implem
PostPosted: Thu Apr 27, 2023 8:59 pm  (#27) 
Offline
GimpChat Member

Joined: Dec 27, 2022
Posts: 22
I got how to reproduce error, using method I described above.

It works with a single layer, 2 layers, 3 layers > crash (I assume it will also crash on 5, 7, 9, 11 or any other odd number of layers)

Ok, so I open image 1 (Tab1)
Open image 2 (Tab 2)
Create new image (Tab 3 Blank > Dimensions I am using 1000x185 > Should not matter)

Tab 1, select all, Copy, Paste as new layer into Tab 3
Tab 2, select all, Copy, Paste as new layer into Tab 3

Kodisave with Tab 3 Active > Click > must be: Pair error

I have to do the method this way because in order to create a "banner" for Kodi, I need a Main background image of the movie/tv show itself, I use the "clearlogo.png" of the movie/tv show, those two items are combined in Tab 3 using predefined template dimensions of 1000x185 pixel requirements set by Kodi and I use for all banner creation so I don't have to think about it and reduces setup and keystroke entries etc.

So it seems the script is trying to do something in pairs vs the active tab layer when it is active.

I "think" that is were the issue is, but I can't seem to follow the scheme code to try and adjust it. I will continue to look at it.

As a note, 1.2 didn't have this issue. 1.3 is missing in this thread as it was over written by 1.4. So I can't verify 1.3, I am looking to see if I saved a backup copy somewhere so I can test that to see where the issue come in.

Hopefully this helps give some insight??

Best,
Chris


Top
 Post subject: KodiSave 1.5 untitled image
PostPosted: Fri Apr 28, 2023 3:44 pm  (#28) 
Offline
GimpChat Member
User avatar

Joined: Oct 23, 2021
Posts: 67
Great description, Chris! :bigthup

:drum KodiSave 1.5 untitled image :drum

See in page 2 the updated source code 1.5. :mrgreen:

kittmaster wrote:
images located in "C:\Users\chris\Desktop\Kodi\1883 (2023)", load image file 1, load image file 2, merge 1 and 2 into template (banner

So merge 1 and 2 should be in the same folder than the last loaded image 2.

kittmaster wrote:
Create new image

This the new operating mode.
In all previous screen captures in page 1-2, the first step was a drag-and-drop: so the target picture had always a title.

When you create a new picture, the image has not yet been saved and its title is: "Untitled":

Attachment:
Untitled.png
Untitled.png [ 139.58 KiB | Viewed 609 times ]


KodiSave 1.5 introduces the new function SearchFilename starting from the target image having merge 1 and 2.
If the filename is empty, SearchFilename searchs in the vector of all loaded images then choose the last loaded image having a non empty filename.

Attachment:
Banner.png
Banner.png [ 164.44 KiB | Viewed 609 times ]

In our case, it is picture 2 with a green frame.

The SearchFilename code begins to be complex with three levels of let* :shock: including a loop in the vector of image id.


Top
 Post subject: How to debug the car issue?
PostPosted: Fri Apr 28, 2023 3:54 pm  (#29) 
Offline
GimpChat Member
User avatar

Joined: Oct 23, 2021
Posts: 67
How to debug the car issue?

(tracing 1)

enabled the very very long trace of all functions ended by (car '()) ; first element of the empty list generated the fatal error.

After the error, never forget to restore the disabled trace by:
(tracing 0)


The bug was in PathInfoPic: the fullname of an untitled image was the empty string. :oops:
Spliting the empty fullname removing each DIR-SEPARATOR generated ("").
Removing the filename from lstPath generated the empty list ().
Rebuilding the path without the filename caused the fatal error in unbreakupstr. :roll:
This function is provided in C:\Program Files\GIMP 2\share\gimp\2.0\scripts\script-fu-compat.init
And, until now, I did not know that unbreakupstr could include the call of car.

The fun of the story is that, in 1.5, I instrumented KodiSave replacing all calls of car by a debug version named carDbg.
carDbg does exactly what car does but if the list is empty, carDbg displays the running context: the caller and one of its parameter.
In fact, carDbg never fired the fatal error since it was in :shoot unbreakupstr :arrowshoot outside KodiSave.


Last edited by AlSchemist on Fri Apr 28, 2023 4:17 pm, edited 1 time in total.

Top
 Post subject: Welcome to Lisp
PostPosted: Fri Apr 28, 2023 4:02 pm  (#30) 
Offline
GimpChat Member
User avatar

Joined: Oct 23, 2021
Posts: 67
Welcome to Lisp

kittmaster wrote:
PathInfoPic

#<CLOSURE>

The notion of closure is relative to an environment and the scope of variables.
Is the function PathInfoPic a closure? :geek:
(closure? PathInfoPic)

#t

Is the function PathInfoPic a procedure? :yesnod
(procedure? PathInfoPic)

#t

Retrieving the Lisp code of a closure as lambda expression:
(get-closure-code PathInfoPic)

(lambda (img) (let* ((fullname (SearchFilename img)) (lstPath (strbreakup fullname DIR-SEPARATOR)) (lstDir (reverse (cdr (reverse lstPath)))) (path (unbreakupstr lstDir DIR-SEPARATOR)) (filename (carDbg (last lstPath) 'PathInfoPic2 lstPath)) (lstFile (strbreakup filename ".")) (basename (carDbg lstFile 'PathInfoPic3 filename)) (filExt (carDbg (last lstFile) 'PathInfoPic4 filename))) (vector path basename filExt)))

Is the function car a procedure?
(procedure? car)

#t

However car is not a closure: :geeking
(closure? car)

#f

One cannot retrieve the Lisp code of car since it is a basic primitive. ;)
(get-closure-code car)

#f


Top
 Post subject: Re: Shortening mouse/keystrokes save/export script or method to implem
PostPosted: Fri Apr 28, 2023 8:31 pm  (#31) 
Offline
GimpChat Member

Joined: Dec 27, 2022
Posts: 22
Just tried 1.5, works exactly as expected!! :)

You asked about what additional code could be added and now that everything is sorted, there is another helpful feature set within Kodi to operate on.

Everything thus far has been for "Movies" and its file and folder requirements.

The other major side to Kodi is "TV Shows" and these follow the same type of artwork methods but the folder structuring is a bit different because of the way "Seasons" are handled. Where Movies is a one off in terms of the movies folder naming and location of the art, TV Shows share a hybrid of this with some minor variation and some conditionals.

In the world of Kodi, most structure their files in a root directory. In my case X.

So, my folder structure looks like the images attached below: >>

Using the images as a guide:

--There are no needs for the .actors folders as those are scraped by the media program and placed automatically.

--The fanartXX images you can see follows movies, but it is added to a folder that needs to be created called extrafanart

--The poster, characterart, clearart, fanart, folder, landscape, poster are of the MAIN SERIES overview and remains in the TV Show named folder

--The root of the TV Show folder itself contains the seasons artwork... with the caveat that the season numerical number requires the leading zero to allow Kodi and the media program to match and display the artwork correctly.

Everything else is derived via the media creator program like the nfo, trailer, etc etc.

So that is the additional feature adds that would be nice to haves if you're up to adding them in. As it stands, the engine script you created can be used and clean up can be done manually if you have reach the end.


Let me know your thoughts?

Thanks again for taking the time... truly awesome work.

Chris


Attachments:
File comment: TV Show folder Root within Root folder called "TV Shows"
Root.png
Root.png [ 144.12 KiB | Viewed 660 times ]
File comment: Fanart
fanart.png
fanart.png [ 83.72 KiB | Viewed 660 times ]
File comment: Seasons
Season.png
Season.png [ 144.91 KiB | Viewed 660 times ]
Top
 Post subject: Re: Shortening mouse/keystrokes save/export script or method to implem
PostPosted: Sat Apr 29, 2023 5:53 am  (#32) 
Offline
GimpChat Member

Joined: Dec 27, 2022
Posts: 22
I was looking at a diff of what has been done via 1.4 vs 1.5, yeah, I would have not gotten this far. When we get to the finish line, I'll be buying you a coffee.

Best,
Chris


Top
 Post subject: Introducing Kodi 20.1 code-named Nexus
PostPosted: Sun Apr 30, 2023 10:33 am  (#33) 
Offline
GimpChat Member
User avatar

Joined: Oct 23, 2021
Posts: 67
For the newbies who are discovering this thread directly from this page 4:

Introducing Kodi 20.1 code-named Nexus
Attachment:
KodiNexus20_1.jpg
KodiNexus20_1.jpg [ 102.74 KiB | Viewed 650 times ]

Credits: "Big Buck Bunny (2008)" by Sacha Goedegebure
a movie built using open-source softwares mainly in Blender but also Gimp.

kittmaster wrote:
While Kodi has a bad rap about illegal stuff, their charter changed. It really does a great job as a media server.

Kodi is available for download in the Microsoft Store searching the keyword "kodi".
This means that Kodi is a legal application for Windows 11, into the bargain Kodi is a free open-source application.
In fact, it is an empty container without any media. As the disclaimer says, "you should provide your own content".

When you run Kodi for the very first time:
Kodi wrote:
Your library is currently empty. In order to populate it with your personal media, enter "Files" section,
add a media source and configure it. After the source has been added and indexed you will be able to browse your library.

Kodi presents two buttons:
  • "Enter files section"
  • "Remove this main menu item"

However, the user could not want that Kodi scans the hard disk or remove anything including "This main menu item".
So the user should think to a third alternative pressing the keyboard Escape key "ESC".

The Graphical User Interface is enought giant to be piloted remotely from a couch. :popcorn

What is amazing in Kodi is that the medias supported by Kodi include more than movies and pictures such as:
  • radio;
  • weather forcasting;
  • old games if you already bought the hardware such as an old Amstrad: software emulator is legal but not downloading any copyrighted ROMs.
Like Gimp, Kodi plug-ins are written in the :bowdown Pythonesque "language of the third millenium". :huh
Nowadays, it should better be called the Artificial Intelligence's language for datascientists :santa
like was the prehistoric old-fashioned Lisp --including :lp Script-Fu-- in the years where you was not even born.


Last edited by AlSchemist on Sun Apr 30, 2023 12:16 pm, edited 2 times in total.

Top
 Post subject: Kodi TV Shows Save 1.7
PostPosted: Sun Apr 30, 2023 11:04 am  (#34) 
Offline
GimpChat Member
User avatar

Joined: Oct 23, 2021
Posts: 67
:drum Kodi TV Shows Save 1.7 :drum
Attachment:
KodiSave.scm [27.77 KiB]
Downloaded 10 times

Script-Fu-based KodiSave is a Gimp 2.10.34 plug-in that allows to save untitled image composed with multiple layers in both .xcf and .png or .jpg on option:
in the two last cases, the layers are merged automatically.
Contrary to the legacy Gimp menu "File" > "Save", you are not asked to provide:
  • a folder since the target folder comes from the last loaded image copied as layer in the target image;
    KodiSave never creates any folder. The target folder must already exist.
  • a filename because it is deduced from miscellaneous options in the dialog box.

Two menus are added in the Gimp "File" menu:
  1. "Kodi Movie Save" (Alt+F K) compatible KodiSave 1.5
  2. "Kodi TV Show Save" (Alt+F V) introduced in KodiSave 1.6
    If you do not wish the "season" prefix, do not check one of the two checkboxes.

Attachment:
DlgBoxSave.png
DlgBoxSave.png [ 290.22 KiB | Viewed 583 times ]

Credits: _GamerOfThrone1.png and 2 have been created from scratch using the online AI-based Microsoft Designer then Gimp. :paint
Microsoft Designer wrote:
Describe the design you'd like to create

Enter a textual prompt such as:
Title "Gamer of Throne" in medieval font

Other prompts could include the keyword "sword" for the letter "T" of Throne.

The online web editor allows to improve the design until you reach your goal.
Microsoft Designer is free to use. This web application has been released in April 2023.
______________

Comparing Microsoft Designer with Bing image creator :sfight

The Artificial Intelligence-based free Bing image creator :paint2 requires a free Microsoft account.
Contrary to OpenAI ChatGPT and Dall-E that require a phone number, :snap
to create your Microsoft account, you only need an email and another email to confirm the first one.
You may wish to create these two emails on purpose for your Microsoft account in two different free providers.
Caution: all your textual prompts and generated pictures by Bing Image Creator are recorded in your Microsoft account.

In both Bing Image Creator and Microsoft Designer, the created design could be improved step-by-step. :present
However with Microsoft Designer, you can select each part of the design such as a title to modify it like a layer in Gimp.
In Bing Image Creator, consider the layers as merged.


Last edited by AlSchemist on Sun May 07, 2023 8:13 am, edited 6 times in total.

Top
 Post subject: Kodi TV Shows Save 1.7 usage
PostPosted: Sun Apr 30, 2023 11:47 am  (#35) 
Offline
GimpChat Member
User avatar

Joined: Oct 23, 2021
Posts: 67
Kodi TV Shows Save 1.7 usage
Attachment:
SavingXcf-Jpg.png
SavingXcf-Jpg.png [ 286.8 KiB | Viewed 588 times ]

kittmaster wrote:
The root of the TV Show folder itself contains the seasons artwork... with the caveat that the season numerical number requires the leading zero to allow Kodi and the media program to match and display the artwork correctly.

  1. Open image 1 from anywhere.
  2. Open image 2 from the top level folder of a TV show.
  3. Create a new image: this is the empty target in which you can copy completely or partialy image 1 and 2 as layers.
    Opening image 2 directly as layer in the new target image --skipping step 2-- is an unsupported operating mode.
  4. Gimp menu "File" > "Kodi TV Show Save" (Alt+F V)

Beware when you close image opened from the hard disk. :sneak
If you can close image 1 or not at any time after the paste in the target,
while the empty target has the "Untitled" title,
be sure to keep open the last image 2 used to compose the target even after the paste in the target.

kittmaster wrote:
The fanartXX images you can see follows movies, but it is added to a folder that needs to be created called extrafanart

When you select the new "extrafanart" art type in the pulldown menu of the save dialog box, :grinyes
the empty image is saved with the traditional "fanart" suffix without "extra"
as suggested in your above fanart.png screen capture.

So, in Scrip-Fu KodiSave.scm, keep equal the length of vectors vKodiMvArtSuf, vKodiMvOvrlay and the new vKodiTvArtSuf. :grphug

kittmaster wrote:
There are no needs for the .actors folders as those are scraped by the media program and placed automatically.

For example, do not optimize removing "actor" from vKodiTvArtSuf because it is not used. :nono

KodiSave never reads and never modifies the XML-based .nfo generated by Kodi. :fishing


Last edited by AlSchemist on Sun May 07, 2023 7:11 am, edited 1 time in total.

Top
 Post subject: Re: Shortening mouse/keystrokes save/export script or method to implem
PostPosted: Mon May 01, 2023 11:08 am  (#36) 
Offline
GimpChat Member

Joined: Dec 27, 2022
Posts: 22
Operationally 1.6 is a looking sharp!

I ran through both sides and only a couple of minor operational changes if possible:

Movies:

Fanart Generation >

--if it is "fanart.jpg" only, no numbers, it remains in the Movies' root folder
--if it is "fanartXX.jpg, with any numbers, A new folder named "extrafanart" needs to be created within the Movies' root folder; inside folder "extrafanart" > each file as named: "Fanart 0.jpg", "Fanart 1.jpg", no movie title or year prefix.

Post image named -- fanart -- shows exactly description needed for modification:

viewtopic.php?f=8&t=20332&start=30#p279330

(I may have misspoken early on about this one, operationally script is solid, I may have had wrong path and naming identifiers/location incorrectly stated > assumed images spoke to that, my apologies)

If this can be corrected, Movies operation will be 100% complete.

TV Shows:

Fanart Generation:

-- Same issue as movies regarding creating "extrafanart" folder and definition listed in Movies Fanart Generation

-- Operational: Season spinner should only be applied to images "Poster", "Banner", & "Landscape" and locked out for all other options.

-- Name generation Seasons: When season spinner is applied to the 3 images defined, there should be no movie title or year and those files remain in the root of the TV Show they belong to. Refer to the same link as movies and review "killing eve", you will find season01-landscape.jpg, season01-poster.jpg, season01-banner.jpg, season01-poster.jpg........ and so on.

=End operational feedback=

With the amount of work you've done thus far, I am making the leap that some of these changes should be trivial, if I am incorrect, I apologize :yr

I am going to see if I can make some of the changes just to see if I can manage tweaks, but I still can't get my head around the language.... :otb

I usually work in a sandbox so all of this is NOT being tested on my Live NAS files, so it gives me good confidence to test and try and break any of it and not worry there could be an issue. This method will allow me to take the end results of what your script is generating and being able to just copy the movie or TV Show root folder, and paste it onto the live server where all of the files, names, and folder structure will be identical to what Kodi expects.

I say that only because I know that if anyone who decides to use this script and are mavericks.....will try to use on their live server, so their end result will work as expected.....if they sandbox or not..... so that is part of the reason I'm trying to make this as 100% compliant as possible for both types of users.

Your work is outstanding, thanks for all to date! :tyspin

:clap


Top
 Post subject: Re: Shortening mouse/keystrokes save/export script or method to implem
PostPosted: Mon May 01, 2023 1:31 pm  (#37) 
Offline
GimpChat Member

Joined: Dec 27, 2022
Posts: 22
I have did a minor tweak to the season selection, I did a search and wiki comes back with "The simpsons" as the longest ever running series at 34 seasons and no end in sight. So I adjusted the array for another 16 years to 50 and the -all for the "all seasons poster" option as well. It appears to work here, please add this to your source and see if it is ok for you as well.

Regards,
Chris


; Season selector:0   1    2    3    4    5    6    7    8    9    10   11   12   13   14   15   16   17   18   19   20   21   22   23   24   25   26   27   28   29   30   31   32   33   34   35   36   37   38   39   40   41   42   43   44   45   46   47   48   49   50   51
(define vSeason #(" " "01" "02" "03" "04" "05" "06" "07" "08" "09" "10" "11" "12" "13" "14" "15" "16" "17" "18" "19" "20" "21" "22" "23" "24" "25" "26" "27" "28" "29" "30" "31" "32" "33" "34" "35" "36" "37" "38" "39" "40" "41" "42" "43" "44" "45" "46" "47" "48" "49" "50" "-all"))





Top
 Post subject: Kodi fanart0
PostPosted: Mon May 01, 2023 3:24 pm  (#38) 
Offline
GimpChat Member
User avatar

Joined: Oct 23, 2021
Posts: 67
Hi, Chris.
You have a very big screen to accept such a giant pulldown listbox! :shock:

In #16, you wrote:
If 0, then fanart.jpg, 1 fanart1.jpg, 2 fanart2.jpg......and so on.

So fanart0.jpg could not exist.

In #36, you wrote:
--if it is "fanart.jpg" only [...]
--if it is "fanartXX.jpg, [...] "Fanart 0.jpg", "Fanart 1.jpg", no movie title or year prefix.

Not only "fanart 0.jpg" :hoh exists but you introduced a whitespace before the "0" that is not visible in your screen capture.
Make generic rules independently of type of folders in order to keep the code generic, short and understandable for you and the readers.

By the way, "trivial" and "apologize" do not help me. :roll:

Anyway, thanks to your thread, the readers could discover the Kodi media center! :hi5


Top
 Post subject: Re: Shortening mouse/keystrokes save/export script or method to implem
PostPosted: Mon May 01, 2023 4:34 pm  (#39) 
Offline
GimpChat Member

Joined: Dec 27, 2022
Posts: 22
Yes, very large screen...LOL! But it covers all bases/conditions... and I have found that I am usually "hovering" mouse over spinner and then using wheel to increment... but yes, I agree, having very large drop down is not ideal. Only other option I would think is an input text box?? Spinner and Text Box? Seems ok as is unless you find a different control to ease this issue.

I did not mean to introduce a white space on fanart0.jpg, the XX was to denote a dual place holder. Only Seasons need the leading zero. If you note images in the referenced post, you can see it is fanart0, fanart1... while seasons are season01, season02... I do understand it creates confusion, Kodi seems to be very picky on format. The images that I posted are direct data rendition from the live server, so that is the primer.

I do realize that they don't help, I am only conveying the idea that I'm not trying to create more work due to me missing what could have been an important piece of information. I will refrain and understand.

Kodi by todays standards with all of the skins it supports actually replaced Serviio media server (for me personally) which I was using due to all the artwork and visual impact it creates. Kodi also can be installed on most FireTV devices like 4K Max & cube.... not to mention PC, MAC, Linux and both mobile platforms. You can move your libraries between systems to keep them in sync...pretty wild stuff. :)

Best,
Chris


Top
 Post subject: Kodi TV Shows Save extrafantart 1.7
PostPosted: Sun May 07, 2023 7:24 am  (#40) 
Offline
GimpChat Member
User avatar

Joined: Oct 23, 2021
Posts: 67
Kodi TV Shows Save extrafantart 1.7

Download KodiSave.scm from the above post #34.

KodiSave 1.7 Line: 536 define: 16 comment: 210 = 39.1% blank: 94
KodiSave 1.6 Line: 288 define: 12 comment:  84 = 29.1% blank: 16

Saving Kodi skins has a tree of folders of a big complexity. :faint
At the top level, you can save Movie or TV Show but also probably more
like in a chess game after the opening of the White pawn of the King: 1. e4
vs. the advance of the White pawn of the Queen: 1. d4

At the next level, you have a branching factor of 14 :evilgrin corresponding to each art type
like the different answers of Blacks in chess such as Sicilian 1... c5 after 1.e4

However depending of the top level choice, there are miscellaneous differences
between the art type of movie vs. those of tv show such like movie "fanart" vs tv show "extrafanart". :tomduck
Rules are unregular: fanart0 does not exist in movie but exist in tv show. :gaah

The notion of seasons introduces a new dichotomy in the root of a tv show.
The numerical season number has a leading zero but not the fanart.
Into the bargain, season suffix could include "-all" instead of the season number. :mcof


Last edited by AlSchemist on Mon May 08, 2023 5:11 am, edited 1 time in total.

Top
Post new topic Reply to topic  [ 42 posts ]  Go to page Previous  1, 2, 3  Next

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Attachment(s) CanNot Move object (Mouse Action Blocked) via mouse cursor Rotate Icon

6

No new posts Attachment(s) Batch export all opened images script for GIMP [Update]

13

No new posts CMYK student is going to implement non-destructive filters soon

0

No new posts Where did GIMP save my file, & how do I change default save location

5

No new posts Attachment(s) A New 3D Text Method

7



* Login  



Powered by phpBB3 © phpBB Group