A bug in MythVideo inspired me to work on fixing mplayer-resume tonight, so that it can properly handle movies with filenames. I don’t know why I didn’t think about this before, but it’s simple if the file is properly escaped or quoted. And so, mplayer-resume v1.5 is released, with support for spaces in filenames, finally, and also one other cool little thing: it works with playlists now, to a degree.
The playlists thing is kind of hard to explain, and it’d be easier to point you to the documentation that I’ve already written. Instead, I’ll just describe what it is I’m going to use it for.
One thing I’ve been wanting to add to my MythVideo setup is some playlists so that I can randomly play something. I have a lot of cartoons and videos and movies, and sometimes I don’t feel like picking something myself — one of the nice things about TV in general is you are genuinely surprised when you’re channel surfing and something cool just happens to crop up. That’s kinda what I like, and what I wanted to do. But, I wanted to take it a step further. If I started playing $random_episode, then if I quit, I want to be able to resume playback of that same show. Up until now, mplayer-resume wouldn’t work that way, since if you’re randomly picking something from a playlist file, there’s no real way to seek back to the same one.
That’s fixed now. The script will read the filename of the movie you are playing when you exit (once you setup .lircrc correctly), and checks to see if that’s the same file you started playing. So if I play random.pls and it plays Tarzan.mkv, and I exit, then when I go back to watch Tarzan, it will resume in the same place. Basically, it saves the file position for Tarzan instead of the playlist file. Pretty cool. 🙂
So, there you go. I’ll put it in portage shortly as well. Enjoy. 😀