View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 11 posts ] 
Print view Previous topic   Next topic  
Author Message
Search for:
PostPosted: Wed Mar 28, 2007 6:20 pm 
Offline
Joined: Sat Dec 24, 2005 11:33 am
Posts: 400
Location: Kitsap Peninsula, Wa., United States
Moved to:
http://mysettopbox.tv/phpBB2/viewtopic.php?p=87116

I currently have 3 tuner cards.
I live in a unique situation with no OTA available and I am on a boundary between two Service Delivery markets. We got caught up in the most recent SHVA action as an edict from a Judge in Florida.
Anyway, what that has caused is I lost most of my East coast feeds and they have recently supplied me with the Satellite Channels from my closest physical market in another state and the major market Satellite Channels from my own state.

They are in different Time zones so that will provide additional tuning options.

My Question, Can I bind 2 Zap2It selections to the same set of Tuners so the database can sort through and appropriately record shows as timeslots are available.

I checked Zap2It and as of right now they have not updated to reflect that my location has two major markets of channels available so I only get an option for Market A by Zipcode (SHVA requirement) or Market B by adding that as a specific zipcode.

So I would have two selections to choose from when I install and bind to the Tuners. I plan to send Zap2It some email to try and get them to update the DB.

_________________
KnoppMyth R5.5
MBE: AMD64 3400+, K8N Neo4 Plat., 1Gig, Asus Extreme N6200, 320G pata, 2x320Gsata, 750Gsata, PVR-150 Retail w/Blaster
SBE: AMD XP2000, GA 7ZMMH, 1 Gig, XFX 256M 6200, 20 Gig, PVR-150 Retail w/Blaster
SBE: AMD Dur1800, 512M, PVR500


Last edited by bigbro on Sat Apr 07, 2007 4:18 pm, edited 1 time in total.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 28, 2007 7:09 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
You can only bind one "video source" to a given input, however, you can create a merged video source which will do what you need. Search for posting by me that mention "copy_channel", which is the key function in my old merge script. The only caveat is that it may need minor updates due to schema changes (basically adding or removin a few column names).


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 29, 2007 5:39 pm 
Offline
Joined: Sat Dec 24, 2005 11:33 am
Posts: 400
Location: Kitsap Peninsula, Wa., United States
I found this posting here
http://mysettopbox.tv/phpBB2/viewtopic. ... opychannel

but my coding is seriously not strong in fact "nonexistence", and I am having trouble understanding what you are doing in this. It looks like you are duplicating a channel from one db into another db and changing the numbering of the channel.

I think. Of course I see it seems to be bringing over all of the appropriate channel/programming info at the same time.

I think mine is a little easier than that.

I have a basic Zap2it setup for my Dish Satellite with Boise as the local market.
I can find a Zap2it link to setup for Portland, Since all of the channels are Duplicated except for the Portland specific market I can deslect all but Portland.

So now I have one Set call it Zap2it boi with most of my programming, and a second selection call it Zap2it pdx with only Portland channels.

The numbering for boi(7130 to 7140) and pdx(8670 to 8680) channels is unique. The content is similar although one set is Mountain time zone and the other is Pacific Time zone. If I can get these merged together I can almost double my options for some of the Primetime shows.

I tried setting one tuner to one zap2it and another tuner to the other, but that separates the one tuner completely from the pack except for the specific set of stations it is assigned(the Portland group)

Can I somehow merge these two databases and have it allow any of the 4 tuners to record/watch from the merged source content?
I am running R5C7

_________________
KnoppMyth R5.5
MBE: AMD64 3400+, K8N Neo4 Plat., 1Gig, Asus Extreme N6200, 320G pata, 2x320Gsata, 750Gsata, PVR-150 Retail w/Blaster
SBE: AMD XP2000, GA 7ZMMH, 1 Gig, XFX 256M 6200, 20 Gig, PVR-150 Retail w/Blaster
SBE: AMD Dur1800, 512M, PVR500


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 29, 2007 8:33 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
bigbro wrote:
I think mine is a little easier than that.

