Nepomuk set videos Duration
Database
Score 52%
Description:

This script will search for all the tv episodes and movies known to Nepomuk on your system and add them the Duration property

requires: ffprobe

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 -- 2013-08-27
updates only videos without duration property

0.1 first release
updates movies and tv episodes

bitcrazy

4 years ago

Error: org.freedesktop.DBus.Error.Failed
Cannot set values for abstract property '<nfo:duration>'.
No duration set on the videos. The videos known to nepomuk on first run were processed, the later not.
Python 2.7
PyKDE 4.11
kross 4.11

Report

C

yehielb

4 years ago

Hi
I hope I could help.
could you please attach the entire output?

Report

bitcrazy

4 years ago

Error: org.freedesktop.DBus.Error.Failed
Cannot set values for abstract property '<nfo:duration>'.
Error: org.freedesktop.DBus.Error.Failed
Cannot set values for abstract property '<nfo:duration>'.
Error: org.freedesktop.DBus.Error.Failed
Cannot set values for abstract property '<nfo:duration>'.
Error: org.freedesktop.DBus.Error.Failed
Cannot set values for abstract property '<nfo:duration>'.
Error: org.freedesktop.DBus.Error.Failed
Cannot set values for abstract property '<nfo:duration>'.
Error: org.freedesktop.DBus.Error.Failed
Cannot set values for abstract property '<nfo:duration>'.
Error: org.freedesktop.DBus.Error.Failed
Cannot set values for abstract property '<nfo:duration>'.
Error: org.freedesktop.DBus.Error.Failed
Cannot set values for abstract property '<nfo:duration>'.
Error: org.freedesktop.DBus.Error.Failed
Cannot set values for abstract property '<nfo:duration>'.
Error: org.freedesktop.DBus.Error.Failed
Cannot set values for abstract property '<nfo:duration>'.
Error: org.freedesktop.DBus.Error.Failed
Cannot set values for abstract property '<nfo:duration>'.
Error: org.freedesktop.DBus.Error.Failed
Cannot set values for abstract property '<nfo:duration>'.
Error: org.freedesktop.DBus.Error.Failed
Cannot set values for abstract property '<nfo:duration>'.
Error: org.freedesktop.DBus.Error.Failed
Cannot set values for abstract property '<nfo:duration>'.
Error: org.freedesktop.DBus.Error.Failed
Cannot set values for abstract property '<nfo:duration>'.
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 .optional {?e nfo:duration ?duration}. FILTER (!bound(?duration)) }
0 episodes were updated

nepomukcmd query 'select ?e ?Title ?url where {?e a nmm:Movie.?e nie:url ?url .?e nie:title ?Title .optional {?e nfo:duration ?duration}. FILTER (!bound(?duration)) }'
Pink Floyd: Live at Pompeii file:///home/ds/MyVideos/Musik/Pink Floyd - Live At Pompeji.avi 3706
---snip---
---snap---
15 movies were updated

As you see the script throws 15 errors and later states the update of 15 movies. The log is truncated. At snip snap would be the other 14 movies. All have a number (duration in seconds?) after the path as the example.
I have also webminer installed. Maybe this interferes.

Report

C

yehielb

4 years ago

Hi, my first guess would be that there is a problem with the qdbus call :)
it seems that the lines that should be printed before each qdbus call are missing from the output.
or maybe you are not running the last version.

were there more lines including the url and uri?

Report

C

yehielb

4 years ago

and yes the duration is in seconds.

by the way, was the movies duration update was successful?

Report

bitcrazy

4 years ago

The log above is the whole output.
Nothing before, nothing afterwards. The videos were not updated. The videos known to nepomuk on the first run got the duration. The 15 without duration were added after the first run of your script.

Report

bitcrazy

4 years ago

I have qdbus from QT4 4.8.5 installed. I guess it is the latest.

Report

C

yehielb

4 years ago

I meant the script version.

Report

C

yehielb

4 years ago

I did not understand what you wrote.

>The videos were not updated.

so no video was updated?

>The videos known to nepomuk on the first run got the duration.

does it mean they were updated successfully?

>The 15 without duration were added after the first run of your script.

the videos were added?
were they updated by the script?

thanks,
YB

Report

bitcrazy

4 years ago

I had some videos on my computer and ran your script version 0.1. The duration was set and is visible in Dolphin. I added more videos, but the duration didn't get updated anymore. I also tried version 0.2 of your script with no effort. The script extracts the duration but fails to write it into the database.

Report

C

yehielb

4 years ago

what is the difference between the first set of videos to the second set?

is the second set known to Nepomuk? are they of type nmm:Movie or nmm:TVShow ?
are they available or on a removable device?

Report

C

yehielb

4 years ago

after a software update I ran into the same error message ...abstract property...

reinstalling nepomuk-core solved the problem.

please try and tell me if it solved your problem.

Report

4 years ago

0.2 -- 2013-08-27
updates only videos without duration property

0.1 first release
updates movies and tv episodes

product-maker Contrast 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 26 2013
added Aug 19 2013
downloads today
0
page views today 4