*.strm file ordening in folders

Support for Windows 10 users and the Microsoft Store package
Post Reply
mrrepel
Posts: 10
Joined: 12 Jul 2019, 17:26

*.strm file ordening in folders

Post by mrrepel » 12 Jul 2019, 18:00

Hi all,

I have a Emby backend with Kodi frontend witch uses the following structure for TV episodes:

Code: Select all

\TV
    \Glee (2009)
       \Season 1
          Glee S01E01.strm
          Glee S01E02.strm

 \TV
    \Seinfeld (1989)
       Seinfeld S01E01.strm
       Seinfeld S01E02.strm
I have acces to about 7000 series .strm files but these are not in the directories like Emby likes it, they are all in one directory. The strm files are as follows:

Code: Select all

13 Reasons Why S01 E01.strm
13 Reasons Why S01 E02.strm
etc.

In the file is the correct link to the stream:
http://XXXXXX/10338.mp4
http://XXXXXX/10343.mp4
etc.

I would like to use Filebot to make a directory structure from these strm files and rename these (without the space in Season and Episode). Is this possible with filebot in combination with strm files ?

Thanx and greets

mrrepel
Posts: 10
Joined: 12 Jul 2019, 17:26

Re: *.strm file ordening in folders

Post by mrrepel » 12 Jul 2019, 19:09

Never mind, looks i was using an old version. I think i found the trick :-)

User avatar
rednoah
The Source
Posts: 16765
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: *.strm file ordening in folders

Post by rednoah » 13 Jul 2019, 03:41

1.
FileBot treats *.strm files just like any other *.mkv or *.mp4 files, so you should be able to process files as usual.


2.
If you just want to replace " " with "." then no series / episode identification is needed, and you can rename files instantly with Plain File Mode / Generic File Mode and a format such as this:

Code: Select all

{fn.space('.')}
:idea: viewtopic.php?f=3&t=2072
:idea: Please read the FAQ and How to Request Help.

mrrepel
Posts: 10
Joined: 12 Jul 2019, 17:26

Re: *.strm file ordening in folders

Post by mrrepel » 13 Jul 2019, 06:51

Hi,

Thanx for the reply. Yesterday i used this option with the match function:

Code: Select all

C:\streamlist\{kodi}
This puts the files in the folders and renames the strm files. This process takes quite a while and the program crashes when i use more than 500 files at once.

Is it possible to use the {kodi} naming scheme in the renaming option so it doesn't use as mutch resources ? Emby "matches" the files with an provider. When i put it in the renaming option i get

Code: Select all

Binding "kodi": java.lang.NullPointerException
For example i would like to:


let Filebot use all information "An American Murder Mystery The Staircase" (up to the S01 E04) as "n"
Create file in a folder "n"
Create a folder in this folder "season "s"
rename the original file to "n" "e" en put this in the folder "season s"

Greets

User avatar
rednoah
The Source
Posts: 16765
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: *.strm file ordening in folders

Post by rednoah » 13 Jul 2019, 07:23

1.
FileBot crashes? Or is there just an error message? What does the log say? Is there console output when it crashes?

Please provide more system information:
viewtopic.php?f=3&t=1868


2.
If you want to use {plex} or {kodi} or any other Episode binding, then you will need to let FileBot match each file to the corresponding online Episode data, as per usual:
https://www.filebot.net/getting-started/


:?: Do you want to match files to TheTVDB data and then organize accordingly? (i.e. standard FileBot usage)


