2023-08-03, 20:22
I am looking for some help as I've been tried to figure out a way to deal with videos that have different file names but need to be combined in to 1
Kodi can take videos with filename called:
And stack them successfully. That's no problem.
but I have videos with descriptions on the end that I want to retain to but have kodi combine them by finding pt1, pt2, pt3 in the file name despite the names not matching 100%
I am trying to figure out a way to just get kodi to look at folder for the title, then detect "pt#" in the filename and stack them but I can't seem to figure out how to do that. I don't want to change the filenames as in the first example as I still want to be able to view them individually outside of kodi and the file name helps with the description. Ideally, it would behave like having to wild cards in the filenames bookending the part number.
I am not an XML or regex expert. Information I find online for syntax has a very technical explanation that I don't quite understand as a non-programmer. I've been utilizing advancedsettings.xml to try to accomplish this, particularly this section: https://kodi.wiki/view/Advancedsettings....iestacking
I thought "*" was the character for a wildcard, so when I tried to throw a "*" after pt# it just caused kodi to freeze when it encountered the files in the scan. This is the default logic:
I don't quite know what (.*?) and ([ _.-] mean in this context
This tells me that it locates pt and has a wildcard for the numbers 0-9. That's all I can really extract from this bit, I'm not sure what the plus means at the end of the bracket for numbers, nor do I understand the syntax for "(.*?)(.[.]+)$" that comes after it.I want it to detect any video files in a particular folder and stack them according to pt1, pt2, pt3, somewhere in the filename and stack them despite the different filenames. It should be pulling the folder name.
Is this even possible?
Kodi can take videos with filename called:
Quote:videoname pt1.mp4
videoname pt2.mp4
videoname pt3.mp4
And stack them successfully. That's no problem.
but I have videos with descriptions on the end that I want to retain to but have kodi combine them by finding pt1, pt2, pt3 in the file name despite the names not matching 100%
Quote:videoname - pt1 - Intro.mp4
videoname - pt2 - Opening.mp4
videoname - pt4 - Intermission.mp4
videoname - pt5 - Ending.mp4
I am trying to figure out a way to just get kodi to look at folder for the title, then detect "pt#" in the filename and stack them but I can't seem to figure out how to do that. I don't want to change the filenames as in the first example as I still want to be able to view them individually outside of kodi and the file name helps with the description. Ideally, it would behave like having to wild cards in the filenames bookending the part number.
Quote:*wildcard*pt1*wildcard*
*wildcard*pt2*wildcard*
*wildcard*pt3*wildcard*
I am not an XML or regex expert. Information I find online for syntax has a very technical explanation that I don't quite understand as a non-programmer. I've been utilizing advancedsettings.xml to try to accomplish this, particularly this section: https://kodi.wiki/view/Advancedsettings....iestacking
Code block:<moviestacking>
<!-- <cd/dvd/part/pt/disk/disc> <0-N> -->
<regexp>(.*?)([ _.-]*(?:cd|dvd|p(?:ar)?t|dis[ck])[ _.-]*[0-9]+)(.*?)(\.[^.]+)$</regexp>
<!-- <cd/dvd/part/pt/disk/disc> <a-d> -->
<regexp>(.*?)([ _.-]*(?:cd|dvd|p(?:ar)?t|dis[ck])[ _.-]*[a-d])(.*?)(\.[^.]+)$</regexp>
<!-- movienamea-xvid.avi, movienameb-xvid.avi -->
<regexp>(.*?)([ ._-]*[a-d])(.*?)(\.[^.]+)$</regexp>
</moviestacking>
I thought "*" was the character for a wildcard, so when I tried to throw a "*" after pt# it just caused kodi to freeze when it encountered the files in the scan. This is the default logic:
I don't quite know what (.*?) and ([ _.-] mean in this context
Quote:(?:cd|dvd|p(?:ar)?t|dis[ck])[ _.-]*[0-9]
This tells me that it locates pt and has a wildcard for the numbers 0-9. That's all I can really extract from this bit, I'm not sure what the plus means at the end of the bracket for numbers, nor do I understand the syntax for "(.*?)(.[.]+)$" that comes after it.I want it to detect any video files in a particular folder and stack them according to pt1, pt2, pt3, somewhere in the filename and stack them despite the different filenames. It should be pulling the folder name.
Is this even possible?