Additional File Generation Option

lordchuffnel

New member
Feature -
Settings -> Reports -> NowPlaying -
Have 2 File fields side by side -
1st one is chosen template file location, 2nd is chosen output file location
Atop the file fields, have a + button to add additional file to generate on song change

Suggestion -
Expose all variables usable for notifications to file generation template files.

Reason -
Perhaps User wants to generate a simple .txt file. In addition, a generated .json, .xml or .html file with only chosen %variables% added.


I understand that the "json" file could still be saved as a txt file, only, the generator would input the %variable% where it is needed


Example JSON file

JSON:
{
    "title":%title%,
    "time": %now%,
    "artist":%artist%,
    "album":%album%,
    "minsec":%mmss%,
    "len": %len%,
    "genre":%genre%,
    "filename": %filename%,
    "casttitle":%casttitle%,
    "dateplayed":%date_played%,
    "requestcount":%count_requested%,
    "lastrequested":%last_requested%,
    "playcount": %playcount%,
    "type" :%songtype%
}

Example HTML file

HTML:
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
    <table>
      <tr>
        <th>#</th>
        <th>Track Title</th>
        <th>Duration</th>
        <th>Playcount</th>
        <th>Start Time</th>
      </tr>
      <!--PLAYLISTITEMSTART-->
      <tr>
        <td>%index</td>
        <td>%tracktitle</td>
        <td>%len</td>
        <td>%playcount</td>
        <td>%starttime</td>
      </tr>
      <!--PLAYLISTITEMEND-->
    </table>
</body>
</html>

There exist in RadioBoss Template folder .html files already, which is great. Now if the user was able to utilize these files for other than File -> Export/Print, that would be awesome!

thank you very much!
 
Do you need two "nowplaying" files created (text and JSON) or you just need one of them? If only one of them, you can choose "Template" option in Settings, Reports, Nowplaying file, in this case it'll use nowplaying template file. It will use nowplaying.txt file from \Templates folder as template - you can format this file as JSON.
 
If only one of them, you can choose "Template" option in Settings, Reports, Nowplaying file, in this case it'll use nowplaying template file. It will use nowplaying.txt file from \Templates folder as template - you can format this file as JSON.
Correct, and I am doing so. However, not all variables are available to me (correct me if i'm wrong), only currentTrack and nextTrack.
I would like all the variables exposed for use in these template files.

Do you need two "nowplaying" files created (text and JSON) or you just need one of them?
I would like the option of generating as many or as few as I choose as my needs change. I would also like to see the option to choose the location of the template file and destination file for each file I generate.:)

Thank you!
 
Correct, and I am doing so. However, not all variables are available to me (correct me if i'm wrong), only currentTrack and nextTrack.
I would like all the variables exposed for use in these template files.
Yes, currently only those - we'll extend that in the future.

I would like the option of generating as many or as few as I choose as my needs change. I would also like to see the option to choose the location of the template file and destination file for each file I generate.:)
Thank you for the suggestion, we'll see what could be done about it. Template feature was introduced recently, so there's definitely room for improvement.
 
Back
Top