Only if it actually works... QOTD - "If it isn't what you need, it's not a bargain."

bigbro wrote:
Can I somehow merge these two databases and have it allow any of the 4 tuners to record/watch from the merged source content?
I am running R5C7

That's exactly what the script I pointed you to does, and customizing it is painfully simple. See the bit at the bottom that says:
Code:
copy_channel 2251 1098

You just need a line like that for each channel you want to merge.

    - Pick one of your lineups to be the "master", and point all the tuner to this under input connections.
    - Channel IDs (chanid) have the lineup (sourceid) and channel number (channum) encoded in them Lineup 1 is chanid 1001-1999, lineup 2 is 2001-2999, ... Chanid 1098 from the example above is sourceid 1 channel 98, 2251 is sourceid 2 channum 251, so I was merging the information from channel 251 in a supplemental lineup over the top of channel 98 in my primary lineup.
    - Now just map the entries you want from sourceid 2 (or 3 or ...) to sourceid 1 (or ...) like this. (lets assume you want 17, 29 and 42, and there's no overlap)
Code:
copy_channel 2017 1017
copy_channel 2029 1029
copy_channel 2042 1042

The function does all the work.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 30, 2007 7:17 pm 
Offline
Joined: Sat Dec 24, 2005 11:33 am
Posts: 400
Location: Kitsap Peninsula, Wa., United States
Thanks TJC, Understood.
I tired to find a method to view the mythconverg tables. but was struggling to get there. I have figured that out now.

So noticing about the time you posted this to others was in the time window for R5C7 I assumed the tables you used would most likely be similar.

I built the script referenced with the following in the bottom section. Because my source 2 chan id is 8670-8680 I used the following"
Code:
echo ;  echo "Fixing AZNTV" ; echo
copy_channel 0670 9670
copy_channel 0671 9671
copy_channel 0672 9672
copy_channel 0673 9673
copy_channel 0674 9674
copy_channel 0675 9675
copy_channel 0676 9676
copy_channel 0680 9680


It shows it seems to be working as evidenced by no errors and this excerpt from the update_database.log

Code:
2007-03-30 12:40:44.140 Updating source #1 (zap2it boi) with grabber datadirect
2007-03-30 12:42:39.293 Updating source #2 (Zap2it PDX) with grabber datadirect


I have also ran mythfilldatabase --refresh-all it shows grabbing two sources.with similar lines to above.

However, I do not get the additional channels with either set of copy_channels in my guide or as selections.
I have tried a complete restart as well.

I found them listed in the Channel table in Mythconverg. They are 10670-10680 like above. and the channels say Source 2 and the correct ID. They even have similar entries to the source 1 channels.

Is there now something I have to do to get these to show in my program guide and allow tuners to take advantage of them?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 30, 2007 9:09 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
Change the chunk that says:
Code:
mysql -u root mythconverg <<EOF
delete from program
where chanid = '$to_chanid';

To say:
Code:
mysql -u root mythconverg <<EOF
delete from channel
where chanid = '$to_chanid';

insert into channel
(select '$to_chanid', channum, freqid, sourceid, callsign, name, icon,
finetune, videofilters, xmltvid, recpriority, contrast, brightness, colour, hue,
tvformat, commfree, visible, outputfilters, useonairguide, mplexid,
serviceid, atscsrcid, tmoffset, atsc_major_chan, atsc_minor_chan,
from channel
where chanid = '$from_chanid');

delete from program
where chanid = '$to_chanid';


Make sure that the columns in your channel table match that in name and order. If they don't, add or remove names to the SQL statement as needed so that they do. You can use this commnad to get the names:
Code:
mysql -u root mythconverg -e "desc channel"

I was copying over an exisiting channel with the correct lineup so I didn't have to do this.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Mar 31, 2007 11:45 am 
Offline
Joined: Sat Dec 24, 2005 11:33 am
Posts: 400
Location: Kitsap Peninsula, Wa., United States
Well we are much closer. I can see the listing in the Program Guide via mythweb. It however will not let me schedule a program listed on those times even if it is a unique show to that set of listings. The Source 2 channels do not show if I browse the Program Guide through the Mythtv interface, as in Watch TV then pull up the program guide.

Per your instructions here is the update_database.sh I am running.
Code:
#!/bin/bash

exec >/var/log/mythtv/update_database.log 2>&1

copy_channel () {
  from_chanid=$1
  to_chanid=$2

mysql -u root mythconverg <<EOF
delete from channel
where chanid = '$to_chanid';

insert into channel
(select '$to_chanid', channum, freqid, sourceid, callsign, name, icon,
finetune, videofilters, xmltvid, recpriority, contrast, brightness, colour, hue,
tvformat, commfree, visible, outputfilters, useonairguide, mplexid,
serviceid, atscsrcid,
from channel
where chanid = '$from_chanid');

delete from program
where chanid = '$to_chanid';

delete from credits
where chanid = '$to_chanid';

insert into credits
(select person, '$to_chanid', starttime, role
        from credits
        where chanid = '$from_chanid');

delete from programgenres
where chanid = '$to_chanid';

insert into programgenres
(select '$to_chanid', starttime, relevance, genre
        from programgenres
        where chanid = '$from_chanid');

delete from programrating
where chanid = '$to_chanid';

insert into programrating
(select '$to_chanid', starttime, system, rating
        from programrating
        where chanid = '$from_chanid');

commit;
EOF
}

fill_options="$*"
if [ -z "$fill_options" -o "$fill_options" = "--quiet" ] ; then
    # fill_options="--refresh-second"
    fill_options=""
fi

/usr/bin/mythfilldatabase $fill_options
sleep 5

echo ;  echo "Fixing AZNTV" ; echo
copy_channel 0670 9670
copy_channel 0671 9671
copy_channel 0672 9672
copy_channel 0673 9673
copy_channel 0674 9674
copy_channel 0675 9675
copy_channel 0676 9676
copy_channel 0680 9680

/usr/bin/mythbackend --resched

echo
echo "Database update completed"

I had to remove the last 3 entries you had in your "insert into channel" script as my table was not using those three.

In looking at this script am I missing a step/instruction?

Specifically where it says:
Code:
delete from program
where chanid = '$to_chanid';

Should it have some kind of an entry saying "insert into program" like the entries that follow it?

When I run this script now I get this error in Update_database.log

Code:
Fixing AZNTV

ERROR 1064 at line 4: You have an error in your SQL syntax.  Check the manual that corresponds to your MySQL server version for the right syntax to use near 'from channel where chanid = '9670')' at line 6
it repeats this for each one of the Source 2 channels.

I believe this is due to the channels are already entered in the db.

Thanks in Advance. I appreciate all of your time helping this inept coder accomplish this seemingly advanced task. My Linux o/s skills are basic, but my coding skills are even less than that.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Mar 31, 2007 5:05 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
Try this version. It should be a bit closer to right...

Code:
#!/bin/bash

LOG_FILE="/var/log/mythtv/update_database.log"
mv -f $LOG_FILE $LOG_FILE.old
exec >$LOG_FILE 2>&1

copy_channel () {
  from_chanid=$1
  to_chanid=$2

# You really only need to copy the channel table data over once, but
# it shouldn't hurt anything to do it every time.  I could probably
# make this smarter about that...

mysql -u root mythconverg <<EOF

delete from channel
where chanid = '$to_chanid';

insert into channel
(select '$to_chanid', channum, freqid, sourceid,
        callsign, name, icon, finetune, videofilters, xmltvid,
        recpriority, contrast, brightness, colour, hue, tvformat,
        commfree, visible, outputfilters, useonairguide, mplexid,
        serviceid, atscsrcid
        from channel
        where chanid = '$from_chanid');

delete from program
where chanid = '$to_chanid';

insert into program
(select '$to_chanid', starttime, endtime, title, subtitle, description,
        category, category_type, airdate, stars, previouslyshown,
        title_pronounce, stereo, subtitled, hdtv, closecaptioned,
        partnumber, parttotal, seriesid, originalairdate, showtype,
        colorcode, syndicatedepisodenumber, programid, manualid,
        generic, listingsource, first, last
        from program
        where chanid = '$from_chanid');

delete from credits
where chanid = '$to_chanid';

insert into credits
(select person, '$to_chanid', starttime, role
        from credits
        where chanid = '$from_chanid');

delete from programgenres
where chanid = '$to_chanid';

insert into programgenres
(select '$to_chanid', starttime, relevance, genre
        from programgenres
        where chanid = '$from_chanid');

delete from programrating
where chanid = '$to_chanid';

insert into programrating
(select '$to_chanid', starttime, system, rating
        from programrating
        where chanid = '$from_chanid');

commit;
EOF
}

fill_options="$*"
if [ -z "$fill_options" -o "$fill_options" = "--quiet" ] ; then
    if [ $(date +%A) == "Sunday" ] ; then
        fill_options="--refresh-all"
    else
        # fill_options="--refresh-second"
        fill_options=""
    fi
fi

/usr/bin/mythfilldatabase $fill_options
sleep 5 # Give the DB time to settle.

# We can add as many mappings here as needed.
echo ; echo "Merging lineups" ; echo
copy_channel 2251 1098

# This only needs to be done once at the end.
/usr/bin/mythbackend --resched

echo
echo "Database update completed"

exit 0


BTW - Holy ****! You posted this under "KnoppMyth -> Installation"?!? Better grab this quick before Cecil clobbers it (deservedly) as off topic... :roll:


Top
 Profile  
 
 Post subject:
PostPosted: Sat Mar 31, 2007 9:34 pm 
Offline
Joined: Sat Dec 24, 2005 11:33 am
Posts: 400
Location: Kitsap Peninsula, Wa., United States
Sorry about wrong thread. Thought this was the correct one.

Made the changes, and ran the script,
Had one error related to the channels.
I compared my DB table to the script and modified it according to what I had, like we did above.

It runs with no errors but alas I still cannot schedule on the srouce 2 channels that are inserted.
I can still see them even see the availabilty of similar programs at different times, but it will not let me schedule that or perform reschedule to alleviate conflicts.

We have to take a break however, Unfortunate.

I got called away leaving tomorrow morning for a week with my work.

I will still be able to do research but cannot get to the console until next Friday or Saturday.

Guess we can start up a new thread or get this one moved to the correct place... Is that possible?

Thanks for all the help so far, I feel we are close

Regards


Top
 Profile  
 
 Post subject:
PostPosted: Sat Mar 31, 2007 10:20 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
Does #2 lineup already exist, or are you trying to make it up? I'd pick the line up with the most valid entries as my first, primary, and master, and merge the extras into it like I did in my example.

If the lineup doesn't already exist you'll need to add a record for it.


Top
 Profile  
 
PostPosted: Sun Apr 01, 2007 7:47 am 
Offline
Joined: Sat Dec 24, 2005 11:33 am
Posts: 400
Location: Kitsap Peninsula, Wa., United States
They both should be valid entries.

Source 1 is the source I was using it was selected from Zap2It.

Source 2 was my original source from about 8 months ago, and I recently put it against one of the tuner cards for an evening. It has been cut down to only pull the 8670-8680 channels as most everything else is a duplicate.

when I had source 2 bound to 1 input and all the other inputs bound to source 1 it would allow that one input to only select programming on Source 2 and the others could select only on Source 1.

so I am puzzled as to why this isn't working as well. it seems so close.

Close this at this point as posted in the wrong forum.
Moved to
http://mysettopbox.tv/phpBB2/viewtopic.php?p=87116


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 


All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 9 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu