PDA

View Full Version : Multiple Tivoservers?



SpelledWrong
11-14-2006, 11:17 PM
I am trying to get multilple instances of Tivoserver to run on a single pc. Each instance needs to look at a different folder for the config file, that I know. But I don't know how to edit the .exe to do so. The only alternative I can think of is to run multiple sessions of VMware, but this would take up alot of resources. Any ideas on how/what to use to edit the tivoserver.exe to look at a differ folder?

In case you were wondering "why?" I would like to be able to group my "shows" on one server, my music vids on another, kids shows on another, etc etc..... I'm a neat freak when it comes to sorting! :)

Thanks in advance.

SteveT
11-14-2006, 11:42 PM
I am trying to get multilple instances of Tivoserver to run on a single pc. Each instance needs to look at a different folder for the config file, that I know. But I don't know how to edit the .exe to do so. The only alternative I can think of is to run multiple sessions of VMware, but this would take up alot of resources. Any ideas on how/what to use to edit the tivoserver.exe to look at a differ folder?

In case you were wondering "why?" I would like to be able to group my "shows" on one server, my music vids on another, kids shows on another, etc etc..... I'm a neat freak when it comes to sorting! :)

Thanks in advance.use the --dir parm to uniquely set the configuration directory for each instance. use --help to see all parms.

SpelledWrong
11-29-2006, 03:47 PM
Ok...I have two tivoservers running TIVO1 and TIVO2.
I got TIVO1 running in its directory looking for a path on another server.
Copied the contents of TIVO1 dir to a new TIVO2 directory looking for a differ path on the same server that TIVO1 is pointed to.
Both servers come up with no issues and both are listed on the "now playing" on my directivo.
But whenever I go into each server, it lists the contents of whichever server I booted first.
Ex: If I boot TIVO2 up first...wait till it's complete...then boot tivo1 up...wait for it to complete.....then goto now playing. Both tivo1 and tivo2 are showing the contents of tivo2.

If either tivo is booted independantly, then the contents are fine.

Any ideas? I have changed the fake_tivo_id's on both ranging from 1-9 a&b....I am assuming any hax # would be ok.

SpoonsJTD
11-29-2006, 04:10 PM
It'd be a nice feature of tivoserver to be able to do this internally, i.e., be configurable for exposing multiple MRV instances based on a directory structure or configuration. Basically provides the illusion of a two deep directory structure for grouping (like the poster wants to do).

gfb107
11-29-2006, 04:14 PM
Are you aware you can have multiple VIDEO_DIR lines in settings.cfg?
It isn't exactly the same as having multiple servers, but you can serve up the files from different directories.

SpoonsJTD
11-29-2006, 04:29 PM
Not sure if that was for me, or for Spelled, but yeah, I know about multiple source directories. I'm talking about multiple mrv instances so that from a client Tivo, it looks like multiple servers. With naming, it can provide the illusion of multiple directories, e.g., a KidsShows server, a DadsMovies server, etc.

You can do that by running multiple tivoserver instances (although sounds like maybe SpelledWrong is having issues?), but it'd be cool if tivoserver handled it internally. It's just exposing MRV on another port. With some kind of pattern matching and\or file-to-mrv-instance mapping in the config, shows could be exposed in multiple MRV instances, making them like views instead of just folders.

SpelledWrong
11-29-2006, 09:34 PM
Yeah....I've been trying to figure this out for a couple of days now.
If either tivoserver is started by itself, it lists its files with no issues.
When the second tivoserver is started, it loads the files correctly, but displays the first tivo's files under now playing.

If I run one tivoserver on one pc, and another instance on a second PC, I have no issues. And there are no issues when a second tivoserver is run on the same machine as the first under virtual machine.

I have used differ tivo names, hex id's, etc with no avail.

Multiple file directories doesn't solve my dilema of sorting, as everything is thrown in the same list under now playing. I have 300+ music vids, 30+ home movies, plus various things I have picked up from the net, and don't want to have to go fishing through them all.

