It is currently September 29th, 2024, 5:20 am

Display recently added items from Kodi web interface?

General topics related to Rainmeter.
cemara
Posts: 28
Joined: March 2nd, 2015, 10:22 am

Re: Display recently added items from Kodi web interface?

Post by cemara »

jsmorley wrote:WebParser doesn't know or care about any particular data format, XML, JSON or anything else. It simply sees what comes back as plain text, and it is up to you to parse the information using regular expression. Any text returned by the site that follows some pattern that you can use with regular expression to extract the data you want should be fine.
Yeah.. i think i kinda figured out the regexp part..

Image

But i can't seem to figure out why the value wont appear on rainmeter.. I tried modding Illustro's network skin to test if it works.. But it wont return any value..

Code: Select all

; Lines starting ; (semicolons) are commented out.
; That is, they do not affect the code and are here for demonstration purposes only.
; ----------------------------------

[Rainmeter]
; This section contains general settings that can be used to change how Rainmeter behaves.
Update=1000
Background=#@#Background.png
; #@# is equal to Rainmeter\Skins\illustro\@Resources
BackgroundMode=3
BackgroundMargins=0,34,0,14

[Metadata]
; Contains basic information of the skin.
Name=Network
Author=poiru
Information=Shows your IP address and network activity.
License=Creative Commons BY-NC-SA 3.0
Version=1.0.0

[Variables]
; Variables declared here can be used later on between two # characters (e.g. #MyVariable#).
fontName=Trebuchet MS
textSize=8
colorBar=235,170,0,255
colorText=255,255,255,205
maxDownload=10485760
MaxUpload=10485760
; Set maxDownload and maxUpload to your maximum download and upload speed in bits.
; To convert kilobits, megabits, kilobytes, and megabytes into bits, go to www.google.com
; and search for something like "10 megabytes in bits".

; ----------------------------------
; MEASURES return some kind of value
; ----------------------------------

[measureIP]
; This measure returns your IP. WebParser measures are relatively complicated. If you're a beginner with
; Rainmeter, take a look at some of the other illustro skins before modifying this one.
Measure=Plugin
Plugin=WebParser
URL=http://cemara:kodi@192.168.0.147:8080/jsonrpc?request={"jsonrpc":"2.0","method":"VideoLibrary.GetRecentlyAddedMovies","id":1,"params":[["year" , "thumbnail"],{"end":10,"start":0}]}
UpdateRate=14400
RegExp=(?siU)"label":(.*),"movieid.*"year":(.*)}.*"image:(.*)","year
StringIndex=1

; Substitute works as follows: "A":"B" where A is a string to substitute and B is a string
; to substitute with. In this case, it substutes "" (i.e. empty) to N/A

[measureNetIn]
Measure=NetIn
NetInSpeed=#maxDownload#
; NetInSpeed must be set so your maximun download speed for the download bar to scale correctly

[measureNetOut]
Measure=NetOut
NetOutSpeed=#maxUpload#

; ----------------------------------
; STYLES are used to "centralize" options
; ----------------------------------

[styleTitle]
StringAlign=Center
StringCase=Upper
StringStyle=Bold
StringEffect=Shadow
FontEffectColor=0,0,0,50
FontColor=#colorText#
FontFace=#fontName#
FontSize=10
AntiAlias=1
ClipString=1

[styleLeftText]
StringAlign=Left
; Meters using styleLeftText will be left-aligned.
StringCase=None
StringStyle=Bold
StringEffect=Shadow
FontEffectColor=0,0,0,20
FontColor=#colorText#
FontFace=#fontName#
FontSize=#textSize#
AntiAlias=1
ClipString=1

[styleRightText]
StringAlign=Right
StringCase=None
StringStyle=Bold
StringEffect=Shadow
FontEffectColor=0,0,0,20
FontColor=#colorText#
FontFace=#fontName#
FontSize=#textSize#
AntiAlias=1
ClipString=1

[styleBar]
BarColor=#colorBar#
BarOrientation=HORIZONTAL
SolidColor=255,255,255,15

[styleSeperator]
SolidColor=255,255,255,15

; ----------------------------------
; METERS display images, text, bars, etc.
; ----------------------------------

[meterTitle]
Meter=String
MeterStyle=styleTitle
; Using MeterStyle=styleTitle will basically "copy" the
; contents of the [styleTitle] section here during runtime.
X=100
Y=12
W=190
H=18
Text=Network
; Even though the text is set to Network, Rainmeter will display
; it as NETWORK, because styleTitle contains StringCase=Upper.

