XMLTV grabber for Schedules Direct JSON

Have a MythTV related problem? Ask for help from other MythTV users here.

Moderator: Forum Moderators

User avatar
bill6502
Developer
Posts: 1724
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: Important upcoming v31 Changes, you may have work to do!

Post by bill6502 » Fri Dec 13, 2019 8:37 pm

@jfabernathy, added a link to the not-so-obvious Wiki info and a hint. Thanks for the above.

Note that most everything in this thread will vanish (as it should only be an
announcement.) Trouble shooting should be done in new topics. I could lock
this, but will wait a bit. Don't take offense ;).

User avatar
jfabernathy
Senior
Posts: 296
Joined: Wed Feb 18, 2015 2:37 pm
United States of America

Re: Important upcoming v31 Changes, you may have work to do!

Post by jfabernathy » Fri Dec 13, 2019 9:05 pm

bill6502 wrote:
Fri Dec 13, 2019 8:37 pm
@jfabernathy, added a link to the not-so-obvious Wiki info and a hint. Thanks for the above.

Note that most everything in this thread will vanish (as it should only be an
announcement.) Trouble shooting should be done in new topics. I could lock
this, but will wait a bit. Don't take offense ;).
Sorry about that. If it's worth saving you can put the thread in a more appropriate place.

wmorrison
Senior
Posts: 130
Joined: Sat Dec 01, 2018 12:05 am
United States of America

Re: Important upcoming v31 Changes, you may have work to do!

Post by wmorrison » Sat Dec 14, 2019 5:18 pm

For those who use the sqlite grabber, login as a different user than mythtv, and run into the problem where mythfilldatabase works from the mythwelcome menu (as their login user) but fails when run on schedule (as mythtv user,) I found that not only must the DB file be writable by both users, but the directory it is in must be writable by both as well, or the grabber will fail when sqlite says the DB is readonly.
Last edited by wmorrison on Sat Dec 14, 2019 6:05 pm, edited 1 time in total.

AnalogBill
Newcomer
Posts: 9
Joined: Fri Feb 10, 2017 2:11 am
United States of America

Re: XMLTV grabber for Schedules Direct JSON

Post by AnalogBill » Mon Mar 02, 2020 3:30 pm

When I try to "sudo su mythtv" I get prompted for a password...Edit: Figured out how to change the mythtv user password, then found that the mythtv user needed to be in the "sudoers" file...didn't like where this was going.
I'm hoping that installing xmltv as user mythtv will solve my problem....Edit: Found that this approach was not needed.....mythfilldatabase now runs successfully as my user name, manually as mythtv, and automatically as mythtv. Solution was giving rw access to 'other' in both the /home/myuser/.xmltv directory, and the SchedulesDirect.DB file.

dragonflyoh
Newcomer
Posts: 8
Joined: Mon Nov 03, 2014 11:07 pm
United States of America

Re: XMLTV grabber for Schedules Direct JSON

Post by dragonflyoh » Sat Aug 15, 2020 2:27 pm

What is the name of the SchedulesDirect.DB file and where is it located?
Thanks for all of the help in getting my schedule to auto update.

User avatar
bill6502
Developer
Posts: 1724
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: XMLTV grabber for Schedules Direct JSON

Post by bill6502 » Sat Aug 15, 2020 2:36 pm

SchedulesDirect.DB is the default name suggested by the configuration
program - and it will work just fine. In my experience, most folks just use
it. But, it's just a file name. You could choose (making life a bit more
difficult) to have one database for each MythTV source name.

User avatar
paulh
Developer
Posts: 544
Joined: Thu Feb 06, 2014 6:09 pm
Great Britain

Re: XMLTV grabber for Schedules Direct JSON

Post by paulh » Sat Aug 15, 2020 2:51 pm

You will typically find in the hidden .xmltv directory in the home directory of the user that did the setup. So most users use the mythtv user so you will find it at /home/mythtv/.xmltv/SchedulesDirect.DB

dragonflyoh
Newcomer
Posts: 8
Joined: Mon Nov 03, 2014 11:07 pm
United States of America

Re: XMLTV grabber for Schedules Direct JSON

Post by dragonflyoh » Sun Aug 16, 2020 3:01 pm

Thank you!

dragonflyoh
Newcomer
Posts: 8
Joined: Mon Nov 03, 2014 11:07 pm
United States of America

Re: XMLTV grabber for Schedules Direct JSON

Post by dragonflyoh » Sun Aug 16, 2020 9:42 pm

I did some looking and home/mythtv/.xmlt is an empty folder
and
The only schedulesdirect file is:
Schedulesdirect.js located in op/emby-server/system/dashboard-ui/livetvsetup
I am using the latest version of Mint and Mythtv 31.
Any ideas would be appreciated.

User avatar
bill6502
Developer
Posts: 1724
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: XMLTV grabber for Schedules Direct JSON

Post by bill6502 » Sun Aug 16, 2020 11:40 pm

To answer the above, you really need to know which grabber you've selected.
You can use mythtv-setup or from a browser, go to <yourBackendHostNameOrIP>:6544/Channel/GetVideoSourceList
If tv_grab_zz_sdjson_sqlite was selected, then after running the four configuration commands in
the Wiki, and assuming you accepted the suggested names, you should see these additions:

Code: Select all

Example for distributions that store MythTV data relative to ~mythtv/.mythtv,