I'm not a programmer, but would like to look at the "program" of the tivoserver.exe file to see if there is something that can be changed there. What would I use to look at that?

BeagleBoy
11-29-2006, 10:22 PM
If I run one tivoserver on one pc, and another instance on a second PC, I have no issues. And there are no issues when a second tivoserver is run on the same machine as the first under virtual machine.

I have used differ tivo names, hex id's, etc with no avail.
Does your PC have more than one IP address? I'm guessing this would be the issue (though I could be wrong).

Assuming that tivoserver (like many unix-type programs) can be told to bind to a specific address, you ought to be able to add a 2nd IP to your machine, and then run both instances (one bound to one IP, one bound to the other).

If I get a chance tonight, I'll log into my tivoserver machine and give it a try.

-Jim

phat_bastard
11-30-2006, 01:52 PM
Multiple file directories doesn't solve my dilema of sorting, as everything is thrown in the same list under now playing. I have 300+ music vids, 30+ home movies, plus various things I have picked up from the net, and don't want to have to go fishing through them all.

Did you try setting:

GROUPING_TYPE=GroupByDirectory

in settings.cfg and then on your TiVos set sorting prefs to Alphabetically with grouping on? Maybe I'm misunderstanding your plight, but I have nearly a thousand shows on my tivoserver box, all grouped by folder nesting and it's never a hassle finding something I'm looking for. It looks something like:

[F] Aqua Teen (61)
[F] Futurama (72)
[F] other tv series
...
[F] Movies (124)
...
[F] Music Videos (232)
...
[F] Wildboyz (38)

where [F] represents the folder icon - this is how the 'Now Playing' list looks on my MRV clients (5 series 2 dtivos).

BeagleBoy
12-01-2006, 02:42 AM
Assuming that tivoserver (like many unix-type programs) can be told to bind to a specific address, you ought to be able to add a 2nd IP to your machine, and then run both instances (one bound to one IP, one bound to the other).

If I get a chance tonight, I'll log into my tivoserver machine and give it a try.

Okay, it almost works. If you've got multiple IP addresses, you can configure one tivoserver to bind to one address, and one to bind to another.

The problem: the code that sends the "beacon" to the network doesn't bind to the specified address. So when the tivo sees the beacon message, it saves the wrong address. It's a bit late, so I'm probably making this as clear as mud.

In any case, it should work when configured correctly, but a bug stops it from working.

-Jim

ronnythunder
12-01-2006, 11:42 PM
you definitely have to have multiple ip addresses. even though the mrv protocol provides for specifying the data ports in the messages, they use the same ports anyway. coding the beacon to bind to specific addresses should work; i've written some code to provide for tunneling over the internet, and that's how i've managed to have multiple "virtual" tivos on the same pc.

ronny

BeagleBoy
12-02-2006, 03:24 PM
In any case, it should work when configured correctly, but a bug stops it from working.

Here's a patch that fixes the problem. In BeaconManger.cc, add the following lines to BeaconManager::Broadcast() after the line
" int sock = socket( AF_INET, SOCK_DGRAM, 0 );"

server_addr.sin_family = AF_INET;
server_addr.sin_addr.s_addr = inet_addr(settings.iface_addr.c_str());
int ret = bind( sock, (sockaddr*)&server_addr, sizeof(server_addr) );
if( ret < 0 ) {
ts_log( 1, "WARNING: Unable to bind to socket in BeaconManager::Broadcast (ERROR #%d)\n", ret );
}


In my case, I've got one tivoserver configuration running with
FAKE_TIVO_NAME=Skaro
FAKE_TIVO_ID=AAABBBCCCDDDEEE
VIDEO_DIR=C:\tivo\DoctorWho
INTERFACE_ADDR=192.168.11.90
and the other configured as
FAKE_TIVO_NAME=Rigel7
FAKE_TIVO_ID=EEEDDDCCCBBBAAA
VIDEO_DIR=C:\tivo\StarTrek
INTERFACE_ADDR=192.168.11.91


