jrudess / streamdvr

DVR for streaming entertainment
GNU General Public License v3.0
65 stars 16 forks source link

More filename styling options? #120

Closed ghost closed 5 years ago

ghost commented 5 years ago

Pretty self explanatory, but it would be neat to have some more filename styling options. Personally I'm only after one specific enhancement, having the option to move datetime from the end of the filename to the beginning, but maybe someone else can think of other options too.

Currently I just always edit the script myself and hardcode the change in.

ghost commented 5 years ago

Just some further thoughts about this, I was thinking a solution along the lines of how most music tagging programs format their filenames. %streamer% %site% %YYYY% (and other datetime options)

And possibly other options? Maybe there are site specific strings that could be useful that I'm not thinking right now. Which brings to mind, should the option be site specific or global, or both?

Could replace the streamerSubdir, includeSiteInFile, includeSiteInDir and dateFormat option with something like this for example. %site%-%YYYY%/%streamer%/%streamer%_%YYYY%%MM%%DD%-%HH%%mm%%ss%

jrudess commented 5 years ago

I concur with that direction. I'm likely to leave the date-format as its own variable in the config, because that parsing comes from the 'moment' library and is also used in the first column of the log. So if I code this it probably won't end up being quite so flexible, but I would accept a PR.

%site%_%date%_%streamer%

ghost commented 5 years ago

That's absolutely fine. I also just realized that github's text parser removed some slashes from that example string of mine, but the basic gist of those was to represent folders and sub folders.

jrudess commented 5 years ago

The config option includeSiteInFile has been removed. In its place is a new config option:

fileNameFormat: "%n_%s_%d"

%n is the streamer's name %s is the site %d is the date using the specified dateFormat