seperis: (Default)
seperis ([personal profile] seperis) wrote2011-10-24 11:33 pm

documentation is key to success

For a while now, the entire package system of Ubuntu has mystified me in that way where I can't figure out why everyone doesn't do it this way and why are we using huge exe programs like a sucker when--I just felt several programmers start hating me and I'll stop. Suffice to say, I couldn't quite parse why this wasn't standard.

I got it during my last ubuntu upgrade to 11.10 and Mediatomb broke dramatically. Because all teh dependent libraries and operating system updated, but Mediatomb was working off a build back from 2010, about three number combinations ago.



I have said I love Mediatomb, but I don't think I can explain how deeply I appreciate the equivalent of a video iTunes, though not a tenth as functional, but better than anything else I've found and very, very, very, very easy to use. Mediatomb runs on my server and hooked up to the router, it has an interface (an easy, easy, easy remote-control interface) where I can watch all my TV, vids, and movies on any television or computer that's got access, or through the bluray players hooked up to the router either by ethernet or built in wireless (or Playstation 3s, or Wii if you are really ambitious. I am that ambitious.). My media is all on two drives, so I just clicked on teh web interface to add it and set it to autoscan and update every so often or add new things manually. It's not just that it's easy; I forgot what it's liek watching things on a screen larger than a laptop. It's amazing.

Short version--I wiped my ubuntu upgrade, reinstalled it back to 11.04 and turned off updates. In the short term, this is fine. In the long term, this is going to bite me on the ass since the server itself is a recreational item for me and I can't randomly install programs just to see what they do or crash more databases or screw with Apache because again, Mediatomb hasn't been updated in over a year and the one I'm using isn't the packet version that's less dependent on this one particular library that I had to download the gz, write the Makefile, and install before downloading the Mediatomb development tools and source code, reconfigure--my God--and install that while watching for it to error on this one stupid javascript engine (Spidermonkey). The entire reason I did this was to customize how the media was organized--

--that's almost a lie; I can honestly say at this point that when I was doing this, I didn't care what it did--I wanted to make the damn thing work--

--but the principle is the same. Now I love it, all organized in by type and genre adn alphabetical and with javascript, no less, I can create entirely new ways to organize. And I have never loved any language like I love javascript, which the answer to the statement "You can't do that in javascript!" seems to be "Create a prototype!" It's magic. Well, and a few Regex statements, if you like that sort of thing.

But on OS update when it goes to 11.10, an unknown library that I can't seem to track down updates and I can't use the javascript. Honest to God, I probably wouldn't have cared if I hadn't spent weeks reading the source code, googling, and hating the sight of a keyboard trying to get it to work. Now I'm committed. And now I can't do anything useful or interesting on my server because Mediatomb would win and all those weeks of failed configurations and creating debs and seriously reconsidering the wilderness as a lifestyle choice would be for nothing.

I am beginning to understand why the Ubuntu package model is not--used by everyone. Technically speaking, while not well, I can still run most exe programs from as far back as DOS on my Windows system. This with Mediatomb is annoying. One updated library is killing my build.





The other, less serious but also more long-term problem is that Mediatomb is fantastic by default in its sheer simplicity, but terrible in that the coding isnt' consistent--I am not saying this as an expert, I sent it to Computer Batman, V's husband, who was helping me do some changes so my bluray player could play the mkv files and he independently got irritated with it, but he is also Batman and his math homework looks like epic letters to Pegasus in their native tongue, so God knows what he considers good, probably machine code in haiku form. It's also irritating in that a lot of the functionality is broken because of both the fact it hasn't been updated and that the last update they deferred a lot of problems with it because the web moves forward but it didn't. It kept the important organizational parts, but the javascript, for example, which is why I ended up working with source code, does this thing where you can do this:

filename: dr.who.4.01.partners.in.crime.avi
displayname: Dr Who 4.01 Partners in Crime
or
displayname: Dr Who 4.01:Partners in Crime

and the folder name in your computer directory

foldername: dr.who

displays as this

display name: Dr. Who

Using the javascript functionality to run them all through this:



String.prototype.capitalize = function(){
   return this.fixit().replace( /(^|\s(?!and\s|the\s|or\s|a\s|an\s|on\s|in\s|of\s)|\-)([a-z])/g , function(m,p1,p2){ return p1+p2.toUpperCase(); } );
};

String.prototype.fixit = function(){
  return this.replace(/(\_|\.)(?!0)/g, ' ');
};

String.prototype.roma = function(){
  return this.replace(/\b(X|V|I)(x{0,3}v{0,3}i{0,3}v{0,3}x{0,3})\b/g, function(m,p1,p2){ return p1+p2.toUpperCase(); } );
};

String.prototype.suffix = function(){
  return this.replace(/\.(avi|mkv|flv|mp3|mp4|mpg|rmvb|wmv|wm|mpeg|mov|divx|ram|m4v|vob|VOB)\b/g,'');
};



*NOTE*

The first one is based on this one:


String.prototype.capitalize = function() {
  return this.replace( /(^|\s)([a-z])/g , function(m,p1,p2){return p1+p2.toUpperCase();});
};



roma is from a roman numeral one that didn't work for what I needed so I altered it

end Note

So the names you see when browsing is pretty.

And God does it have potential. If it were at its base more limited, than this wouldn't bother me, but after looking at a lot of open source media server programs, this one is in potential one of the best, most expandable, most customizable I've seen, and for the record, I download a lot of programs and checkout a lot of source code just from curiosity. This one works best because it's so ridiculously simple. You download the packets and then you switch the command on the xml to enable the web interface. When you open it, your file system is under one tab and you just pick the folder and add them.

