NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 2 3 4 5 … 93 Next »
Auto top movie recorder

 
  • 0 Vote(s) - 0 Average
Auto top movie recorder
janoonk
Offline

Member

Netherlands
Posts: 105
Threads: 33
Joined: Dec 2020
#1
2021-01-19, 08:02 PM
I am working on rewriting my TV Mosaic auto top movie recording to be compatible with NextPVR, which is a .NET Core console application running on my Raspberry PI triggered once a day which scans for new movies in the EPG and checks them against IMDB. If the movie is good enough for example 10.000 votes and at least 7.0 it will get recorded. All this can be configured of course.
It uses a caching system to avoid unnecessary calls to IMDB.

I found the NextPVR EPG data in the sqlite config\npvr.db database in the EPG_EVENT table. I do a "select * from "EPG_EVENT" where description like "Film""
Is this the preferred way or is there an easy API call which get's the whole current EPG data or even filtered to some criteria?
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,626
Threads: 767
Joined: Nov 2003
#2
2021-01-19, 08:18 PM
If you try a search in the web app Search page, you can see the api call for searching for shows with certain genre or text. You might be able to use this?
janoonk
Offline

Member

Netherlands
Posts: 105
Threads: 33
Joined: Dec 2020
#3
2021-01-19, 08:26 PM (This post was last modified: 2021-01-19, 08:28 PM by janoonk.)
(2021-01-19, 08:18 PM)sub Wrote: If you try a search in the web app Search page, you can see the api call for searching for shows with certain genre or text. You might be able to use this?

Should have thought of that of course..thanks:
Code:
http://192.168.11.57:8866/services/service?format=json&method=channel.listings.search&description=%Film%

Much easier than making a connection to the database. Now I only just have to change 1 TV Mosaic API call in my program Smile
janoonk
Offline

Member

Netherlands
Posts: 105
Threads: 33
Joined: Dec 2020
#4
2021-01-19, 09:21 PM
Thinking more about this:
maybe it’s easier to make a small app that checks the IMDB rating and votes for all movies in the EPG_EVENT table and stores it in for example the rating and star_rating columns and use it respectively as votes and rating.
Then you can do an advanced recording for SD movies with these params:
Code:
description like '%Film%' and genres like '%Movie / Drama%' and channel_oid in ( select oid from channel where name not like '% HD' ) and cast(rating as decimal)>7 and cast(star_rating as decimal)>10000

I guess these columns are overwritten with every EPG update? Is there a post EPG update event where I can hook up my above script so it can update these columns? But the columns need to be set before the recurring recordings are processed by NextPVR.
Any ideas?
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 52,768
Threads: 954
Joined: May 2006
#5
2021-01-19, 09:26 PM
PostUpdateEpg.sh on the RPi.

Star ratings are shown in Kodi so that could end up looking odd. I would attach to a second database

Martin
janoonk
Offline

Member

Netherlands
Posts: 105
Threads: 33
Joined: Dec 2020
#6
2021-01-19, 10:00 PM (This post was last modified: 2021-01-19, 10:08 PM by janoonk.)
(2021-01-19, 09:26 PM)mvallevand Wrote: PostUpdateEpg.sh on the RPi.

Star ratings are shown in Kodi so that could end up looking odd.  I would attach to a second database

Martin

Are Star ratings taken from EPG data?

I would like to leverage the recurring schedule feature of NextPVR by using this advanced recording query.
I guess adding columns to the database is not a good idea because of future updates of NextPVR.

Update: hmmm attach is a cool sqlite feature. I can query multiple dbs from same connection
https://www.sqlitetutorial.net/sqlite-attach-database/

Just rewrite the advanced query by prefixing it with the attached databasename? Where can I do the attaching so NextPVR knows about the additional database?
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 52,768
Threads: 954
Joined: May 2006
#7
2021-01-19, 10:05 PM
Yes for PVR in Matrix.

With sqlite you can open two different database files and join tables for your query

Martin
janoonk
Offline

Member

Netherlands
Posts: 105
Threads: 33
Joined: Dec 2020
#8
2021-01-19, 10:41 PM
(2021-01-19, 10:05 PM)mvallevand Wrote: With sqlite you can open two different database files and join tables for your query

Yes I know, but I want to use the nextpvr advanced query for recurring schedule. But I guess there’s no way telling nextpvr to attach my database so the advanced query will use data from both databases.
Other solution could be to make a SQL migration script which adds two columns in EPG_EVENT table: imdb_rating and imdb_votes which I run once each time nextpvr gets updated.
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 52,768
Threads: 954
Joined: May 2006
#9
2021-01-19, 10:49 PM
I'm dropping out of this discussion, good luck.

Martin.
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
  Determine Server Tuner/Recorder Status from Console App 27InchSony 13 8,164 2016-12-21, 05:03 AM
Last Post: mvallevand
  Recorder plugins - Deleting tuners mvallevand 1 1,492 2012-03-29, 12:51 AM
Last Post: sub
  Recorder plugins - scheduling mvallevand 4 2,346 2012-03-26, 05:09 PM
Last Post: mvallevand
  Auto Update Schema KingArgyle 26 7,726 2006-01-16, 03:48 AM
Last Post: KingArgyle
  Dummy recorder plugin ChristianW 7 2,655 2005-09-05, 11:05 PM
Last Post: sub
  Extreme Movie Manager joche 2 1,708 2005-01-06, 09:39 PM
Last Post: joche
  Movie plugin question markm 14 5,069 2004-10-12, 05:27 PM
Last Post: sub

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode