nepomuk get videos rating
Database
Score 52%
Description:

This script will search all the tv episodes and movies known to Nepomuk on your system, and update their rating property from either tvdb or tmdb

this script is an adaptation of the work done by Joerg Ehrichs (missingepisodechecker.py) as part of the webminer

I am new to python and sparql
improvements are very welcome

Enjoy,
Yehiel
Last changelog:

4 years ago

0.2 minor improvement in Nepomuk query.
when not forcing ratings update filter entries with rating property.

0.1 first release
update movies from tmdb
update tv episodes from tvdb

bitcrazy

4 years ago

After running your script against 32 movies, no ratings were added, although your script states so.
I guess, it should manipulate the star rating?

Report

C

yehielb

4 years ago

yes it should.

please attach the output if you can.

in the mean time try to run the following query to see if the are rating values to your movies:

'select ?url ?rating where {?e a nmm:Movie. ?e nao:rating ?rating.?e nie:url ?url}'

Report

bitcrazy

4 years ago

select ?e ?ShowName ?SeasonNumer ?EpisodeNumber ?url where {?e a nmm:TVShow.?e nie:url ?url .?e nmm:series ?series .?series nie:title ?ShowName .?e nmm:episodeNumber ?EpisodeNumber .?e nmm:season ?SeasonNumer .}
0 episodes were updated

nepomukcmd query 'select ?e ?Title ?url where {?e a nmm:Movie.?e nie:url ?url .?e nie:title ?Title .}'
searching for: Pink Floyd: Live at Pompeii
url=file:///home/ds/MyVideos/Musik/Pink Floyd - Live At Pompeji.avi
rating=0
title = Pink Floyd: Live at Pompeii
online score = 8.9
unnamed app(2727)/nepomuk (library) Nepomuk::ResourceData::setProperty: "The name org.kde.nepomuk.DataManagement was not provided by any .service files"
---snip---
---snap---
32 movies were updated

Same here: 32 movies are known to nepomuk and none gets a rating. Maybe I'm missing something from nepomuk? And I have webminer installed.

Report

bitcrazy

4 years ago

nepomukcmd query 'select ?url ?rating where {?e a nmm:Movie. ?e nao:rating ?rating.?e nie:url ?url}'
Total Results: 0
Execution Time: 00:00:00.11
Total Time: 00:00:00.22

Report

C

yehielb

4 years ago

it seems like the line responsible for the error is:

resource.setRating(int(round(score)))

I don't know to tell you why it is not working. but please try the following in console:

qdbus org.kde.NepomukStorage /datamanagement

Report

bitcrazy

4 years ago

#>qdbus org.kde.NepomukStorage /datamanagement
method void org.kde.nepomuk.DataManagement.addProperty(QString resource, QString property, QDBusVariant value, QString app)
method void org.kde.nepomuk.DataManagement.addProperty(QStringList resources, QString property, QVariantList values, QString app)
method void org.kde.nepomuk.DataManagement.clearCache()
method QString org.kde.nepomuk.DataManagement.createResource(QString type, QString label, QString description, QString app)
method QString org.kde.nepomuk.DataManagement.createResource(QStringList types, QString label, QString description, QString app)
method QDBusRawType::a(sa{sv}) org.kde.nepomuk.DataManagement.describeResources(QStringList resources, int flags, QStringList targetParties)
method QString org.kde.nepomuk.DataManagement.exportResources(QStringList resources, QString mimeType, int flags, QStringList targetParties)
method void org.kde.nepomuk.DataManagement.importResources(QString url, QString serialization, int identificationMode, int flags, QString app)
method void org.kde.nepomuk.DataManagement.importResources(QString url, QString serialization, int identificationMode, int flags, QVariantMap additionalMetadata, QString app)
method void org.kde.nepomuk.DataManagement.mergeResources(QString resource1, QString resource2, QString app)
method void org.kde.nepomuk.DataManagement.mergeResources(QStringList resources, QString app)
method void org.kde.nepomuk.DataManagement.removeDataByApplication(QStringList resources, int flags, QString app)
method void org.kde.nepomuk.DataManagement.removeDataByApplication(int flags, QString app)
method void org.kde.nepomuk.DataManagement.removeProperties(QString resource, QString property, QString app)
method void org.kde.nepomuk.DataManagement.removeProperties(QStringList resources, QStringList properties, QString app)
method void org.kde.nepomuk.DataManagement.removeProperty(QString resource, QString property, QDBusVariant value, QString app)
method void org.kde.nepomuk.DataManagement.removeProperty(QStringList resources, QString property, QVariantList values, QString app)
method void org.kde.nepomuk.DataManagement.removeResources(QString resource, int flags, QString app)
method void org.kde.nepomuk.DataManagement.removeResources(QStringList resources, int flags, QString app)
method void org.kde.nepomuk.DataManagement.setProperty(QString resource, QString property, QDBusVariant value, QString app)
method void org.kde.nepomuk.DataManagement.setProperty(QStringList resources, QString property, QVariantList values, QString app)
method QDBusVariant org.freedesktop.DBus.Properties.Get(QString interface_name, QString property_name)
method QVariantMap org.freedesktop.DBus.Properties.GetAll(QString interface_name)
method void org.freedesktop.DBus.Properties.Set(QString interface_name, QString property_name, QDBusVariant value)
method QString org.freedesktop.DBus.Introspectable.Introspect()
method QString org.freedesktop.DBus.Peer.GetMachineId()
method void org.freedesktop.DBus.Peer.Ping()

Report

bitcrazy

4 years ago

Hello,

take a look at the sql queries in the script. They are messed up, I guess

Report

bitcrazy

4 years ago

Forget it. It is sparql. My fault.

Report

C

yehielb

4 years ago

you remind me off my first response :) that was not so long ago...

Report

C

yehielb

4 years ago

you remind me of my first response :) that was not so long ago...

Report

overmind88

4 years ago

Which icontheme?

Report

C

yehielb

4 years ago

Neon by FRUiT

Report

4 years ago

0.2 minor improvement in Nepomuk query.
when not forcing ratings update filter entries with rating property.

0.1 first release
update movies from tmdb
update tv episodes from tvdb

product-maker overmind88 Aug 19 2013

product-maker 6 6

File (click to download) Version Description Filetype Packagetype License Downloads Date Filesize OCS-Install DL
Details
version
0.2
updated Aug 29 2013
added Aug 18 2013
downloads today
0
page views today 2