The youtube and apple trailer and dvd functionality are broken or mostly broken, sois weborama, and lastfm, but there's so much potential it's driving me nuts.



There has got to come a time I will have conversation outside of my server drama. I mean, eventually?
concinnity: (Captain Jack)

[personal profile] concinnity 2011-10-25 04:17 pm (UTC)(link)
a) potential is the source of 99% of the frustration in my life
b) I find your relationship with electronics endlessly amusing
c) I am also just waiting for you to write electronic meta porn
pixel: (losers: jensen hasagun)

[personal profile] pixel 2011-10-25 05:43 pm (UTC)(link)
The thing is, and I learned this over *years* is that if you're going with Ubuntu, or Fedora, or things which have package management like that, you need to get *everything* from the package management setup, because if you pull out one little bit, the whole thing falls over. That said, I love apt-get and you can pry it from my cold dead hands THANKS VERY MUCH. That's part of the reason I went with and sick to ubuntu, because almost everything is available in the ubuntu repos, or in the ppas at launchpad.

The other thing is, you should be able to install updated packages from 11.04 with, sudo apt-get update && sudo apt-get upgrade without too much problem, its the dist-upgrade you want to avoid, and that's a separate command altogether. And if you're going to go with 'won't update' as a server strategy, which is valid, you may want to go for the LTS release instead, because it's going to be supported longer, currently that's 10.04 https://wiki.ubuntu.com/LTS
brownbetty: (Default)

[personal profile] brownbetty 2011-10-25 06:05 pm (UTC)(link)
Have you tried to build it from source, yet? If you have, I hope you are using checkinstall, the build-from-source that doesn't make your system hate you.
brownbetty: (Default)

[personal profile] brownbetty 2011-10-25 06:19 pm (UTC)(link)
So long as you are aware of its existence. I love linux/ubuntu, but the things that no one tells you because everyone knows are legion.
synecdochic: torso of a man wearing jeans, hands bound with belt (Default)

[personal profile] synecdochic 2011-10-25 07:48 pm (UTC)(link)
Suggestion: upgrade Ubuntu, then manually recompile the packages Mediatomb is bitching about to downgrade them, one version at a time until it stops bitching?
drunkoffthestars: (Default)

[personal profile] drunkoffthestars 2011-10-26 04:37 am (UTC)(link)
I have no idea how to do 99% of the things you have been talking about of late, but I WANT to know so I keep listening. Having a media server sounds AMAZING (if somewhat terrifyingly technical).

[identity profile] arete.livejournal.com 2011-10-25 03:41 pm (UTC)(link)
Don't stop talking about it - I'm definitely interested, though such a setup is way beyond anything I need right now - I have one big desktop, an iPad, an old (capable of dvd movies tho) laptop, and a 26" inch HDTV acting as my computer monitor. But... in the future? Oh, yeah, I can definitely see myself doing exactly what you're doing. So better that I have an inkling what's possible than not.

Also, the techdrama is hilarious to another techie. 'Cause where else can you bitch about the vagaries of hardware and software?

[identity profile] edana-ni-emer.livejournal.com 2011-10-26 03:30 am (UTC)(link)
You know what this means, don't you?

You're going to have to learn enough programming to update MediaTomb yourself.

[identity profile] seperis.livejournal.com 2011-10-26 04:20 pm (UTC)(link)
I know enough C++ to follow along easily in what they did. But I don't know enough about all the dependent libraries and they use a lot of those for this. I have the source checked out for reading and another copy I'm adding notes to, but I'm pretty sure this is beyond me right now on the backbone level.

[identity profile] edana-ni-emer.livejournal.com 2011-10-26 04:23 pm (UTC)(link)
So the reason you didn't shriek and flail over me saying that is because you had already grimly resigned yourself to doing it as soon as you figure out how? XD Guess I was just a bit late.

[identity profile] edana-ni-emer.livejournal.com 2011-10-26 04:31 pm (UTC)(link)
And best of all, you didn't even realize that's what you'd decided! I'm sure we'll all have so much fun watching you learn it.

Well, except maybe you. ;-)

[identity profile] seperis.livejournal.com 2011-10-26 04:40 pm (UTC)(link)
Dude, I was perfectly happy writing long, involved javascript for organization and formatting and happily creating objects so I can add my ebooks to the server (no reason why, I just wanted to see if I could in their own folder).

I actually tracked down a Perl skeleton for the UPnP basecode that media servers use that Mediatomb uses in C++ language. I just realized why I checked out one copy and donwloaded a second one for, well, notes.

God I need to recruit people for this. A Media Server Of Our Own--surely that's within AO3's charter? *hopeful*

[identity profile] edana-ni-emer.livejournal.com 2011-10-26 04:44 pm (UTC)(link)
You might check out any Mediatomb forums, or LINUX forums. There's always codemonkeys on there who might want to have a new and fascinating way to organize their porn.

[identity profile] seperis.livejournal.com 2011-10-26 04:48 pm (UTC)(link)
There are a few of them, but the ones I've seen working on it are basically what I'm doing; pulling the source and compiling it by hand to keep the libraries or one guy is using python extensions and fixes to the source. I think everyone's holding out hope that the developers will come back since it's only been a little over a year.

[identity profile] edana-ni-emer.livejournal.com 2011-10-26 04:50 pm (UTC)(link)
Then yeah, the AO3 forums might be a good place to start. Maybe extra functionality of some sort for long lists of videos under ten minutes?