:?: Do you want to rename and organize files based on locally existing information only without talking to online databases? (i.e. non-standard FileBot usage; more complicated; not recommended unless you know what you're doing)
:idea: Please read the FAQ and How to Request Help.

mrrepel
Posts: 10
Joined: 12 Jul 2019, 17:26

Re: *.strm file ordening in folders

Post by mrrepel » 13 Jul 2019, 07:56

Hi,

As of the crash:

Code: Select all

Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space
        at java.desktop/sun.java2d.SunGraphics2D.clone(SunGraphics2D.java:310)
        at java.desktop/sun.java2d.SunGraphics2D.create(SunGraphics2D.java:344)
        at java.desktop/javax.swing.JComponent.paintComponent(JComponent.java:795)
        at java.desktop/javax.swing.JComponent.paint(JComponent.java:1074)
        at java.desktop/javax.swing.JComponent.paintToOffscreen(JComponent.java:5255)
        at java.desktop/javax.swing.RepaintManager$PaintManager.paintDoubleBufferedImpl(RepaintManager.java:1643)
        at java.desktop/javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(RepaintManager.java:1618)
        at java.desktop/javax.swing.RepaintManager$PaintManager.paint(RepaintManager.java:1556)
        at java.desktop/javax.swing.RepaintManager.paint(RepaintManager.java:1323)
        at java.desktop/javax.swing.JComponent._paintImmediately(JComponent.java:5203)
        at java.desktop/javax.swing.JComponent.paintImmediately(JComponent.java:5013)
        at java.desktop/javax.swing.RepaintManager$4.run(RepaintManager.java:865)
        at java.desktop/javax.swing.RepaintManager$4.run(RepaintManager.java:848)
        at java.base/java.security.AccessController.doPrivileged(Native Method)
        at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
        at java.desktop/javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:848)
        at java.desktop/javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:823)
        at java.desktop/javax.swing.RepaintManager.prePaintDirtyRegions(RepaintManager.java:772)
        at java.desktop/javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1890)
        at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
        at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:770)
        at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
        at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
        at java.base/java.security.AccessController.doPrivileged(Native Method)
        at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
        at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:740)
        at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
        at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
        at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
        at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
        at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
        at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
OutOfMemoryError: Java heap space
java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError: Java heap space
My processor maxes out and it uses +/- 2500mB of memory (i7-3630QM @2,4Ghz / 8GB ram). I use Windows 10 and the package from the site.

As of the question, i would like to rename and organize the files locally with the on the title / season / episode information in the title from the strm file without using TheTVDB matching. Matiching happens with Emby and i just need the files to be:

Code: Select all

\TV
    \Glee (2009)
       \Season 1
          Glee S01E01.strm
          Glee S01E02.strm
Greets

User avatar
rednoah
The Source
Posts: 16765
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: *.strm file ordening in folders

Post by rednoah » 13 Jul 2019, 08:53

1.
Please run filebot -script fn:sysinfo and post the output.


2.
That is strange. It's just a few thousands files so it's not really that many.

:idea: Try setting the JAVA_OPTS environment variable to -Xmx7g to set max memory to 7 GB. It shouldn't really need a crazy amount like that in the first place, but maybe it's a quick fix to make it work.


3.
What is the file folder structure you have? Plain File Mode works by taking bits and pieces from the current file path to generate the destination file path, so it's a bad idea if your current file structure is random.


EDIT:

I see your OP contains some example file paths. I'll have a look.
:idea: Please read the FAQ and How to Request Help.

User avatar
rednoah
The Source
Posts: 16765
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: *.strm file ordening in folders

Post by rednoah » 13 Jul 2019, 09:13

e.g. Plain File Mode


Input File Path:

Code: Select all

13 Reasons Why S01 E01.strm

Plain File Format:

Code: Select all

E:/Emby/TV Shows/
{
	def n = fn.before(/S\d+/)            /* take whatever comes before S00 from the filename */
	def s = fn.match(/S(\d+)/) as int    /* take the S00 number from the filename */
	def e = fn.match(/E(\d+)/) as int    /* take the E00 number from the filename */
	"$n/Season $s/$n S${s.pad(2)}E${e.pad(2)}"
}

Output File Path:

Code: Select all

E:/Emby/TV Shows/13 Reasons Why/Season 1/13 Reasons Why S01E01.strm
:idea: Please read the FAQ and How to Request Help.

