ben-xo / dir2cast

Turn a directory of MP3s into a podcast - automatically.
http://www.ben-xo.com/dir2cast
BSD 3-Clause "New" or "Revised" License
152 stars 20 forks source link

default item title to mp3 filename if no id3 tag #38

Closed wesyah234 closed 4 years ago

wesyah234 commented 4 years ago

Love this script, works great. However, I tried it on some mp3 files that apparently don't have any id3 tag info to use as the title, so I see (untitled) in the tag. At least I assume that's why it's happening. Any way you could fall back to using the filename of the mp3 file instead? At least there would be something to display then in my podcast player. Thanks!!</p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/ben-xo"><img src="https://avatars.githubusercontent.com/u/75862?v=4" />ben-xo</a> commented <strong> 4 years ago</strong> </div> <div class="markdown-body"> <p>Yeah, probably a good idea. Thanks for the suggestion!</p> <p>You definitely won't get the most out of dir2cast unless you tag your files, but I suppose there are lots of use-cases for it which aren't just straight-up publishing a podcast…</p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/ben-xo"><img src="https://avatars.githubusercontent.com/u/75862?v=4" />ben-xo</a> commented <strong> 4 years ago</strong> </div> <div class="markdown-body"> <p>Have a look at <a href="https://github.com/ben-xo/dir2cast/pull/40">https://github.com/ben-xo/dir2cast/pull/40</a> and see if this suits your needs?</p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/wesyah234"><img src="https://avatars.githubusercontent.com/u/66566?v=4" />wesyah234</a> commented <strong> 4 years ago</strong> </div> <div class="markdown-body"> <p>Perfect, I tried it and it works just as I expected. The only tweak I might suggest, if you have time, would be to strip the .mp3 extension as everything is an mp3 file anyway. Thank you for the quick attention to this!!</p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/ben-xo"><img src="https://avatars.githubusercontent.com/u/75862?v=4" />ben-xo</a> commented <strong> 4 years ago</strong> </div> <div class="markdown-body"> <p>I'd rather not go down the route of having dir2cast try to "interpret" filenames - I like the idea of using the filename as a placeholder (because it's more useful than "(untitled)"), but really the idea was that for most people if you're seeing that it means you need to fix the tags in your feed. Where to stop - replacing underscores with spaces? Trying to parse artist and title? (Besides, we support mp3, m4a and mp4 at the moment, so it could technically be ambiguous if you happen to have several formats with the same filename).</p> <p>If you want to branch to make this work for your needs, though, the place you need to edit is <code>RSS_File_Item::getTitle()</code>.</p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/wesyah234"><img src="https://avatars.githubusercontent.com/u/66566?v=4" />wesyah234</a> commented <strong> 4 years ago</strong> </div> <div class="markdown-body"> <p>yeah, no problem, I understand! This fix is great just the way it is. I also noticed that the podcast title is interpreted from the directory name when using the dir= option which is great, this works for me.Thank you.</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>