/
└── home
    └── mythtv
        ├── .mythtv
        │   ├── OTA.xmltv # Which contains:
        │   │       database=/home/mythtv/.xmltv/SchedulesDirect.DB
        │   │       lineup=USA-OTA-90210
        │   │       mythtv-categories=enabled
        │   │
        │   └── CABLE.xmltv # Which contains:
        │           database=/home/mythtv/.xmltv/SchedulesDirect.DB
        │           lineup=USA-IL90210-X
        │           mythtv-categories=enabled
        │
        └── .xmltv
            └── SchedulesDirect.DB

No files related to XMLTV are stored under the login user's .mythtv or .xmltv
If the tv_grab_zz_sdjson graber was selected, there will be no SQLite DB. But a
pointer to the cache files, which I don't use and can't speak to. Others here have
though.

As for: "Schedulesdirect.js located in op/emby-server/system/dashboard-ui/livetvsetup",
it isn't related to XMLTV or at least I don't have the file. It isn't in a path used by the
grabbers.

dragonflyoh
Newcomer
Posts: 8
Joined: Mon Nov 03, 2014 11:07 pm
United States of America

Re: XMLTV grabber for Schedules Direct JSON

Post by dragonflyoh » Wed Aug 19, 2020 3:05 pm

Changed the grabber to tv_grab_zz_sdjson_sqlite.

Now there is a SchedulesDirect.DB file in home/jim/.xmltv

When I run fill the data base after closing the backend I get an error, Unknown channel identifier Ixxxxx.json.schedulesdirect.org skipping channel.

The channel information is updated and I have guide data for 17 days. The update fails when the update is run as scheduled in the backend.

Is there a way to view the contents of SchedulesDirect.db?

I think I am making progress toward auto updating the guide data, just not there yet. Thanks for the help.

User avatar
bill6502
Developer
Posts: 1724
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: XMLTV grabber for Schedules Direct JSON

Post by bill6502 » Wed Aug 19, 2020 3:42 pm

When there is a SchedulesDirect.DB file in home/jim/.xmltv, it means
the setup was run as that user, not as the the user that runs the backend
which is typically user mythtv.

That means the command line runs will work, but the backend runs will fail.

Suggest the directories/files should look like the above ASCII art.

There are other solutions, but there's an effort to use only one, as
this is hard enough already. When running from the command
line, run it as the same user the backend uses. Try this alias
example:

Code: Select all

alias mfdb='sudo --set-home --login --user=mythtv mythfilldatabase'
and all you need to type is mfdb (or whatever alias name you like).

Look at the full log message, you'll see that it's an A[lert], not an E[rror]. It means that
the grabber is getting information for a channel that the MythTV DB isn't setup for. You
can ignore it, or update the SQLite DB channels table has the selected column=1. Set
it to 0 if you don't want guide data for that channel, Or correct the MythTV channel to
add that identifier.

sqlitebrowser can be used to look at the DB.

wesnewell
Senior
Posts: 669
Joined: Mon Jun 23, 2014 6:54 pm
Location: Wylie TX, USA
United States of America

Re: XMLTV grabber for Schedules Direct JSON

Post by wesnewell » Wed Aug 19, 2020 8:25 pm

I think if we explain why so many people have problems with this it might help.
The usual OS setup goes like this.
Boot the install CD/DVD/USB stick. When asked for user name, most people will use their name. The system sets them up as the main user. There is no mythtv user at this time.
And now the user does sudo apt-get install mythtv (or rpm or whatever depending on distro or from package manager) and the system installs all the stuff required to run a mythtv system including creating a user mythtv, but I'm user xyz. And I see mythtv-backend setup in the settings menu, so i run it. It gets run as user xyz, not user mythtv, so that's why all the SD control files end up under user xyz's home. Many people can't su to user mythtv simply because they don't know the password setup by the installer and they don't know how to change it, and it's just intuitive to just run the setup from their own menu.So yes, it would be nice if everyone ran the etup as user mythtv, but that's probably not going to happen and this will be a topic for years to come. But If they know why it happened it doesn't matter. it's a simple 5 minute fix for the slowest typist.
My personal likes.
I hate sudo so the first thing I do is create a root password.
I've found mc to be invaluable for moving copying editing files.
Can't stand the default package manager. it's slow and sucks. Install synaptic. purge snapd. Rambling..
BE/FE-Asrock AB350 Pro Ryzen 3 3200G, 6 atsc tuners. FE's-GF8200's Athlon II, Ryzen 3 2200G. Mythtv user since 2005.

dragonflyoh
Newcomer
Posts: 8
Joined: Mon Nov 03, 2014 11:07 pm
United States of America

Re: XMLTV grabber for Schedules Direct JSON

Post by dragonflyoh » Thu Aug 20, 2020 5:34 pm

I have home/mythtv/.xmltv/SchedulesDirect.DB

The login users .mythtv is empty and .xmltv has config,xml

Same issue the scheduled listing update does not work.

User avatar
bill6502
Developer
Posts: 1724
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: XMLTV grabber for Schedules Direct JSON

Post by bill6502 » Thu Aug 20, 2020 5:51 pm

The login user's .mythtv directory wasn't supposed to be empty, the
<source>.xmltv isn't supposed to be there. The "normal" things, like
config.xml and all other directories would still be there. My example
above is misleading and I fixed it.

Post Reply