2019-08-08, 02:33
In pre 3.x releases, the renamer video format token would return 4k for 4k videos. In 3.x, it returns 2160p. Is there a way to revert this behavior and have it return 4k instead?
(2019-08-08, 09:05)mlaggner Wrote: that has been changed upon a request to be uniform (https://gitlab.com/tinyMediaManager/tiny...issues/551). there is no way to switch that to the other way since we can either use 4k or 2160p. And our goal is to use a consistent styleI've been thinking of how to solve this myself...there is very little examples on using JMTE with the Renamer out there...but couldn't you achieve this with the following?
(2020-06-20, 08:08)EarthBoundX5 Wrote:(2019-08-08, 09:05)mlaggner Wrote: that has been changed upon a request to be uniform (https://gitlab.com/tinyMediaManager/tiny...issues/551). there is no way to switch that to the other way since we can either use 4k or 2160p. And our goal is to use a consistent styleI've been thinking of how to solve this myself...there is very little examples on using JMTE with the Renamer out there...but couldn't you achieve this with the following?
${if videoFormat = "2160p"}4K${else}${end}
I've tried it myself, but it doesn't seem to work...however, if I use ! or put 4K after else, it'll show 4K...so I know the Renamer is understanding the if statement, just maybe the data types for comparison are the problem? I tried using videoFormat.toString, videoFormat.toString(), and toString(videoFormat) with no luck...
(2020-06-20, 09:42)tars Wrote:You have single handled solved hours of headache for me...I hope OP sees this for themselves too.(2020-06-20, 08:08)EarthBoundX5 Wrote:(2019-08-08, 09:05)mlaggner Wrote: that has been changed upon a request to be uniform (https://gitlab.com/tinyMediaManager/tiny...issues/551). there is no way to switch that to the other way since we can either use 4k or 2160p. And our goal is to use a consistent styleI've been thinking of how to solve this myself...there is very little examples on using JMTE with the Renamer out there...but couldn't you achieve this with the following?
${if videoFormat = "2160p"}4K${else}${end}
I've tried it myself, but it doesn't seem to work...however, if I use ! or put 4K after else, it'll show 4K...so I know the Renamer is understanding the if statement, just maybe the data types for comparison are the problem? I tried using videoFormat.toString, videoFormat.toString(), and toString(videoFormat) with no luck...
This should work:
${foreach movie.videoFiles video}${if video.videoFormat = "2160p"}4K${else}${video.videoFormat}${end}${end}
(2020-06-20, 20:29)EarthBoundX5 Wrote:Well...maybe actually solved one headache and introduced another...(2020-06-20, 09:42)tars Wrote:You have single handled solved hours of headache for me...I hope OP sees this for themselves too.(2020-06-20, 08:08)EarthBoundX5 Wrote: I've been thinking of how to solve this myself...there is very little examples on using JMTE with the Renamer out there...but couldn't you achieve this with the following?
${if videoFormat = "2160p"}4K${else}${end}
I've tried it myself, but it doesn't seem to work...however, if I use ! or put 4K after else, it'll show 4K...so I know the Renamer is understanding the if statement, just maybe the data types for comparison are the problem? I tried using videoFormat.toString, videoFormat.toString(), and toString(videoFormat) with no luck...
This should work:
${foreach movie.videoFiles video}${if video.videoFormat = "2160p"}4K${else}${video.videoFormat}${end}${end}
I had no idea that I'd have to do a loop of videoFiles to get videoFormat in a way I could compare...since videoFormat is variable on it's own, I assumed it was that easy...
Thanks much!!
(2020-06-20, 20:59)EarthBoundX5 Wrote:(2020-06-20, 20:29)EarthBoundX5 Wrote:Well...maybe actually solved one headache and introduced another...(2020-06-20, 09:42)tars Wrote: This should work:You have single handled solved hours of headache for me...I hope OP sees this for themselves too.
${foreach movie.videoFiles video}${if video.videoFormat = "2160p"}4K${else}${video.videoFormat}${end}${end}
I had no idea that I'd have to do a loop of videoFiles to get videoFormat in a way I could compare...since videoFormat is variable on it's own, I assumed it was that easy...
Thanks much!!
I've confirmed it works, I can append it to the end of my current naming string...but as soon as I do anything with it, it stops working...like if I try to adjust for 2K or 8K instead...or if I put it in the middle of my naming...and then even if I just start over in the same session or even just use this alone, it doesn't work...it's like it triggers some failure in the application and stops handling anything, even after a restart of TMM...and then randomly, it'll work again...
Am I nuts?
What could be wrong with this?
${,movieSet.title,\}${title} ${- ,edition, }${foreach movie.videoFiles video}${if movie.videoFiles.videoFormat = "2160p"}- 4K ${else}${end}${end}${- ,3Dformat, }(${year})
${if movie.mainVideoFile.videoFormat = "2160p"}4k${else}${videoFormat}${end}
(2020-06-21, 07:48)mlaggner Wrote: you shouldn't do the loop in the rename because if your movies are splitted into more than 1 files, the token fill repeat. You could do the same thing with the undocumented fiel mainVideoFile
Code:${if movie.mainVideoFile.videoFormat = "2160p"}4k${else}${videoFormat}${end}