SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV v9 Customizations
Forum Rules FAQs Community Downloads Today's Posts Search

Notices

SageTV v9 Customizations This forums is for discussing and sharing user-created modifications for the SageTV version 9 application created by using the SageTV Studio or through the use of external plugins. Use this forum to discuss plugins for SageTV version 9 and newer.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 03-16-2022, 06:03 AM
davidk21770 davidk21770 is offline
Sage Expert
 
Join Date: Mar 2006
Location: Maryland
Posts: 514
accessing Person:sage.Person via sagex?

My wiz.bin recently went through an explosion. No matter how far I went back, it grew quickly >250m in a few days, upwards to 950m when I was away for vacation over Christmas. My wiz has had small issues for years (shows that wouldn't stay watched), but I suspect there was a change in the latest sage 9 that made these much worse. To me, it looks like a garbage collection process does not like something in this wiz. But this wiz has been around since 2008 give or take It's the agent table that grows. People.

I tried to do the restart as described but found the xml tools to have issues. Favorites did not have their start/stop delays; watched was forgotten; if I tried to include watched I ended-up with duplicate shows. I don't remember if I even tried playlists. But then while I was pruning add-ons and updating jetty, xml dumps from the web interface broke <sigh>.

So I delved into sagex and hacked myself to a new wiz.bin. Which is stable at just shy of 50m. <Yay!> (Over 8,000 shows).

Where I need help is that I can not seem to add a favorite person. The Sage API - 9.2.6.1 says that I can use person: person-string-url-ized. This works fine with playlists, mediaids, and airingids -- but not here. It gives me a "Result: true" response, but no person is added to the favorite. Either using AddFavorite or SetFavoritePerson.

Here is an attempt to add Joss Whedon to my HD movie channels.

Code:
curl --no-progress-meter "http://...@192.168.1.99:8080/sagex/api?c=AddFavorite&filter=FavoriteID|FavoriteTitle|FavoritePresentationName&1=&2=true&3=true&4=&5=&6=person:Joss%20Whedon&7=&8=&9=&10=&11=&12=EPIXHD%3bHBOHD%3bIFCHD%3bSHOWHD%3bTCMHD%3bTMCHD&13=&14=&start=0&size=5000&encoder=xml"
It does create a favorite -- with only the channels selected.
This works fine for adding show favorites (&1=)
(And I've tried it encoding the ':' also.)

Am I missing something?
__________________
HDHomeRun x2
Cable Box via Hauppauge HD PVR and USB-UIRT
2 SageTV's HD300

Intel Core 2 Quad Q9650 @4025 MHz, 8G G.Skill Performance
DFI Lanparty DK X48-T2RS Plus; SilverStone Decathlon DA1000 (died - back to an ancient enermax)
eVGA 7900 GT KO RoHS -- Zalman VP900CU Cooling
Synology NAS 22TB
Reply With Quote
  #2  
Old 03-17-2022, 09:19 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
It would appear that person mapping is not implemented.

https://github.com/stuckless/sagetv-...Util.java#L188
Reply With Quote
  #3  
Old 03-17-2022, 01:18 PM
davidk21770 davidk21770 is offline
Sage Expert
 
Join Date: Mar 2006
Location: Maryland
Posts: 514
Quote:
Originally Posted by stuckless View Post
It would appear that person mapping is not implemented.

https://github.com/stuckless/sagetv-...Util.java#L188
Thank you! I will stop trying different combinations of possible errors .
__________________
HDHomeRun x2
Cable Box via Hauppauge HD PVR and USB-UIRT
2 SageTV's HD300

Intel Core 2 Quad Q9650 @4025 MHz, 8G G.Skill Performance
DFI Lanparty DK X48-T2RS Plus; SilverStone Decathlon DA1000 (died - back to an ancient enermax)
eVGA 7900 GT KO RoHS -- Zalman VP900CU Cooling
Synology NAS 22TB
Reply With Quote
  #4  
Old 03-18-2022, 05:20 AM
jusjoken jusjoken is offline
SageTVaholic
 
Join Date: Dec 2005
Location: Strathmore, AB
Posts: 2,727
Quote:
Originally Posted by stuckless View Post
It would appear that person mapping is not implemented.

https://github.com/stuckless/sagetv-...Util.java#L188
I have been working with this source code lately so I could take a look at this and see if I could add it in.

K
__________________
If you wish to see what I am up to and support my efforts visit my Patreon page
Reply With Quote
  #5  
Old 03-18-2022, 05:34 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Originally Posted by jusjoken View Post
I have been working with this source code lately so I could take a look at this and see if I could add it in.

K
If there's a GetPersonById and IsPersonObject apis in core SageTV then it will be pretty each to update that function (and the one after it) and then "person:somePersonId" mappings would work.
Reply With Quote
  #6  
Old 03-18-2022, 06:53 AM
jusjoken jusjoken is offline
SageTVaholic
 
Join Date: Dec 2005
Location: Strathmore, AB
Posts: 2,727
Quote:
Originally Posted by stuckless View Post
If there's a GetPersonById and IsPersonObject apis in core SageTV then it will be pretty each to update that function (and the one after it) and then "person:somePersonId" mappings would work.
I figured that part out now but the generated api does not include the PersonAPI. I am working through the code and it seems the generator build from the HTML docs located here...

http://download.sage.tv/api/sage/api/

So for example it build the PlaylistAPI from here...

http://download.sage.tv/api/sage/api/PlaylistAPI.html

But the is no PersonAPI.html so it does not generate the PersonAPI.

Is there a way to work around that or do I need to ask Jeff to create those docs ?

K
__________________
If you wish to see what I am up to and support my efforts visit my Patreon page
Reply With Quote
  #7  
Old 03-18-2022, 10:40 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Originally Posted by jusjoken View Post
I figured that part out now but the generated api does not include the PersonAPI. I am working through the code and it seems the generator build from the HTML docs located here...

http://download.sage.tv/api/sage/api/

So for example it build the PlaylistAPI from here...

http://download.sage.tv/api/sage/api/PlaylistAPI.html

But the is no PersonAPI.html so it does not generate the PersonAPI.

Is there a way to work around that or do I need to ask Jeff to create those docs ?

K
Other than manually creating it, I don't think there is an easy way. I'm surprised there is no Person.html javadocs.
Reply With Quote
  #8  
Old 03-19-2022, 08:53 AM
jusjoken jusjoken is offline
SageTVaholic
 
Join Date: Dec 2005
Location: Strathmore, AB
Posts: 2,727
I have updated sagex to include the PersonAPI but not sure I know how to test this api.

@davidk21770 If you have a test I can perform let me know or pm me and I can find a way to get you the new jar to test before I release an update.

K
__________________
If you wish to see what I am up to and support my efforts visit my Patreon page
Reply With Quote
  #9  
Old 03-25-2022, 12:45 PM
Narflex's Avatar
Narflex Narflex is online now
Sage
 
Join Date: Feb 2003
Location: Redondo Beach, CA
Posts: 6,349
It took some digging around...but I finally found the script that I had which generated the javadocs from the code. You should be able to use this to generate the new PersonAPI. If you get this generated, you can just email me the zip file for it and I can then also upload it to the server so it's there as well.

Code:
#!/bin/bash

cd `dirname $0`
pwd


BASEDIR=../..
SRCDIR=${BASEDIR}/java
OUTDIR=temp-doc

if [ "${JDK_HOME}" ] ; then
  export PATH=${PATH}:${JDK_HOME}/bin
fi

for testprog in javac javadoc java ; do
  if [ -z `which $testprog` ] ; then
    echo $testprog not on search path - add JDK to PATH or run with JDK_HOME set
    exit 1;
  fi
done


rm -fr temp-doc temp-src temp-bin

# Compiling some of the required classes -- ignore any errors
mkdir temp-bin

# exit on error from here on...
set -e
javac -d temp-bin -sourcepath ${SRCDIR} \
   ${SRCDIR}/tv/sage/util/StudioAPIProcessor.java

echo ""
echo run API processor to build dummy java files from api source files
mkdir temp-src
java -cp temp-bin \
   tv.sage.util.StudioAPIProcessor \
   ${SRCDIR}/sage/api/ \
   temp-src/sage/api

mkdir -p temp-src/sage/media/rss
cp -r ${SRCDIR}/sage/media/rss temp-src/sage/media/

# remove ReflectionAPI as that is indended to be hidden
rm temp-src/sage/api/ReflectionAPI.java


echo ""
echo "Building Javadocs"

# get version num from source Version.java
eval $(grep -e '_VERSION *=' ${SRCDIR}/sage/Version.java |\
       sed -e 's/.* \(.*_VERSION\) *= *\(.*\);/\1=\2/')

VERSION=${MAJOR_VERSION}.${MINOR_VERSION}
DOCTITLE="SageTV<sup><font size='-2'>TM</font></sup> V${VERSION} API Specification"
HEADER="<b>SageTV Platform</b><br><font size='-1'>V${VERSION}</font>"
FOOTER="<font size='-1'>SageTV is a trademark or registered trademark of
 Google, Inc. in the US and other countries.<br>Copyright 2000-2012
 Google, Inc. 1600 Amphitheatre Pkwy<br>Mountain View, CA, 94043, U.S.A.
 All Rights Reserved.</font>"
WINDOWTITLE="SageTV V${VERSION} API Specification"


javadoc \
  -classpath temp-bin \
  -package \
  -windowtitle "${WINDOWTITLE}" \
  -doctitle "${DOCTITLE}" \
  -header "${HEADER}" \
  -bottom "${FOOTER}" \
  -d  ${OUTDIR} \
  -sourcepath temp-src \
  sage.api sage.media.rss


echo "copying to stvs/doc"
cp -r temp-doc/* ${BASEDIR}/stvs/doc
__________________
Jeffrey Kardatzke
Google
Founder of SageTV
Reply With Quote
  #10  
Old 03-25-2022, 01:08 PM
jusjoken jusjoken is offline
SageTVaholic
 
Join Date: Dec 2005
Location: Strathmore, AB
Posts: 2,727
Quote:
Originally Posted by Narflex View Post
It took some digging around...but I finally found the script that I had which generated the javadocs from the code. You should be able to use this to generate the new PersonAPI. If you get this generated, you can just email me the zip file for it and I can then also upload it to the server so it's there as well.

Code:
#!/bin/bash

cd `dirname $0`
pwd


BASEDIR=../..
SRCDIR=${BASEDIR}/java
OUTDIR=temp-doc

if [ "${JDK_HOME}" ] ; then
  export PATH=${PATH}:${JDK_HOME}/bin
fi

for testprog in javac javadoc java ; do
  if [ -z `which $testprog` ] ; then
    echo $testprog not on search path - add JDK to PATH or run with JDK_HOME set
    exit 1;
  fi
done


rm -fr temp-doc temp-src temp-bin

# Compiling some of the required classes -- ignore any errors
mkdir temp-bin

# exit on error from here on...
set -e
javac -d temp-bin -sourcepath ${SRCDIR} \
   ${SRCDIR}/tv/sage/util/StudioAPIProcessor.java

echo ""
echo run API processor to build dummy java files from api source files
mkdir temp-src
java -cp temp-bin \
   tv.sage.util.StudioAPIProcessor \
   ${SRCDIR}/sage/api/ \
   temp-src/sage/api

mkdir -p temp-src/sage/media/rss
cp -r ${SRCDIR}/sage/media/rss temp-src/sage/media/

# remove ReflectionAPI as that is indended to be hidden
rm temp-src/sage/api/ReflectionAPI.java


echo ""
echo "Building Javadocs"

# get version num from source Version.java
eval $(grep -e '_VERSION *=' ${SRCDIR}/sage/Version.java |\
       sed -e 's/.* \(.*_VERSION\) *= *\(.*\);/\1=\2/')

VERSION=${MAJOR_VERSION}.${MINOR_VERSION}
DOCTITLE="SageTV<sup><font size='-2'>TM</font></sup> V${VERSION} API Specification"
HEADER="<b>SageTV Platform</b><br><font size='-1'>V${VERSION}</font>"
FOOTER="<font size='-1'>SageTV is a trademark or registered trademark of
 Google, Inc. in the US and other countries.<br>Copyright 2000-2012
 Google, Inc. 1600 Amphitheatre Pkwy<br>Mountain View, CA, 94043, U.S.A.
 All Rights Reserved.</font>"
WINDOWTITLE="SageTV V${VERSION} API Specification"


javadoc \
  -classpath temp-bin \
  -package \
  -windowtitle "${WINDOWTITLE}" \
  -doctitle "${DOCTITLE}" \
  -header "${HEADER}" \
  -bottom "${FOOTER}" \
  -d  ${OUTDIR} \
  -sourcepath temp-src \
  sage.api sage.media.rss


echo "copying to stvs/doc"
cp -r temp-doc/* ${BASEDIR}/stvs/doc
Thanks for this. I will take a shot at it and let you know what I come up with.

K
__________________
If you wish to see what I am up to and support my efforts visit my Patreon page
Reply With Quote
  #11  
Old 04-03-2022, 07:42 AM
jusjoken jusjoken is offline
SageTVaholic
 
Join Date: Dec 2005
Location: Strathmore, AB
Posts: 2,727
Attached is a test version which includes the PersonAPI.

Please test and let me know if this solves the issue for you and I will then release a new version. I have not yet looked at the other items you PM'd me with but will as time permits.

https://forums.sagetv.com/forums/att...1&d=1648993256

K
Attached Files
File Type: zip sagex-api.zip (485.3 KB, 72 views)
__________________
If you wish to see what I am up to and support my efforts visit my Patreon page
Reply With Quote
  #12  
Old 07-01-2022, 03:25 PM
jusjoken jusjoken is offline
SageTVaholic
 
Join Date: Dec 2005
Location: Strathmore, AB
Posts: 2,727
Fixed in sagex-api 9.2.8.1

This is now fixed and released...

https://forums.sagetv.com/forums/sho...&postcount=422

K
__________________
If you wish to see what I am up to and support my efforts visit my Patreon page
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can a person do this with the HD200 Hunter69 Hardware Support 3 11-23-2009 08:51 PM
Question for electrician or knowledgable person ToxMox The SageTV Community 8 10-27-2009 07:14 AM
Yet another person needing help with DVD folder playback... t4uecker SageTV Software 5 02-09-2009 04:58 PM
Poor person's web scheduling bebanovich General Discussion 2 03-18-2005 07:32 PM
Am I the only person that can't get video or audio? (BWW) stomp SageTV Software 16 05-22-2004 10:47 PM


All times are GMT -6. The time now is 11:26 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.