It is currently Tue Jul 02, 2024 3:11 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: 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 669 times ]
File comment: Fanart
fanart.png
fanart.png [ 83.72 KiB | Viewed 669 times ]
File comment: Seasons
Season.png
Season.png [ 144.91 KiB | Viewed 669 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 659 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 11 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 592 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 597 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 subject: Regressing test campaign
PostPosted: Sun May 07, 2023 7:33 am  (#41) 
Offline
GimpChat Member
User avatar

Joined: Oct 23, 2021
Posts: 67
Regressing test campaign

To solve this complexity, KodiSave has short functions with more comments starting with ";" in green in Notepad++.
So a comment starting with "; (..." is a call of the function with a particular set of parameters.
The expected result is on the next line also as comment.
An empty line separates two consecutive regressing tests.
For example, in case the spinner :hexer returns a :2gun float number instead of an integer:
; (KodiMvPath "C:\\Movies\\Aliens (1986)\\fanart" "fanart" 7 5.5)
; "C:\\Movies\\Aliens (1986)\\fanart\\fanart6.jpg"

; (KodiMvPath "C:\\Movies\\Aliens (1986)\\fanart" "fanart" 7 5.1)
; "C:\\Movies\\Aliens (1986)\\fanart\\fanart5.jpg"


The usage is that you can copy-and-paste the string "(KodiMvPath "C:\\Movies\\Aliens (1986)\\fanart" "fanart" 7 5.5)"
without the double quotes in the Script-Fu console (Alt+R S C). Press Enter.
Script-Fu will reply: "C:\\Movies\\Aliens (1986)\\fanart\\fanart6.jpg"

A campaign of tests is now available before delivering a new version: :wizwand
; re-test SUCCESSFULLY ran 74 tests!

Regressing tests have been organized in 74 :shock: couples of example of call of function and
the expected result on the following line.

Erro mangement is included in the regressing tests: :rainumb
; (GenTvPrefix "C:\\TV Shows\\Gamer of Throne (2011)\\fanart" "fanart" idxThumb 0 1 1)
; Error: 6000 GenTvPrefix: season selector is only for banner, landscape and poster


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

Top
 Post subject: How to report a bug?
PostPosted: Sun May 07, 2023 7:46 am  (#42) 
Offline
GimpChat Member
User avatar

Joined: Oct 23, 2021
Posts: 67
How to report a bug?

Due to the amazing complexity, there will be probably some bugs you could discover.
However, instead of a screen capture of a bug,
try to learn, in priority, the two main generators of KodiSave full path of the image to be saved:
  1. (KodiMvPath path basename artTypeIdx fanArtNbr)
    calling (GenMvFilename basename artTypeIdx fanArtNbr)
  2. (KodiTvPath path basename artTypeIdx fanArtNbr isSeasonAll isSeasonNbr seasonNbr)
    calling (GenTvFilename leftPart basename artTypeIdx filExt strFanArt) and
    (GenTvPrefix path basename artTypeIdx isSeasonAll isSeasonNbr seasonNbr)
Parameters are explained in the source code and illustrated by the regressing tests. :umbsmile

In your post, between the tag "[code]" and its closing tag "[/code]", :yup
indicate the call of one of these functions with your own parameters that generates the bug. :pipe

The more you are able to describe the bug in the lowest level of those functions,
the more the bug would be easier to fix include by yourself! :cheers


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