[meterIPLabel]
Meter=String
MeterStyle=styleLeftText
X=10
Y=40
W=190
H=14
Text=IP Address

[meterIPValue]
Meter=String
MeterStyle=styleRightText
MeasureName=measureIP
X=200
Y=0r
; r stands for relative. In this case, the Y postition of meterValueCPU is 0 pixels
; below the Y value of the previous meter (i.e it's the same as in meterLabelCPU).
W=190
H=14
; %1 stands for the value of MeasureName (measureIP in this case).

[meterSeperator]
Meter=Image
MeterStyle=styleSeperator
X=10
Y=52
W=190
H=1

[meterUploadLabel]
Meter=String
MeterStyle=styleLeftText
X=10
Y=60
W=190
H=14
Text=Upload

[meterUploadValue]
Meter=String
MeterStyle=styleRightText
MeasureName=measureNetOut
X=200
Y=0r
W=190
H=14
Text=%1B/s
NumOfDecimals=1
AutoScale=1
; Because measureIP returns the current upload speed in bytes, we must use AutoScale=1 to
; automatically scale the value into a more readable figure.

[meterUploadBar]
Meter=Bar
MeterStyle=styleBar
MeasureName=measureNetOut
X=10
Y=72
W=190
H=1

[meterDownloadLabel]
Meter=String
MeterStyle=styleLeftText
X=10
Y=80
W=190
H=14
Text=Download

[meterDownloadValue]
Meter=String
MeterStyle=styleRightText
MeasureName=measureNetIn
X=200
Y=0r
W=190
H=14
Text=%1B/s
NumOfDecimals=1
AutoScale=1

[meterDownloadBar]
Meter=Bar
MeterStyle=styleBar
MeasureName=measureNetIn
X=10
Y=92
W=190
H=1
MeasureIP is supposed to show the #1 stringindex value.. which is "The Call Up"
But it's blank... any idea why?
Also i tried enable debugging but WebParserDump.txt wont appear
Bekarfel
Posts: 217
Joined: May 16th, 2012, 5:38 am

Re: Display recently added items from Kodi web interface?

Post by Bekarfel »

It's not displaying anything because you don't have any child webparsers to display the data. See: https://docs.rainmeter.net/manual/plugins/webparser/ for information on using Webparser properly
moshi wrote:there are many Rainmeter skins that aren't really useful, so let's add another one.
jsmorley wrote:I have good news and bad news.
First the bad news. [...] We would be happy to have this happen and would love to work with anyone who is feeling ambitious.
Now the good news.
I lied, there isn't any good news...
cemara
Posts: 28
Joined: March 2nd, 2015, 10:22 am

Re: Display recently added items from Kodi web interface?

Post by cemara »

Bekarfel wrote:It's not displaying anything because you don't have any child webparsers to display the data. See: https://docs.rainmeter.net/manual/plugins/webparser/ for information on using Webparser properly

Code: Select all

; Lines starting ; (semicolons) are commented out.
; That is, they do not affect the code and are here for demonstration purposes only.
; ----------------------------------

[Rainmeter]
; This section contains general settings that can be used to change how Rainmeter behaves.
Update=1000
Background=#@#Background.png
; #@# is equal to Rainmeter\Skins\illustro\@Resources
BackgroundMode=3
BackgroundMargins=0,34,0,14

[Metadata]
; Contains basic information of the skin.
Name=Network
Author=poiru
Information=Shows your IP address and network activity.
License=Creative Commons BY-NC-SA 3.0
Version=1.0.0

[Variables]
; Variables declared here can be used later on between two # characters (e.g. #MyVariable#).
fontName=Trebuchet MS
textSize=8
colorBar=235,170,0,255
colorText=255,255,255,205
maxDownload=10485760
MaxUpload=10485760
; Set maxDownload and maxUpload to your maximum download and upload speed in bits.
; To convert kilobits, megabits, kilobytes, and megabytes into bits, go to www.google.com
; and search for something like "10 megabytes in bits".

; ----------------------------------
; MEASURES return some kind of value
; ----------------------------------

[measureIP]
; This measure returns your IP. WebParser measures are relatively complicated. If you're a beginner with
; Rainmeter, take a look at some of the other illustro skins before modifying this one.
Measure=Plugin
Plugin=WebParser
URL=http://cemara:kodi@192.168.0.147:8080/jsonrpc?request={"jsonrpc":"2.0","method":"VideoLibrary.GetRecentlyAddedMovies","id":1,"params":[["year" , "thumbnail"],{"end":10,"start":0}]}
UpdateRate=14400
RegExp=(?siU)"label":(.*),"movieid
Substitute="":"N/A"
; Substitute works as follows: "A":"B" where A is a string to substitute and B is a string
; to substitute with. In this case, it substutes "" (i.e. empty) to N/A
Debug=2

[measureKodi]
Measure=Plugin
Plugin=WebParser
URL=[measureIP]
StringIndex=1

[measureNetIn]
Measure=NetIn
NetInSpeed=#maxDownload#
; NetInSpeed must be set so your maximun download speed for the download bar to scale correctly

[measureNetOut]
Measure=NetOut
NetOutSpeed=#maxUpload#

; ----------------------------------
; STYLES are used to "centralize" options
; ----------------------------------

[styleTitle]
StringAlign=Center
StringCase=Upper
StringStyle=Bold
StringEffect=Shadow
FontEffectColor=0,0,0,50
FontColor=#colorText#
FontFace=#fontName#
FontSize=10
AntiAlias=1
ClipString=1

[styleLeftText]
StringAlign=Left
; Meters using styleLeftText will be left-aligned.
StringCase=None
StringStyle=Bold
StringEffect=Shadow
FontEffectColor=0,0,0,20
FontColor=#colorText#
FontFace=#fontName#
FontSize=#textSize#
AntiAlias=1
ClipString=1

[styleRightText]
StringAlign=Right
StringCase=None
StringStyle=Bold
StringEffect=Shadow
FontEffectColor=0,0,0,20
FontColor=#colorText#
FontFace=#fontName#
FontSize=#textSize#
AntiAlias=1
ClipString=1

[styleBar]
BarColor=#colorBar#
BarOrientation=HORIZONTAL
SolidColor=255,255,255,15

[styleSeperator]
SolidColor=255,255,255,15

; ----------------------------------
; METERS display images, text, bars, etc.
; ----------------------------------

[meterTitle]
Meter=String
MeterStyle=styleTitle
; Using MeterStyle=styleTitle will basically "copy" the
; contents of the [styleTitle] section here during runtime.
X=100
Y=12
W=190
H=18
Text=Network
; Even though the text is set to Network, Rainmeter will display
; it as NETWORK, because styleTitle contains StringCase=Upper.

[meterIPLabel]
Meter=String
MeterStyle=styleLeftText
X=10
Y=40
W=190
H=14
Text=Title

[meterKodi]
Meter=String
MeterStyle=styleRightText
MeasureName=measureKodi
X=200
Y=0r
; r stands for relative. In this case, the Y postition of meterValueCPU is 0 pixels
; below the Y value of the previous meter (i.e it's the same as in meterLabelCPU).
W=190
H=14
; %1 stands for the value of MeasureName (measureIP in this case).

[meterSeperator]
Meter=Image
MeterStyle=styleSeperator
X=10
Y=52
W=190
H=1

[meterUploadLabel]
Meter=String
MeterStyle=styleLeftText
X=10
Y=60
W=190
H=14
Text=Upload

[meterUploadValue]
Meter=String
MeterStyle=styleRightText
MeasureName=measureNetOut
X=200
Y=0r
W=190
H=14
Text=%1B/s
NumOfDecimals=1
AutoScale=1
; Because measureIP returns the current upload speed in bytes, we must use AutoScale=1 to
; automatically scale the value into a more readable figure.

[meterUploadBar]
Meter=Bar
MeterStyle=styleBar
MeasureName=measureNetOut
X=10
Y=72
W=190
H=1

[meterDownloadLabel]
Meter=String
MeterStyle=styleLeftText
X=10
Y=80
W=190
H=14
Text=Download

[meterDownloadValue]
Meter=String
MeterStyle=styleRightText
MeasureName=measureNetIn
X=200
Y=0r
W=190
H=14
Text=%1B/s
NumOfDecimals=1
AutoScale=1

[meterDownloadBar]
Meter=Bar
MeterStyle=styleBar
MeasureName=measureNetIn
X=10
Y=92
W=190
H=1
This? Still wont work though... What did i miss?
Also has the debugging syntax changed? Debug=2 doesnt work..
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5534
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Display recently added items from Kodi web interface?

Post by eclectic-tech »

There is a RegExp RESERVED CHARACTER that must be 'escaped' ... } is the issue.
You will probably see an error in the !Log regarding the Webparser. This can be a very valueable tool when troubleshooting.

Change RegExp to:

Code: Select all

RegExp=(?siU)"label":(.*),"movieid.*"year":(.*)\}.*"image:(.*)","year
cemara
Posts: 28
Joined: March 2nd, 2015, 10:22 am

Re: Display recently added items from Kodi web interface?

Post by cemara »

eclectic-tech wrote:There is a RegExp RESERVED CHARACTER that must be 'escaped' ... } is the issue.
You will probably see an error in the !Log regarding the Webparser. This can be a very valueable tool when troubleshooting.