mrrepel
Posts: 10
Joined: 12 Jul 2019, 17:26

Re: *.strm file ordening in folders

Post by mrrepel » 13 Jul 2019, 13:55

Hi,

Thanks again. I will try it this evening. As for the output:

Code: Select all

FileBot 4.8.5 (r6224)
JNA Native: 5.2.2
MediaInfo: 18.12
7-Zip-JBinding: 9.20
Chromaprint: fpcalc version 1.4.2
Extended Attributes: OK
Unicode Filesystem: OK
Script Bundle: 2019-05-15 (r565)
Groovy: 2.5.6
JRE: OpenJDK Runtime Environment 11.0.2
JVM: 64-bit OpenJDK 64-Bit Server VM
CPU/MEM: 8 Core / 1 GB Max Memory / 39 MB Used Memory
OS: Windows 10 (amd64)
Package: MSI
License: FileBot License PXXXXX (Valid-Until: 2020-07-19)
Done ?(?????)?

mrrepel
Posts: 10
Joined: 12 Jul 2019, 17:26

Re: *.strm file ordening in folders

Post by mrrepel » 13 Jul 2019, 14:31

Couldn't wait :-) It works perfect ! Thanx for the support !! With renaming no crashes and works very fast.

mrrepel
Posts: 10
Joined: 12 Jul 2019, 17:26

Re: *.strm file ordening in folders

Post by mrrepel » 20 Oct 2019, 11:12

I am feeling really dumb right now.....

I want to do this again and have set the "edit preferences". Then i load the files in the left screen and want to click "rename". I get an error "nothing to rename, use Fetch data first". I've been trying it for an hour but know that i dont have to use the Fetch for the renaming. What am i forgetting ?

Greetz

Barry

User avatar
rednoah
The Source
Posts: 16765
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: *.strm file ordening in folders

Post by rednoah » 20 Oct 2019, 15:20

Please post screenshots and or file paths.
:idea: Please read the FAQ and How to Request Help.

mrrepel
Posts: 10
Joined: 12 Jul 2019, 17:26

Re: *.strm file ordening in folders

Post by mrrepel » 20 Oct 2019, 16:07

Image

Image

Image

mrrepel
Posts: 10
Joined: 12 Jul 2019, 17:26

Re: *.strm file ordening in folders

Post by mrrepel » 20 Oct 2019, 16:38

Found something with F2. This puts the files in the second window. After clicking rename it says the files are renamed, but i don't see the output on the location specified.

Image

pressing rename says it renamed the files:
Image

the script used is

Code: Select all

C:/Emby/TV Shows/
{
	def n = fn.before(/S\d+/)            /* take whatever comes before S00 from the filename */
	def s = fn.match(/S(\d+)/) as int    /* take the S00 number from the filename */
	def e = fn.match(/E(\d+)/) as int    /* take the E00 number from the filename */
	"$n/Season $s/$n S${s.pad(2)}E${e.pad(2)}"
}

User avatar
rednoah
The Source
Posts: 16765
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: *.strm file ordening in folders

Post by rednoah » 21 Oct 2019, 14:20

If New Names is empty, then nothing will happen. You may have loads a list of files into FileBot, but you have not yet provided any matches that can be used to format a destination file path.


Pressing F2 is part of using Generic File Mode:
viewtopic.php?t=2072


:idea: Instead of matching the file with an Episode / Movie object, you just match it with the original File object, and then transform that to the destination format you want.


:idea: The Image icon indicates that original file path / new file path is exactly the same, meaning that files are already where you want them to be (as specified by your format).
:idea: Please read the FAQ and How to Request Help.

mrrepel
Posts: 10
Joined: 12 Jul 2019, 17:26

Re: *.strm file ordening in folders

Post by mrrepel » 02 Nov 2019, 10:13

Thanx, using the right window and double clicking the file did the trick. Now i can place the new format there and it works super !

Post Reply