I launch both copies with
tivoserver.exe -d conf1dir
tivoserver.exe -d conf2dir

where conf1dir and conf2dir are the directories with the two settings.cfg files.

-Jim

BeagleBoy
12-02-2006, 11:34 PM
It looks something like:

[F] Aqua Teen (61)
[F] Futurama (72)
[F] other tv series
...I've done this, and even modified the code slightly at one point to customize how it sorts. I end up with something like:
[F] Blake's 7 (52)
[F] Doctor Who (728)
[F] Ghost in the Shell (26)
[F] Good Eats (88)
[F] Ham on the Street (16)
[F] Midsomer Murders (49)
...
While this is fine for many shows, that "Doctor Who" entry is something of a killer, since there are multiple episodes per story. So to get to the first episode of "Pyramids of Mars," you have to scroll through many many titles. By adding one more layer of pseudo-folders, it makes things much nicer.

-Jim

SpelledWrong
12-04-2006, 10:30 AM
Thanks Jim...no that is crystal clear.

But I kinda figured out my issue.
My first main issue was that no matter how many directories I listed, it would throw all of the files together....no matter if they were in the same series or not. This is why I wanted multiple servers and came into this issue.
I was pointing tivoserver directly to the subfolder instead of the main folder.
So instead of pointing to f:\movies I took it to each subfolder: f:\movies\music videos & f:\movies\uncensored music videos.
So the tivoserver was actually loading just the videos and not the directory.
After pondering this over at work (I know...slack job) I came home pointed to the main folder and ...BAM...I have groupings!

Now I have another issue....when I attempt to d/l anything now, it says that there are previous things on the to do list that need to record first. I have cleared my to do list, and tried again with the same result. I figure that it is waiting to transfer something from a server I configured and reconfigure and probably deleted by now. Any ideas on how to resolve this?

phat_bastard
12-04-2006, 11:29 AM
By adding one more layer of pseudo-folders, it makes things much nicer.

I agree. The ability to have two layers of folder nesting would be awesome for your situation, and I'd love to be able to do that with the extra footage on some dvd rips. Unfortunately I don't think MRV allows for this. :(

cheer
12-04-2006, 12:52 PM
My totally-uninformed opinion (after scanning the tivoserver code a while back along with everything that's been posted on MRV) is that nesting really isn't possible without some real trickery.

I think what you'd have to do is code tivoserver to show a folder with fake video names, each corresponding to a subfolder. When one is selected, tivoserver could bounce back to a list of videos in a root folder that represent what's actually in the subfolder. Like this:

Main NPL (where * = looks like a folder)

Video 1
Video 2
* Movies
* TV Shows
* Music Videos

Select the Movies folder, and see this:

Movies

Action
Comedy
Drama
Pr0n
Scifi

Select the Comedy video, and you see the menu on your Tivo "bounces" back, like it's invalid...but then you see this:

Movies

Comedy 1
Comedy 2
Comedy 3

And so on. Kludgey? Yeah. But I'm not sure how else you'd implement it.

Porterx
11-23-2007, 05:55 PM
I agree. The ability to have two layers of folder nesting would be awesome for your situation, and I'd love to be able to do that with the extra footage on some dvd rips. Unfortunately I don't think MRV allows for this. :(

I think you're talking about the npl, correct?

I have VIDEO_DIR=D:\Movies in settings config.

I have paths of:
d:\movies\western\deadwood\season 3\ep1.avi
d:\movies\western\deadwood\season 3\ep2.avi
d:\movies\western\deadwood\season 3\ep3.avi

DVR: Tivoserver shows a folder:
Season 3
It has ep1, ep2 & ep3 inside it.

Is it possible to have the DVR: Tivoserver folder structure mirror the hard drive folder structure exactly? If so, how is it done? I've not been able to find it.

Thanks,
Porter

Edit: I'm not worried about the NPL (tho that would be nice). Just worried about the DVR: Tivoserver folder.