Change RegExp to:

Code: Select all

RegExp=(?siU)"label":(.*),"movieid.*"year":(.*)\}.*"image:(.*)","year
Tried that but Still no luck though :(
You mean log in About Rainmeter? It doesn't show anything related to webparsing...
It shows WebParsierDump.txt being generated on the same folder but i cant find it anywhere...
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5534
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Display recently added items from Kodi web interface?

Post by eclectic-tech »

Try this version. I modified the regexp and added some options to the webparser measure to force reload.

You may, or may not, need to set the set the codepage to a different number based on the information you receive from the actual URL; 1252 is Windows default, 1200 is for UTF-16 unicode (see the info linked).

I tested with a copy of the movie parsed info you posted. It returns the first 3 movies in the list. The skin will show the first one only until you add more meters.

Also make sure your skin file is encoded to access Unicode. USC-2 LE BOM is what all rainmeter skins should be...
Editors:
Unicode (Windows Notepad.exe)
UCS-2 LE BOM (Notepad++)
UTF-16 LE (Sublime Text)

Code: Select all

; Lines starting ; (semicolons) are commented out.
; That is, they do not affect the code and are here for demonstration purposes only.
; ----------------------------------

[Rainmeter]
; This section contains general settings that can be used to change how Rainmeter behaves.
Update=1000
Background=#@#Background.png
; #@# is equal to Rainmeter\Skins\illustro\@Resources
BackgroundMode=3
BackgroundMargins=0,34,0,14

[Metadata]
; Contains basic information of the skin.
Name=Network
Author=poiru
Information=Shows your IP address and network activity.
License=Creative Commons BY-NC-SA 3.0
Version=1.0.0

[Variables]
; Variables declared here can be used later on between two # characters (e.g. #MyVariable#).
fontName=Trebuchet MS
textSize=8
colorBar=235,170,0,255
colorText=255,255,255,205
maxDownload=10485760
MaxUpload=10485760
; Set maxDownload and maxUpload to your maximum download and upload speed in bits.
; To convert kilobits, megabits, kilobytes, and megabytes into bits, go to www.google.com
; and search for something like "10 megabytes in bits".

; ----------------------------------
; MEASURES return some kind of value
; ----------------------------------

[measureMovies]
; This measure returns your IP. WebParser measures are relatively complicated. If you're a beginner with
; Rainmeter, take a look at some of the other illustro skins before modifying this one.
Measure=Plugin
Plugin=WebParser
; URL="file://#CurrentPath#kodi2.txt"
URL=http://cemara:kodi@192.168.0.147:8080/jsonrpc?request={"jsonrpc":"2.0","method":"VideoLibrary.GetRecentlyAddedMovies","id":1,"params":[["year" , "thumbnail"],{"end":10,"start":0}]}
RegExp=(?siU).*"movies":.*"label":"(.*)".*"label":"(.*)".*"label":"(.*)"
ForceReload=1
; Codepage=1252

; Substitute works as follows: "A":"B" where A is a string to substitute and B is a string
; to substitute with. In this case, it substutes "" (i.e. empty) to N/A

[MeasureWebParserChildM1]
Measure=Plugin
Plugin=WebParser
Url=[measureMovies]
StringIndex=1

[MeasureWebParserChildM2]
Measure=Plugin
Plugin=WebParser
Url=[measureMovies]
StringIndex=2

[MeasureWebParserChildM3]
Measure=Plugin
Plugin=WebParser
Url=[measureMovies]
StringIndex=3

[measureNetIn]
Measure=NetIn
NetInSpeed=#maxDownload#
; NetInSpeed must be set so your maximun download speed for the download bar to scale correctly

[measureNetOut]
Measure=NetOut
NetOutSpeed=#maxUpload#

; ----------------------------------
; STYLES are used to "centralize" options
; ----------------------------------

[styleTitle]
StringAlign=Center
StringCase=Upper
StringStyle=Bold
StringEffect=Shadow
FontEffectColor=0,0,0,50
FontColor=#colorText#
FontFace=#fontName#
FontSize=10
AntiAlias=1
ClipString=1

[styleLeftText]
StringAlign=Left
; Meters using styleLeftText will be left-aligned.
StringCase=None
StringStyle=Bold
StringEffect=Shadow
FontEffectColor=0,0,0,20
FontColor=#colorText#
FontFace=#fontName#
FontSize=#textSize#
AntiAlias=1
ClipString=1

[styleRightText]
StringAlign=Right
StringCase=None
StringStyle=Bold
StringEffect=Shadow
FontEffectColor=0,0,0,20
FontColor=#colorText#
FontFace=#fontName#
FontSize=#textSize#
AntiAlias=1
ClipString=1

[styleBar]
BarColor=#colorBar#
BarOrientation=HORIZONTAL
SolidColor=255,255,255,15

[styleSeperator]
SolidColor=255,255,255,15

; ----------------------------------
; METERS display images, text, bars, etc.
; ----------------------------------

[meterTitle]
Meter=String
MeterStyle=styleTitle
; Using MeterStyle=styleTitle will basically "copy" the
; contents of the [styleTitle] section here during runtime.
X=100
Y=12
W=190
H=18
Text=Network
; Even though the text is set to Network, Rainmeter will display
; it as NETWORK, because styleTitle contains StringCase=Upper.

[meterIPLabel]
Meter=String
MeterStyle=styleLeftText
X=10
Y=40
W=190
H=14
Text=IP Address

[meterIPValue]
Meter=String
MeterStyle=styleRightText
MeasureName=measureWebParserChildM1
X=200
Y=0r
; r stands for relative. In this case, the Y postition of meterValueCPU is 0 pixels
; below the Y value of the previous meter (i.e it's the same as in meterLabelCPU).
W=190
H=14
; %1 stands for the value of MeasureName (measureIP in this case).

[meterSeperator]
Meter=Image
MeterStyle=styleSeperator
X=10
Y=52
W=190
H=1

[meterUploadLabel]
Meter=String
MeterStyle=styleLeftText
X=10
Y=60
W=190
H=14
Text=Upload

[meterUploadValue]
Meter=String
MeterStyle=styleRightText
MeasureName=measureNetOut
X=200
Y=0r
W=190
H=14
Text=%1B/s
NumOfDecimals=1
AutoScale=1
; Because measureIP returns the current upload speed in bytes, we must use AutoScale=1 to
; automatically scale the value into a more readable figure.

[meterUploadBar]
Meter=Bar
MeterStyle=styleBar
MeasureName=measureNetOut
X=10
Y=72
W=190
H=1

[meterDownloadLabel]
Meter=String
MeterStyle=styleLeftText
X=10
Y=80
W=190
H=14
Text=Download

[meterDownloadValue]
Meter=String
MeterStyle=styleRightText
MeasureName=measureNetIn
X=200
Y=0r
W=190
H=14
Text=%1B/s
NumOfDecimals=1
AutoScale=1

[meterDownloadBar]
Meter=Bar
MeterStyle=styleBar
MeasureName=measureNetIn
X=10
Y=92
W=190
H=1
Let me know If you are still not able to see the data.
cemara
Posts: 28
Joined: March 2nd, 2015, 10:22 am

Re: Display recently added items from Kodi web interface?

Post by cemara »

eclectic-tech wrote:Try this version. I modified the regexp and added some options to the webparser measure to force reload.

You may, or may not, need to set the set the codepage to a different number based on the information you receive from the actual URL; 1252 is Windows default, 1200 is for UTF-16 unicode (see the info linked).

I tested with a copy of the movie parsed info you posted. It returns the first 3 movies in the list. The skin will show the first one only until you add more meters.

Also make sure your skin file is encoded to access Unicode. USC-2 LE BOM is what all rainmeter skins should be...
Editors:
Unicode (Windows Notepad.exe)
UCS-2 LE BOM (Notepad++)
UTF-16 LE (Sublime Text)

Code: Select all

; Lines starting ; (semicolons) are commented out.
; That is, they do not affect the code and are here for demonstration purposes only.
; ----------------------------------

[Rainmeter]
; This section contains general settings that can be used to change how Rainmeter behaves.
Update=1000
Background=#@#Background.png
; #@# is equal to Rainmeter\Skins\illustro\@Resources
BackgroundMode=3
BackgroundMargins=0,34,0,14

[Metadata]
; Contains basic information of the skin.
Name=Network
Author=poiru
Information=Shows your IP address and network activity.
License=Creative Commons BY-NC-SA 3.0
Version=1.0.0

[Variables]
; Variables declared here can be used later on between two # characters (e.g. #MyVariable#).
fontName=Trebuchet MS
textSize=8
colorBar=235,170,0,255
colorText=255,255,255,205
maxDownload=10485760
MaxUpload=10485760
; Set maxDownload and maxUpload to your maximum download and upload speed in bits.
; To convert kilobits, megabits, kilobytes, and megabytes into bits, go to www.google.com
; and search for something like "10 megabytes in bits".

; ----------------------------------
; MEASURES return some kind of value
; ----------------------------------

[measureMovies]
; This measure returns your IP. WebParser measures are relatively complicated. If you're a beginner with
; Rainmeter, take a look at some of the other illustro skins before modifying this one.
Measure=Plugin
Plugin=WebParser
; URL="file://#CurrentPath#kodi2.txt"
URL=http://cemara:kodi@192.168.0.147:8080/jsonrpc?request={"jsonrpc":"2.0","method":"VideoLibrary.GetRecentlyAddedMovies","id":1,"params":[["year" , "thumbnail"],{"end":10,"start":0}]}
RegExp=(?siU).*"movies":.*"label":"(.*)".*"label":"(.*)".*"label":"(.*)"
ForceReload=1
; Codepage=1252

; Substitute works as follows: "A":"B" where A is a string to substitute and B is a string
; to substitute with. In this case, it substutes "" (i.e. empty) to N/A

[MeasureWebParserChildM1]
Measure=Plugin
Plugin=WebParser
Url=[measureMovies]
StringIndex=1

[MeasureWebParserChildM2]
Measure=Plugin
Plugin=WebParser
Url=[measureMovies]
StringIndex=2

[MeasureWebParserChildM3]
Measure=Plugin
Plugin=WebParser
Url=[measureMovies]
StringIndex=3

[measureNetIn]
Measure=NetIn
NetInSpeed=#maxDownload#
; NetInSpeed must be set so your maximun download speed for the download bar to scale correctly

[measureNetOut]
Measure=NetOut
NetOutSpeed=#maxUpload#

; ----------------------------------
; STYLES are used to "centralize" options
; ----------------------------------

[styleTitle]
StringAlign=Center
StringCase=Upper
StringStyle=Bold
StringEffect=Shadow
FontEffectColor=0,0,0,50
FontColor=#colorText#
FontFace=#fontName#
FontSize=10
AntiAlias=1
ClipString=1

[styleLeftText]
StringAlign=Left
; Meters using styleLeftText will be left-aligned.
StringCase=None
StringStyle=Bold
StringEffect=Shadow
FontEffectColor=0,0,0,20
FontColor=#colorText#
FontFace=#fontName#
FontSize=#textSize#
AntiAlias=1
ClipString=1

[styleRightText]
StringAlign=Right
StringCase=None
StringStyle=Bold
StringEffect=Shadow
FontEffectColor=0,0,0,20
FontColor=#colorText#
FontFace=#fontName#
FontSize=#textSize#
AntiAlias=1
ClipString=1

[styleBar]
BarColor=#colorBar#
BarOrientation=HORIZONTAL
SolidColor=255,255,255,15

[styleSeperator]
SolidColor=255,255,255,15

; ----------------------------------
; METERS display images, text, bars, etc.
; ----------------------------------

[meterTitle]
Meter=String
MeterStyle=styleTitle
; Using MeterStyle=styleTitle will basically "copy" the
; contents of the [styleTitle] section here during runtime.
X=100
Y=12
W=190
H=18
Text=Network
; Even though the text is set to Network, Rainmeter will display
; it as NETWORK, because styleTitle contains StringCase=Upper.

[meterIPLabel]
Meter=String
MeterStyle=styleLeftText
X=10
Y=40
W=190
H=14
Text=IP Address

[meterIPValue]
Meter=String
MeterStyle=styleRightText
MeasureName=measureWebParserChildM1
X=200
Y=0r
; r stands for relative. In this case, the Y postition of meterValueCPU is 0 pixels
; below the Y value of the previous meter (i.e it's the same as in meterLabelCPU).
W=190
H=14
; %1 stands for the value of MeasureName (measureIP in this case).

[meterSeperator]
Meter=Image
MeterStyle=styleSeperator
X=10
Y=52
W=190
H=1

[meterUploadLabel]
Meter=String
MeterStyle=styleLeftText
X=10
Y=60
W=190
H=14
Text=Upload

[meterUploadValue]
Meter=String
MeterStyle=styleRightText
MeasureName=measureNetOut
X=200
Y=0r
W=190
H=14
Text=%1B/s
NumOfDecimals=1
AutoScale=1
; Because measureIP returns the current upload speed in bytes, we must use AutoScale=1 to
; automatically scale the value into a more readable figure.

[meterUploadBar]
Meter=Bar
MeterStyle=styleBar
MeasureName=measureNetOut
X=10
Y=72
W=190
H=1

[meterDownloadLabel]
Meter=String
MeterStyle=styleLeftText
X=10
Y=80
W=190
H=14
Text=Download

[meterDownloadValue]
Meter=String
MeterStyle=styleRightText
MeasureName=measureNetIn
X=200
Y=0r
W=190
H=14
Text=%1B/s
NumOfDecimals=1
AutoScale=1

[meterDownloadBar]
Meter=Bar
MeterStyle=styleBar
MeasureName=measureNetIn
X=10
Y=92
W=190
H=1
Let me know If you are still not able to see the data.
Still nothing though.. So you're able to see it in your pc?
notepad++ encoding is already set to UCS2 LE BOM, setting code 1200 and 1252 did nothing
Tried version 3.3 but it's the same.. there's no value at all.. Maybe problems with local LAN links?

Edit : yep.. it works on local directory, i tried

Code: Select all

URL="file://#CurrentPath#kodi.txt"
And it returns the value correctly.. so it's definitely a problem with parsing local LAN links
FYI, the PC with rainmeter queries data using web browser through JSON RPC from Kodi server machine,
which is in the same LAN..
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5534
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Display recently added items from Kodi web interface?

Post by eclectic-tech »

Not sure what else to try, I have no experience with JSON RPC from Kodi server... :D

If you add Debug=2 to the webparser measure, the WebParserDump.txt will be created in the same folder as your skin and should show you what the parser is seeing from the URL (I thought that was how you got the posted info?!).

I will try to find info in the Kodi JSON RPC and post a reply if I think there is a way to get this working.
It's a holiday weekend, so I may not reply until later next week.

Good luck, sorry I couldn't find a simple solution :)
cemara
Posts: 28
Joined: March 2nd, 2015, 10:22 am

Re: Display recently added items from Kodi web interface?

Post by cemara »

eclectic-tech wrote:Not sure what else to try, I have no experience with JSON RPC from Kodi server... :D

If you add Debug=2 to the webparser measure, the WebParserDump.txt will be created in the same folder as your skin and should show you what the parser is seeing from the URL (I thought that was how you got the posted info?!).

I will try to find info in the Kodi JSON RPC and post a reply if I think there is a way to get this working.
It's a holiday weekend, so I may not reply until later next week.

Good luck, sorry I couldn't find a simple solution :)
Its alright, appreciate the help... :)
Debug =2 doesnt work.. it says its generating webparserdump.txt in the log tab but i couldnt find it anywhere.. i got the regexp value from rainregexp tool recommended in first page..

I guess this isnt possible yet in rainmeter...
A dirty workaround is to autogenerate text file based on json query in kodi server.. then let rainmeter read that text file.. but i tried webparsing text file in shared computer and it doesnt work.. maybe im missing something.. will try again tomorrow..
Still.. i prefer json webparsing cause it's much simpler and efficient..
i wish it could work in future versions..
Bekarfel
Posts: 217
Joined: May 16th, 2012, 5:38 am

Re: Display recently added items from Kodi web interface?

Post by Bekarfel »

Where does rainmeter say it is writing your webparser dump to? It shouldn't be "anywhere", but in the exact location Rainmeter says it is.
moshi wrote:there are many Rainmeter skins that aren't really useful, so let's add another one.
jsmorley wrote:I have good news and bad news.
First the bad news. [...] We would be happy to have this happen and would love to work with anyone who is feeling ambitious.
Now the good news.
I lied, there isn't any good news...