INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Help naming files  (Read 2663 times)

WeeHappyPixie

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 388
  • Gonnae no dae that..
Help naming files
« on: March 19, 2017, 07:46:05 am »

Hi Folks,

Looking for some help with dynamic naming.

I have 3 folders on my NAS which I use for movies. Movies, Movies 2 and Movies 3D.
I have auto import setup and this tags the files during import with the usual Movie sub type plus also 2 custom fields, HD (Yes/No) and 3D (Yes/No).

What I would like to do is to have MC automatically add some text to the name field after it has scraped the info for the movie.

Example: I copy the file Warcraft.mkv to Movies folder and Warcraft.mk3d to Movies 3D folder. Auto import runs and add's these two movies to my view and scrapes the movie info. I now end up with 2 movies called WarCraft in my all movies view. One standard 2D and one 3D.

I would like it to add the text 3D after the name so it automatically shows WarCraft 3D in the view.

I tried calling my 3D movie WarCraft 3D in it's filename and folder on my NAS but when it imports it wont scrape any info until I manually remove the 3D part of the name.

Sorry if this all sounds confusing and I haven't described it correctly. I'm not used to the naming commands within MC to dynamically name my movie.

Is this possible to do or will the dynamic rename just end up with the same result as me naming the file WarCraft 3D and scraping not working.

Thanks,

John
Logged

WeeHappyPixie

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 388
  • Gonnae no dae that..
Re: Help naming files
« Reply #1 on: March 22, 2017, 04:07:24 pm »

Hi,

Does anyone know how to add the text 3D automatically after the name field is populated?

John
Logged

blgentry

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 8014
Re: Help naming files
« Reply #2 on: March 22, 2017, 04:40:50 pm »

Auto import is able to apply tags on import.  But you're asking for the [Name] field to be changed after Get Movie and TV Info runs.  I don't think that's possible, but I could certainly be wrong.

How about making a custom field that shows what you want [Name] to show?  Then you could just copy that field over to [Name].  Just type: =[WeeHappyCustomName] into [Name] and you're done.

Or you could get really fancy and use your custom field *instead* of Name.  Or extra-extra fancy and use either [Name] or [WeeHappyCustomName] based upon the value of yet another field.

Just some thoughts.

Brian.
Logged

WeeHappyPixie

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 388
  • Gonnae no dae that..
Re: Help naming files
« Reply #3 on: March 22, 2017, 06:05:10 pm »

Many thanks Brian for your help. I'll look into that and play around with it.

John
Logged

RoderickGI

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8186
Re: Help naming files
« Reply #4 on: March 22, 2017, 06:20:09 pm »

Good advice Brian.

I wouldn't change the contents of [Name] though, but rather change the field to be displayed in Views to the new [WeeHappyCustomName] field.

I would then have an expression define that field, based on the formula "[WeeHappyCustomName] = [Name] + [HD] + [3D]", for example. Note I haven't been playing with this stuff for a while, so you will need to validate that formula.

Then if you used [WeeHappyCustomName] instead of [Name] in all views, for all movies, every movie that is either or both HD or 3D will be instantly recognisable. I think that can be done for all Standard and Theatre View views, although there is a bit of work. Sorting, selection for display, etc. would still be based on the unmodified [Name] field where appropriate, which I think is important.

