jpillora / media-sort

Automatically organise your movies and tv series
MIT License
120 stars 21 forks source link

--tv-template and --movie-template examples #1

Closed bshuler closed 5 years ago

bshuler commented 8 years ago

In reading your documentation, I see that you have these values, but I am unsure how to utilize them.

/go/bin/media-sort --tv-template ".//<title> S<season>E<episode>.<ext>" -w -r --tv-dir /data/tv --movie-dir /data/movie /data/completed</p> <p>This gave me:</p> <p>2016/07/31 05:08:51 [#20/24] /data/completed/MYSHOW - The Complete Season 7 [HDTV]/MYSHOW S07E20.mp4 └─> File already exists '/data/tv/.--title---title- S-season-E-episode-.-ext-' (try setting --overwrite)</p> <p>If you could give an example for how to create the template, that would be splendid.</p> <p>Thanks!</p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/bshuler"><img src="https://avatars.githubusercontent.com/u/202111?v=4" />bshuler</a> commented <strong> 8 years ago</strong> </div> <div class="markdown-body"> <p>OK, I read your code and I found that this would work.. almost:</p> <p>/go/bin/media-sort -d --tv-template '{{ .Name }}/{{ .Name }} S{{ printf "%02d" .Season }}E{{ printf "%02d" .Episode }}{{ if ne .ExtraEpisode -1 }}-{{ printf "%02d" .ExtraEpisode }}{{end}}.{{ .Ext }}' -w -r --tv-dir /data/tv --movie-dir /data/movie /data/completed</p> <p>I get from this:</p> <p>2016/07/31 05:36:54 [#19/24] /data/completed/MYSHOW - The Complete Season 7 [HDTV]/MYSHOW.S07E19.HDTV.x264-LOL.mp4 └─> /data/tv/MYSHOW-MYSHOW S07E19.mp4</p> <p>Notice, I am attempting to get all of my shows into a directory whose name is the show name, but instead it is just adding show-show.</p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/wreckedred"><img src="https://avatars.githubusercontent.com/u/11055495?v=4" />wreckedred</a> commented <strong> 7 years ago</strong> </div> <div class="markdown-body"> <p>As an example: Sort a directory of media into two different directories one tv and one movies media-sort -d -r --movie-dir /home/meuser/plex/movies --tv-dir /home/meuser/plex/tv /home/meuser/unsorted</p> </div> </div> <div class="page-bar-simple"> </div> <div class="footer"> <ul class="body"> <li>© <script> document.write(new Date().getFullYear()) </script> Githubissues.</li> <li>Githubissues is a development platform for aggregating issues.</li> </ul> </div> <script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.min.js"></script> <script src="/githubissues/assets/js.js"></script> <script src="/githubissues/assets/markdown.js"></script> <script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.4.0/build/highlight.min.js"></script> <script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.4.0/build/languages/go.min.js"></script> <script> hljs.highlightAll(); </script> </body> </html>