INTERACT FORUM

Please login or register.

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

Author Topic: Adding channel number to filename  (Read 2808 times)

abrise

  • Junior Woodchuck
  • **
  • Posts: 89
Adding channel number to filename
« on: November 21, 2021, 11:20:32 pm »

When making a recording is there a way to systematically add the channel number or the channel name to the recorded file ?
Thanks
Logged

Yaobing

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10926
  • Dogs of the world unite!
Re: Adding channel number to filename
« Reply #1 on: November 22, 2021, 09:46:44 am »

By default, MC uses TV channel name in recording files only if program name does not exist.

There is a mechanism to achieve what you want: "Apply these tags (optional)".  This was designed originally exactly for giving users control on how filenames should be formatted, even though it can do more than just that.

The option is at the last step of the recording rule wizard and is on per-recording basis.  You can however setup a default behavior that will be applied to each recording automatically.

This option allows you to modify some tags after recording is done (or before the recording is started in the case of [Filename (name)]).  For example you can modify [Filename (name)], or [Filename], or [Filename (path)].  In your usage requirement, [Filename (name)] is it.

Search this board for previous discussions on this subject.
Logged
Yaobing Deng, JRiver Media Center

abrise

  • Junior Woodchuck
  • **
  • Posts: 89
Re: Adding channel number to filename
« Reply #2 on: November 23, 2021, 04:14:41 am »

By default, MC uses TV channel name in recording files only if program name does not exist.

There is a mechanism to achieve what you want: "Apply these tags (optional)".  This was designed originally exactly for giving users control on how filenames should be formatted, even though it can do more than just that.

The option is at the last step of the recording rule wizard and is on per-recording basis.  You can however setup a default behavior that will be applied to each recording automatically.

This option allows you to modify some tags after recording is done (or before the recording is started in the case of [Filename (name)]).  For example you can modify [Filename (name)], or [Filename], or [Filename (path)].  In your usage requirement, [Filename (name)] is it.

Search this board for previous discussions on this subject.

Thank you very much Yaobing. I have then been able to change the path for a selected channel. However apparently recording rule use the fields in the TVguide data base  I thus created a TVguide playlist as you recommended somewhere else and found that the fields "TV XMLTV ID" and  "TV channel number" are completely empty and not imported by JRiver when importing the epg thus resulting into unknownxxxx in the name i am trying to change. The field "TV channel" contains the 7 digits channel database key which is not really user friendly but that I have been able to use successfully to change the path for one channel. 
So I have not been able yet to find the field that would return the TV channel name in clear.
However once the recording is done- but not before -  the TV channel name is in the artist field of the recorded file ! 
Logged

Yaobing

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10926
  • Dogs of the world unite!
Re: Adding channel number to filename
« Reply #3 on: November 23, 2021, 10:22:33 am »

The expression TVInfo() can be used to get the TV channel associated with a program.  More specifically:

TVInfo(Channel) gives the full name of the channel;
TVInfo(ProgramChannelNumber) gives the "TV Channel Number" of the channel (the user assigned channel number).
Logged
Yaobing Deng, JRiver Media Center

Yaobing

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10926
  • Dogs of the world unite!
Re: Adding channel number to filename
« Reply #4 on: November 23, 2021, 10:30:49 am »

You can modify [Filename (name)] using the following expression:

Code: [Select]
TVInfo(Channel) [Series] - [Name]
You can improve it by adding more complicated expressions.  For example, you can test whether [Series] is empty.
Logged
Yaobing Deng, JRiver Media Center

Yaobing

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10926
  • Dogs of the world unite!
Re: Adding channel number to filename
« Reply #5 on: November 23, 2021, 04:21:18 pm »

found that the fields "TV XMLTV ID" and  "TV channel number" are completely empty and not imported by

What method of EPG loading do you use?  The XMLTV ID field is filled only if on-line EPG methods are used (XMLTV, Perc Data, SiliconDust, etc.)  If you use XMLTV method and do not get the IDs filled, please provide a sample XML file that contain those IDs.

"TV Channel Number" field is filled in one of these ways (automatically):

1.  For DVB-T/S/C OTA scanning of channels, we look for "logical channel number" during scanning.
2.  For XMLTV or other online methods, we use whatever we found in the EPG file.

However, ATSC channels are an exception.  "TV Channel Number" is a numerical field accepting an integer value.  ATSC channels' composite channel numbers (such as 4-1, or 4.1) do not fit into this field.  What I do is to insert a few (like 2 or 3) 0s between the major and minor channel numbers.  For example 40001 for 4-1.  The reason I use three 0s between 4 and 1 is that I have cable channels that run from 1 to up to 2000.  Using three filler 0s makes ATSC channel numbers at least 5 digits long.
Logged
Yaobing Deng, JRiver Media Center

abrise

  • Junior Woodchuck
  • **
  • Posts: 89
Re: Adding channel number to filename
« Reply #6 on: November 24, 2021, 05:50:31 am »

If you use XMLTV method and do not get the IDs filled, please provide a sample XML file that contain those IDs.



I am using epg.best as the XMLTV supplier. Here is a sample XML file. I have replaced the xml extension by txt to bee able to attach it.
Logged

abrise

  • Junior Woodchuck
  • **
  • Posts: 89
Re: Adding channel number to filename
« Reply #7 on: November 24, 2021, 07:17:41 pm »

You can modify [Filename (name)] using the following expression:

Code: [Select]
TVInfo(Channel) [Series] - [Name]
You can improve it by adding more complicated expressions.  For example, you can test whether [Series] is empty.
Thank you again Yaobing, I am now able to change the name genre and directory. JRiver is so powerful !
Logged
Pages: [1]   Go Up