Regardless, I think changing the displayed name is a better idea than changing the contents of the [Name[ field.
Logged
What specific version of MC you are running:MC27.0.27 @ Oct 27, 2020 and updating regularly Jim!                        MC Release Notes: https://wiki.jriver.com/index.php/Release_Notes
What OS(s) and Version you are running:     Windows 10 Pro 64bit Version 2004 (OS Build 19041.572).
The JRMark score of the PC with an issue:    JRMark (version 26.0.52 64 bit): 3419
Important relevant info about your environment:     
  Using the HTPC as a MC Server & a Workstation as a MC Client plus some DLNA clients.
  Running JRiver for Android, JRemote2, Gizmo, & MO 4Media on a Sony Xperia XZ Premium Android 9.
  Playing video out to a Sony 65" TV connected via HDMI, playing digital audio out via motherboard sound card, PCIe TV tuner

WeeHappyPixie

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 388
  • Gonnae no dae that..
Re: Help naming files
« Reply #5 on: March 22, 2017, 07:16:10 pm »

I agree as this way the scraping can work as intended. I'll have a play tomorrow. Many thanks guys for your help.

John
Logged

WeeHappyPixie

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 388
  • Gonnae no dae that..
Re: Help naming files
« Reply #6 on: March 25, 2017, 05:09:28 am »

Hi Guys,

Thanks for your help previously. I have tried using a custom view and can live with that however I am finding the JRiver Expression Language a bit confusing and would appreciate any help.

I abandoned using the HD tag as a view for now.

My custom 3D tag I've changed from a simple Yes;No to MVC;SBS;TNB
I have a test custom tag called MyName and this is set to [NAME] [3D] and this gives me the custom name "Avatar MVC" for example.

So far I have only had this view configured for my 3D files.

How would I change my custom MyName  so that it follows the following logic so I can apply it to all movies.

If the 3D tag contains MVC;SBS;TNB then display the text 3D after the [NAME] field.

My auto import routine looks like this,

Rule 1:
D:\Movies\3D\MVC
Import type: .mk3d
Media Sub Type: Movie
3D: MVC

Rule 2:
D:\Movies\3D\SBS
Import type: .mkv
Media Sub Type: Movie
3D: SBS

Rule 3:
D:\Movies\HD\
Import type: .mkv;.mp4
Media Sub Type: Movie

I renamed all my movies so they don't contain 3D or anything other than the name of the movie. This means scraping works on import OK.

I'm just struggling with the expression creation for the custom MyName so that it only shows [NAME] if no 3D tag set and [NAME] 3D if the 3D tag contains one of the 3 types listed above.

Thanks.

John


Logged

ferday

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1732
Re: Help naming files
« Reply #7 on: March 25, 2017, 06:58:42 am »

Code: [Select]
ifelse(isequal([3D], MVC, 7),[Name]_3D, isequal([3D], SBS, 7), [Name]_3D, isequal([3D], TNB, 7), [Name]_3D, [Name])
Logged

WeeHappyPixie

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 388
  • Gonnae no dae that..
Re: Help naming files
« Reply #8 on: March 25, 2017, 07:07:19 am »

Code: [Select]
ifelse(isequal([3D], MVC, 7),[Name]_3D, isequal([3D], SBS, 7), [Name]_3D, isequal([3D], TNB, 7), [Name]_3D, [Name])

Thanks very much.

Could I be cheeky  :P and as you for the right expression for my rename rule.

I currently have the base path set to D:\Movies\

Directory set as [Type]\[File Type]\[name]
Filename set as [name]

[Type] is a custom field 3D;HD;SD
[3D]is a custom field MVC;SBS;TNB

Right now the above would give for example

D:\Movies\HD\mkv\Avatar\Avatar.mkv

I tried adding the following,

Directory set as [Type]\[3D]\[File Type]\[name]

Which gives me the following for a HD mkv

D:\Movies\HD\unknown 3D format\mkv\Avatar\Avatar.mkv

Is it possible to check if the 3D field is used and if so have that type used and have the [file type] excluded in the rename. If the [3D] field is NOT used then use the [file type] in the rename.

D:\Movies\HD\mkv\Avatar\Avatar.mkv
D:\Movies\3D\MVC\Avatar\Avatar.mkv

I am trying to get my head round the expression language and the regular expressions but so far it's confusing me loads  :'(.

Thanks

John
Logged

ferday

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1732
Re: Help naming files
« Reply #9 on: March 25, 2017, 07:09:26 am »

No worries.  I didn't test, just went off memory so post back if there's a malfunction
Logged

WeeHappyPixie

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 388
  • Gonnae no dae that..
Re: Help naming files
« Reply #10 on: March 25, 2017, 07:33:36 am »

No worries.  I didn't test, just went off memory so post back if there's a malfunction

It did work buddy, I edited my previous reply with a few more questions. Sorry.

John
Logged

ferday

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1732
Re: Help naming files
« Reply #11 on: March 25, 2017, 10:16:01 am »

same idea, but now we assume the 3d field is empty if it's not 3d?

Code: [Select]
if(isempty([3D], 0), [Type]\[File Type]\[name], [Type]\[3D]\[File Type]\[name])
Logged

WeeHappyPixie

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 388
  • Gonnae no dae that..
Re: Help naming files
« Reply #12 on: March 25, 2017, 12:32:35 pm »

Thanks again

John
Logged
Pages: [1]   Go Up