Closed Emstar closed 9 months ago
Thank you so much for the kind words! I appreciate it.
If I was managing the backlog, I think the next thing that would be a great quality of life update would be a total autopilot mode meant to rename files in the current directory, with as little data entry as possible.
This is definitely the direction I'd like to head in! My original idea was to have tvmv
try to infer any info that isn't explicitly given... to give the user flexibility to override/specify, but only where they needed/chose to. Whether directly from the file name, as you mention here, or perhaps even from the containing directory structure (e.g. a TV show is often organized like The Simpsons/Season 04/etc
). Or some combo of the two.
Very cool! I'm looking forward to whatever you come up with.
we could invoke tvmv in that directory with an argument saying "use the config file" and then we could do things like automatically renaming everything there with a pre-set show ID.
This is interesting... can you tell me a bit more about this use-case? e.g. why might one want to write the show ID to a config file rather than just passing it on the CLI, if you've already got it? Would this be for cases where shows trickle in individually, perhaps? Like a currently-airing show or something?
You could do something like that with some CLI hoop-jumping, I'll bet, even with tvmv
in its current state. Like, just stick the show ID/name in a text file and use xargs
, like:
# we've got some files:
$ ls -1 *.mp4
'Poirot S12E1.mp4'
'Poirot S12E2.mp4'
'Poirot S12E3.mp4'
'Poirot S12E4.mp4'
# put the id of Poirot in a textfile in the same directory:
$ echo "790" > id.txt
$ cat id.txt
790
# xargs magic! pass whatever's in `id.txt` along to the `tvmv` call:
$ xargs -a id.txt tvmv mv -a -i
[tvmv does its thing]
# et voila!
$ ls -1 *.mp4
"Agatha Christie's Poirot - s12e01 - Three Act Tragedy.mp4"
"Agatha Christie's Poirot - s12e02 - Hallowe'en Party.mp4"
"Agatha Christie's Poirot - s12e03 - Murder on the Orient Express.mp4"
"Agatha Christie's Poirot - s12e04 - The Clocks.mp4"
You could also assign this convention to an alias, make it easier still:
# throwing tvmv's "force" flag in there too, make it even more auto-esque:
$ alias tvmv_auto='xargs -a id.txt tvmv mv -a -f -i'
# now just call it in any directory with an `id.txt` file:
$ cd poirot
$ tvmv_auto
You could probably go even further and combine this with find
to recursively rename all the episode files in a set of directories. But I'd have to dig through Stack Overflow to remember the syntax there, haha :smile:
Also, major caveat: none of this will work for Windows users. So still just a stopgap solution!
Maybe I should add something like this to the FAQ section of the README... a "cookbook" kind of thing or something.
In any case: thank you again for the feedback! I really appreciate it.
This is interesting... can you tell me a bit more about this use-case? e.g. why might one want to write the show ID to a config file rather than just passing it on the CLI, if you've already got it? Would this be for cases where shows trickle in individually, perhaps? Like a currently-airing show or something?
That's exactly right.
In that scenario, my ideal workflow would be something like running tvmv
with an argument that says "look in directory /foo
, recursively, and rename every show file automagically." The files then move to their new forever homes. In this case there could of course be more than one show present. (e.g. /foo/some_show_s01e03/some_show_s01e03.mkv
and /foo/some_other_show_s09e12/some_other_show_s09e12.mkv
) Automagically handling this case would be a very cool trick and it is something that other Java app cannot do.
Second easiest would be invoking tvmv
multiple times, like if you had to do one show at a time. And in that case it probably doesn't matter to me if tvmv
is used in /foo
where files appear, or in the directory where shows are organized and live forever. In the former case we would really hope for automatic show identification since the directories come and go at random. In the latter case we could lean on a config file stored in the directory if needed. In both cases, we hope to avoid unique data entry on the command line to be as lazy as possible. :)
As you can probably tell I do not have my whole workflow automated, but I am very interested in ways to make things faster once files appear, so I am into tvmv
. :)
You could do something like that with some CLI hoop-jumping, I'll bet, even with tvmv in its current state. Like, just stick the show ID/name in a text file and use xargs, like....
Good thinking, thanks. I'll play with this.
I am currently using Windows for this stuff but I do use Linux for other things and could move these tasks there too. I'm just on Windows out of habit, and my needs are modest and don't really need full automation.
But tvmv compiled for Windows, or that runs in Linux for Windows... And that automagically fixes up a directory of random files... That I would use immediately.
Awesome. Thank you for this context, it's really valuable. I don't have a ton of insight into how other folks use tvmv
, and my own use-cases are honestly pretty simple.
Any time, I'm always happy to shoot my mouth off.
I did a quick test with a couple of fake files, of differing name formats, and this is exactly the behavior that I would hope for. Thank you for this release!
While I would like name templates, it's not a big deal. The output does satisfy Plex/Kodi as-is and that is the most important thing.
If I was managing the backlog, I think the next thing that would be a great quality of life update would be a total autopilot mode meant to rename files in the current directory, with as little data entry as possible.
mv
is implied, it looks for common video files, and it tries to figure out the show name automatically. All you'd have to do then is review the changelist and hit Y or N to finish the job. Since you're clearly detecting the season/ep data already, just firing the prior words into the name parameter might actually work a lot of the time.Another way to approach autopilot could be a config file. Say there was a
.tvmv
file in a directory; we could invoke tvmv in that directory with an argument saying "use the config file" and then we could do things like automatically renaming everything there with a pre-set show ID.Anyway, just thinking out loud... It's great already. Thanks again!