cytec / SynoDLNAtrakt

Synology DLNA scrobbler for trakt.tv
15 stars 4 forks source link

Error Parsing #1

Closed pwerspire closed 11 years ago

pwerspire commented 11 years ago

Hello when running the script in my Nas in las 4.1 version i'm getting this errors:

TiagoStation> python SynoDLNAtrakt.py 12.11.2012 23:38:12 ERROR : Can't check if your MeidaServer runs in Debugmode or not... 12.11.2012 23:38:12 INFO : Starting SynoDLNAtrakt... 12.11.2012 23:38:12 INFO : Parsing MediaServer log file from: /var/log/lighttpd/access.log 12.11.2012 23:38:12 ERROR : Unable to parse line: 192.168.0.13 192.168.0.19:50002 - [12/Nov/2012:23:36:07 +0000] "HEAD /v/NDLNA/611.avi HTTP/1.0" 200 0 "-" "-"

12.11.2012 23:38:12 ERROR : Unable to parse line: 192.168.0.13 192.168.0.19:50002 - [12/Nov/2012:23:36:08 +0000] "GET /v/NDLNA/611.avi HTTP/1.0" 206 145808 "-" "-"

12.11.2012 23:38:12 ERROR : Unable to parse line: 192.168.0.13 192.168.0.19:50002 - [12/Nov/2012:23:36:10 +0000] "GET /v/NDLNA/611.avi HTTP/1.0" 206 2694824 "-" "-"

12.11.2012 23:38:12 ERROR : Unable to parse line: 192.168.0.13 192.168.0.19:50002 - [12/Nov/2012:23:36:10 +0000] "GET /v/NDLNA/611.avi HTTP/1.0" 206 137117 "-" "-"

12.11.2012 23:38:12 ERROR : Unable to parse line: 192.168.0.13 192.168.0.19:50002 - [12/Nov/2012:23:36:10 +0000] "GET /v/NDLNA/611.avi HTTP/1.0" 206 137117 "-" "-"

12.11.2012 23:38:12 ERROR : Unable to parse line: 192.168.0.13 192.168.0.19:50002 - [12/Nov/2012:23:36:10 +0000] "GET /v/NDLNA/611.avi HTTP/1.0" 206 142909 "-" "-"

12.11.2012 23:38:12 ERROR : Unable to parse line: 192.168.0.13 - - [12/Nov/2012:23:36:10 +0000] "HEAD /v/NDLNA/611.avi HTTP/1.0" 200 0 "-" "-"

12.11.2012 23:38:12 ERROR : Unable to parse line: 192.168.0.13 192.168.0.19:50002 - [12/Nov/2012:23:36:12 +0000] "GET /v/NDLNA/611.avi HTTP/1.0" 206 1334613 "-" "-"

12.11.2012 23:38:12 ERROR : Unable to parse line: 192.168.0.13 192.168.0.19:50002 - [12/Nov/2012:23:36:12 +0000] "GET /v/NDLNA/611.avi HTTP/1.0" 206 629434 "-" "-"

12.11.2012 23:38:12 ERROR : Unable to parse line: 192.168.0.13 192.168.0.19:50002 - [12/Nov/2012:23:36:13 +0000] "GET /v/NDLNA/611.avi HTTP/1.0" 206 587442 "-" "-"

12.11.2012 23:38:12 ERROR : Unable to parse line: 192.168.0.13 192.168.0.19:50002 - [12/Nov/2012:23:36:13 +0000] "GET /v/NDLNA/611.avi HTTP/1.0" 206 638122 "-" "-"

12.11.2012 23:38:12 ERROR : Unable to parse line: 192.168.0.13 192.168.0.19:50002 - [12/Nov/2012:23:36:14 +0000] "GET /v/NDLNA/611.avi HTTP/1.0" 206 580202 "-" "-"

12.11.2012 23:38:12 ERROR : Unable to parse line: 192.168.0.13 192.168.0.19:50002 - [12/Nov/2012:23:36:14 +0000] "GET /v/NDLNA/611.avi HTTP/1.0" 206 528073 "-" "-"

12.11.2012 23:38:12 ERROR : Unable to parse line: 192.168.0.13 192.168.0.19:50002 - [12/Nov/2012:23:36:15 +0000] "GET /v/NDLNA/611.avi HTTP/1.0" 206 638121 "-" "-"

12.11.2012 23:38:12 ERROR : Unable to parse line: 192.168.0.13 192.168.0.19:50002 - [12/Nov/2012:23:36:15 +0000] "GET /v/NDLNA/611.avi HTTP/1.0" 206 662737 "-" "-"

12.11.2012 23:38:12 ERROR : Unable to parse line: 192.168.0.13 192.168.0.19:50002 - [12/Nov/2012:23:36:15 +0000] "GET /v/NDLNA/611.avi HTTP/1.0" 206 614953 "-" "-"

12.11.2012 23:38:12 ERROR : Unable to parse line: 192.168.0.13 192.168.0.19:50002 - [12/Nov/2012:23:36:16 +0000] "GET /v/NDLNA/611.avi HTTP/1.0" 206 561377 "-" "-"

12.11.2012 23:38:12 ERROR : Unable to parse line: 192.168.0.13 192.168.0.19:50002 - [12/Nov/2012:23:36:16 +0000] "GET /v/NDLNA/611.avi HTTP/1.0" 206 396752 "-" "-"

12.11.2012 23:38:12 ERROR : Unable to parse line: 192.168.0.13 192.168.0.19:50002 - [12/Nov/2012:23:36:17 +0000] "GET /v/NDLNA/611.avi HTTP/1.0" 206 711969 "-" "-"

12.11.2012 23:38:12 ERROR : Unable to parse line: 192.168.0.13 192.168.0.19:50002 - [12/Nov/2012:23:36:17 +0000] "GET /v/NDLNA/611.avi HTTP/1.0" 206 422369 "-" "-"

12.11.2012 23:38:12 ERROR : Unable to parse line: 192.168.0.13 192.168.0.19:50002 - [12/Nov/2012:23:36:18 +0000] "GET /v/NDLNA/611.avi HTTP/1.0" 206 384721 "-" "-"

12.11.2012 23:38:12 ERROR : Unable to parse line: 192.168.0.13 192.168.0.19:50002 - [12/Nov/2012:23:36:18 +0000] "GET /v/NDLNA/611.avi HTTP/1.0" 206 386169 "-" "-"

12.11.2012 23:38:12 ERROR : Unable to parse line: 192.168.0.13 192.168.0.19:50002 - [12/Nov/2012:23:36:19 +0000] "GET /v/NDLNA/611.avi HTTP/1.0" 206 377481 "-" "-"

Do you know what can be the problem?

Thanks

cytec commented 11 years ago

yeah it fails because of two things:

  1. atm there is no timezone support
  2. it never happened to me to get an 3 Digit ID...

im already working on this and hopefully can upload it this week...

so long you can simple fix it by changing two lines:

  1. in SynoDLNAtrakt.py change line 17 from: time_format = "[%d/%b/%Y:%H:%M:%S +0200]"

to time_format = "[%d/%b/%Y:%H:%M:%S +0000]"

to match your timezone offset

  1. in synodlnatrakt/config.py change line 19 from: logregex = "[^0-9]*(?P\d{4,5}).(?P\w{3,5})"

to logregex = "[^0-9]*(?P\d{3,5}).(?P\w{3,5})"

to manage the 3 Digit id

pwerspire commented 11 years ago

Thanks for the fast reply :)

I did the changes but i still have the errors. I can wait for your version to test, or if you have more ideas i can test for you. thanks

TiagoStation> python SynoDLNAtrakt.py 13.11.2012 00:28:36 ERROR : Can't check if your MeidaServer runs in Debugmode or not... 13.11.2012 00:28:36 INFO : Starting SynoDLNAtrakt... 13.11.2012 00:28:36 INFO : Parsing MediaServer log file from: /var/log/lighttpd/access.log 13.11.2012 00:28:36 ERROR : Unable to parse line: 192.168.0.13 192.168.0.19:50002 - [12/Nov/2012:23:36:07 +0000] "HEAD /v/NDLNA/611.avi HTTP/1.0" 200 0 "-" "-"

13.11.2012 00:28:36 ERROR : Unable to parse line: 192.168.0.13 192.168.0.19:50002 - [12/Nov/2012:23:36:08 +0000] "GET /v/NDLNA/611.avi HTTP/1.0" 206 145808 "-" "-"

13.11.2012 00:28:36 ERROR : Unable to parse line: 192.168.0.13 192.168.0.19:50002 - [12/Nov/2012:23:36:10 +0000] "GET /v/NDLNA/611.avi HTTP/1.0" 206 2694824 "-" "-"

13.11.2012 00:28:36 ERROR : Unable to parse line: 192.168.0.13 192.168.0.19:50002 - [12/Nov/2012:23:36:10 +0000] "GET /v/NDLNA/611.avi HTTP/1.0" 206 137117 "-" "-"

13.11.2012 00:28:36 ERROR : Unable to parse line: 192.168.0.13 192.168.0.19:50002 - [12/Nov/2012:23:36:10 +0000] "GET /v/NDLNA/611.avi HTTP/1.0" 206 137117 "-" "-"

13.11.2012 00:28:36 ERROR : Unable to parse line: 192.168.0.13 192.168.0.19:50002 - [12/Nov/2012:23:36:10 +0000] "GET /v/NDLNA/611.avi HTTP/1.0" 206 142909 "-" "-"

13.11.2012 00:28:36 ERROR : Unable to parse line: 192.168.0.13 - - [12/Nov/2012:23:36:10 +0000] "HEAD /v/NDLNA/611.avi HTTP/1.0" 200 0 "-" "-"

13.11.2012 00:28:36 ERROR : Unable to parse line: 192.168.0.13 192.168.0.19:50002 - [12/Nov/2012:23:36:12 +0000] "GET /v/NDLNA/611.avi HTTP/1.0" 206 1334613 "-" "-"

13.11.2012 00:28:36 ERROR : Unable to parse line: 192.168.0.13 192.168.0.19:50002 - [12/Nov/2012:23:36:12 +0000] "GET /v/NDLNA/611.avi HTTP/1.0" 206 629434 "-" "-"

13.11.2012 00:28:36 ERROR : Unable to parse line: 192.168.0.13 192.168.0.19:50002 - [12/Nov/2012:23:36:13 +0000] "GET /v/NDLNA/611.avi HTTP/1.0" 206 587442 "-" "-"

13.11.2012 00:28:36 ERROR : Unable to parse line: 192.168.0.13 192.168.0.19:50002 - [12/Nov/2012:23:36:13 +0000] "GET /v/NDLNA/611.avi HTTP/1.0" 206 638122 "-" "-"

13.11.2012 00:28:36 ERROR : Unable to parse line: 192.168.0.13 192.168.0.19:50002 - [12/Nov/2012:23:36:14 +0000] "GET /v/NDLNA/611.avi HTTP/1.0" 206 580202 "-" "-"

13.11.2012 00:28:36 ERROR : Unable to parse line: 192.168.0.13 192.168.0.19:50002 - [12/Nov/2012:23:36:14 +0000] "GET /v/NDLNA/611.avi HTTP/1.0" 206 528073 "-" "-"

13.11.2012 00:28:36 ERROR : Unable to parse line: 192.168.0.13 192.168.0.19:50002 - [12/Nov/2012:23:36:15 +0000] "GET /v/NDLNA/611.avi HTTP/1.0" 206 638121 "-" "-"

13.11.2012 00:28:36 ERROR : Unable to parse line: 192.168.0.13 192.168.0.19:50002 - [12/Nov/2012:23:36:15 +0000] "GET /v/NDLNA/611.avi HTTP/1.0" 206 662737 "-" "-"

13.11.2012 00:28:36 ERROR : Unable to parse line: 192.168.0.13 192.168.0.19:50002 - [12/Nov/2012:23:36:15 +0000] "GET /v/NDLNA/611.avi HTTP/1.0" 206 614953 "-" "-"

13.11.2012 00:28:36 ERROR : Unable to parse line: 192.168.0.13 192.168.0.19:50002 - [12/Nov/2012:23:36:16 +0000] "GET /v/NDLNA/611.avi HTTP/1.0" 206 561377 "-" "-"

13.11.2012 00:28:36 ERROR : Unable to parse line: 192.168.0.13 192.168.0.19:50002 - [12/Nov/2012:23:36:16 +0000] "GET /v/NDLNA/611.avi HTTP/1.0" 206 396752 "-" "-"

13.11.2012 00:28:36 ERROR : Unable to parse line: 192.168.0.13 192.168.0.19:50002 - [12/Nov/2012:23:36:17 +0000] "GET /v/NDLNA/611.avi HTTP/1.0" 206 711969 "-" "-"

13.11.2012 00:28:36 ERROR : Unable to parse line: 192.168.0.13 192.168.0.19:50002 - [12/Nov/2012:23:36:17 +0000] "GET /v/NDLNA/611.avi HTTP/1.0" 206 422369 "-" "-"

13.11.2012 00:28:36 ERROR : Unable to parse line: 192.168.0.13 192.168.0.19:50002 - [12/Nov/2012:23:36:18 +0000] "GET /v/NDLNA/611.avi HTTP/1.0" 206 384721 "-" "-"

13.11.2012 00:28:36 ERROR : Unable to parse line: 192.168.0.13 192.168.0.19:50002 - [12/Nov/2012:23:36:18 +0000] "GET /v/NDLNA/611.avi HTTP/1.0" 206 386169 "-" "-"

13.11.2012 00:28:36 ERROR : Unable to parse line: 192.168.0.13 192.168.0.19:50002 - [12/Nov/2012:23:36:19 +0000] "GET /v/NDLNA/611.avi HTTP/1.0" 206 377481 "-" "-"

13.11.2012 00:28:36 ERROR : Unable to parse line: 192.168.0.13 192.168.0.19:50002 - [12/Nov/2012:23:36:19 +0000] "GET /v/NDLNA/611.avi HTTP/1.0" 206 523729 "-" "-"

13.11.2012 00:28:36 ERROR : Unable to parse line: 192.168.0.13 192.168.0.19:50002 - [12/Nov/2012:23:36:19 +0000] "GET /v/NDLNA/611.avi HTTP/1.0" 206 655497 "-" "-"

13.11.2012 00:28:36 ERROR : Unable to parse line: 192.168.0.13 192.168.0.19:50002 - [12/Nov/2012:23:36:20 +0000] "GET /v/NDLNA/611.avi HTTP/1.0" 206 959577 "-" "-"

13.11.2012 00:28:36 ERROR : Unable to parse line: 192.168.0.13 192.168.0.19:50002 - [12/Nov/2012:23:36:21 +0000] "GET /v/NDLNA/611.avi HTTP/1.0" 206 558481 "-" "-"

13.11.2012 00:28:36 ERROR : Unable to parse line: 192.168.0.13 192.168.0.19:50002 - [12/Nov/2012:23:36:21 +0000] "GET /v/NDLNA/611.avi HTTP/1.0" 206 460017 "-" "-"

13.11.2012 00:28:36 ERROR : Unable to parse line: 192.168.0.13 192.168.0.19:50002 - [12/Nov/2012:23:36:21 +0000] "GET /v/NDLNA/611.avi HTTP/1.0" 206 822017 "-" "-"

13.11.2012 00:28:36 ERROR : Unable to parse line: 192.168.0.13 192.168.0.19:50002 - [12/Nov/2012:23:36:22 +0000] "GET /v/NDLNA/611.avi HTTP/1.0" 206 486081 "-" "-"

13.11.2012 00:28:36 ERROR : Unable to parse line: 192.168.0.13 192.168.0.19:50002 - [12/Nov/2012:23:36:22 +0000] "GET /v/NDLNA/611.avi HTTP/1.0" 206 458569 "-" "-"

13.11.2012 00:28:36 ERROR : Unable to parse line: 192.168.0.13 192.168.0.19:50002 - [12/Nov/2012:23:36:23 +0000] "GET /v/NDLNA/611.avi HTTP/1.0" 206 520833 "-" "-"

13.11.2012 00:28:36 ERROR : Unable to parse line: 192.168.0.13 192.168.0.19:50002 - [12/Nov/2012:23:36:23 +0000] "GET /v/NDLNA/611.avi HTTP/1.0" 206 460017 "-" "-"

13.11.2012 00:28:36 ERROR : Unable to parse line: 192.168.0.13 192.168.0.19:50002 - [12/Nov/2012:23:36:24 +0000] "GET /v/NDLNA/611.avi HTTP/1.0" 206 393409 "-" "-"

13.11.2012 00:28:36 ERROR : Unable to parse line: 192.168.0.13 192.168.0.19:50002 - [12/Nov/2012:23:36:24 +0000] "GET /v/NDLNA/611.avi HTTP/1.0" 206 486081 "-" "-"

13.11.2012 00:28:36 ERROR : Unable to parse line: 192.168.0.13 192.168.0.19:50002 - [12/Nov/2012:23:36:25 +0000] "GET /v/NDLNA/611.avi HTTP/1.0" 206 691697 "-" "-"

13.11.2012 00:28:36 ERROR : Unable to parse line: 192.168.0.13 192.168.0.19:50002 - [12/Nov/2012:23:36:25 +0000] "GET /v/NDLNA/611.avi HTTP/1.0" 206 470153 "-" "-"

13.11.2012 00:28:36 ERROR : Unable to parse line: 192.168.0.13 192.168.0.19:50002 - [12/Nov/2012:23:36:25 +0000] "GET /v/NDLNA/611.avi HTTP/1.0" 206 499113 "-" "-"

13.11.2012 00:28:36 ERROR : Unable to parse line: 192.168.0.13 192.168.0.19:50002 - [12/Nov/2012:23:36:26 +0000] "GET /v/NDLNA/611.avi HTTP/1.0" 206 626537 "-" "-"

13.11.2012 00:28:36 ERROR : Unable to parse line: 192.168.0.13 - - [12/Nov/2012:23:42:46 +0000] "HEAD /v/NDLNA/611.avi HTTP/1.0" 200 0 "-" "-"

13.11.2012 00:28:36 ERROR : Unable to parse line: 192.168.0.13 192.168.0.19:50002 - [12/Nov/2012:23:42:46 +0000] "GET /v/NDLNA/611.avi HTTP/1.0" 206 52296969 "-" "-"

13.11.2012 00:28:36 ERROR : Unable to parse line: 192.168.0.13 - - [12/Nov/2012:23:42:47 +0000] "HEAD /v/NDLNA/611.avi HTTP/1.0" 200 0 "-" "-"

13.11.2012 00:28:36 ERROR : Unable to parse line: 192.168.0.13 - - [12/Nov/2012:23:42:47 +0000] "HEAD /v/NDLNA/611.avi HTTP/1.0" 200 0 "-" "-"

13.11.2012 00:28:36 ERROR : Unable to parse line: 192.168.0.13 192.168.0.19:50002 - [12/Nov/2012:23:43:18 +0000] "HEAD /v/NDLNA/1245.mp4 HTTP/1.0" 200 0 "-" "-"

13.11.2012 00:28:36 ERROR : Unable to parse line: 192.168.0.13 192.168.0.19:50002 - [12/Nov/2012:23:43:18 +0000] "GET /v/NDLNA/1245.mp4 HTTP/1.0" 206 186348 "-" "-"

13.11.2012 00:28:36 ERROR : Unable to parse line: 192.168.0.13 192.168.0.19:50002 - [12/Nov/2012:23:43:19 +0000] "GET /v/NDLNA/1245.mp4 HTTP/1.0" 206 2403085 "-" "-"

13.11.2012 00:28:36 ERROR : Unable to parse line: 192.168.0.13 - - [12/Nov/2012:23:43:20 +0000] "HEAD /v/NDLNA/1245.mp4 HTTP/1.0" 200 0 "-" "-"

13.11.2012 00:28:36 INFO : Parsing: /var/log/lighttpd/access.log gave 0 entry(s)

cytec commented 11 years ago

strange should be working... ill do my best to upload my changed stuff tomorow ;)

cytec commented 11 years ago

should be fixed with this update :)

pwerspire commented 11 years ago

thanks, i will try it when i go back from work ;) . When you need beta testing something, i'm available to help.

thanks!

ps: Just a question, to run the script automatically, is creating a cronjob?

cytec commented 11 years ago

yeah you can create a cronjob for that... im currently working hard on v2 which will have support for background running and some other nice stuff

pwerspire commented 11 years ago

Nice! God Work :)

It's working now with the last changes that you did. I have a question, how do you in wich line of access.log file know the percentage that was been watched of the video?

I noted that if you fast forward the file, the percentage is wrong. But it's not a big issue, because is very unlikely that your fast forward so much of a video.

Everything working now :)

cytec commented 11 years ago

yeah that fast forarding is kind of a bummer... sadly the acess.log doesn't send anny start/stop or complete commands so i just calculate the time a file was send to an device.

atm i dont have any idea or other way to do that :(

pwerspire commented 11 years ago

i hope synology add some more things to this logs or capabilities to the video station. I have a sugestion for a functionality for next version. For example imagine a script that watch the folder of movies/series and when you have a new movie in the folder, it find the name and send to the trakt to a list .

Then it´s possible to have in trakt a list of movies/series that we have to see in ours Nas.

cytec commented 11 years ago

yeah i have plans for something like that...

ill currently have some basics of this working, what i do is: i get all content of the mediaserver database and run it against my scrobbled database, so everythin what is in the result "should" mostly be unviewed and will be listed in a web back end for SynoDLNAtrakt.

Sending it to trakt is nice but can be a bit tricky to handle deletion and stuff after one viewed it...

Ill see how it works once ive got to this point of code again :D

Some new Features would be really nice, idk what Synology did with 4.1 couse im still on 4.0... maybe ill update someone soon

pwerspire commented 11 years ago

yes yes this is just some idea that i had ;) . Maybe this can use the watchlist of trakt, then you don't need to remove it. just need to put seen and automaticly the track remove it from whatch list.

But no need no worry about this now, are just some ideas to be registed for future work ;)

If i had time i would help you, but i don't have much time and i don't know much of python

cytec commented 11 years ago

yeah thought of that too, but what id like to have is a list with only that stuff that is on my DS and not yet played...

im useing the trakt watchlist as a "oh i have to watch this when i have time" list atm, so there should be a list which is only for media that is on my DS and not yet played...

easyest way i think is to just query the database and print out a little website on our NAS... already got this kind of working in the v2 but its verry Basic atm and i think i have to rethink this or at least the Database elements...

i really love this idea and wanted this for ages, hopefully im able to find a nice and clean way.

EDIT: trakts list add/remove api seams not so bad at all... ill give it a try :)

pwerspire commented 11 years ago

hey again ;)

I have some problem, i watched a movie and this movie is in a folder for movies but media type is showing as tv show and fails to send to trakt.

15.11.2012 17:50:06 DEBUG : SynoDLNAtrakt.db: SELECT scrobbled from scrobble WHERE id = 1252 15.11.2012 17:50:06 INFO : processing file: /volume1/video/filmes/xxxxxxxx.avi 15.11.2012 17:50:06 DEBUG : mediatype: series, directory: / 15.11.2012 17:50:06 DEBUG : Fileid: 1252 15.11.2012 17:50:06 DEBUG : Viewed: 1:41:28 15.11.2012 17:50:06 DEBUG : Viewed Timestamp: 6088 15.11.2012 17:50:06 DEBUG : Last viewed: 2012-11-14 23:44:57, for: 1:41:28 15.11.2012 17:50:06 DEBUG : 6249 seems to be a timestamp already 15.11.2012 17:50:06 DEBUG : 6088 seems to be a timestamp already 15.11.2012 17:50:06 DEBUG : Duration: 6249s, Viewed: 6088s = 98% watched 15.11.2012 17:50:06 ERROR : cant find/open file: /volume1/video/filmes/tvshow.nfo 15.11.2012 17:50:06 INFO : Trying to guess infos from Filename... 15.11.2012 17:50:06 ERROR : Could not create series MediaElement

ini file:

psql = /usr/syno/pgsql/bin/psql accesslog = /var/log/lighttpd/access.log moviedir = /volume1/video/filmes seriesdir = /volume1/video/series try_guessing = 1 delete_logs = 0 scrobble_series = 1 use_database = 1 scrobble_movies = 1 [Advanced] logtoconsole = 1 debugmode = 1 min_progress = 80 interval = 12

pwerspire commented 11 years ago

another thing : Trying to guess infos from Filename... 15.11.2012 23:45:50 DEBUG : Type: series, Name: The Colony US, Season: 02, Episode: 01 15.11.2012 23:45:50 ERROR : Could not create series MediaElement

what is this media element? and what reasons to fail?

cytec commented 11 years ago

you have to add an "," to the end of your dirs...

moviedir = /volume1/video/filmes, seriesdir = /volume1/video/series,

that error: MediaElement is basically a dict wrapper aroud the series, movie with infos to scrobble... it fails because it doesn't get all needed infos, i guess it parsed the filename? so it send a tvdb request for: "The Colony US S02E01" but The Colony US isnt in their db so it will fail to get an tvdb id

there is only one way to fix this atm... use some sort of nfo files, like XBMC ones...

v2 will have support for a file with the tvdbid in it for series which are tricky to parse correctly :)

pwerspire commented 11 years ago

Thanks!

I will try this fix when i arrive at home :) .

Yes it's because of the US, in tvdb the title don't have it.

I Will create a nfo for wich folder with tv shows, it's the best option.

Thanks ;)

cytec commented 11 years ago

yeah maybe this will help... idk i have nfo files for most of my shows/movies... because of this problem... also there are many series which will not parse corretly. Dr Who will always be the original one from 1960, Shameless will be UK version by default ....

by having a NFO file with the tvdbid in it this could be fixed easyly... thats y i will add support for just a ".tvdb" file in the next realease... so when u realize one series didnt work as expectet you can enter the tvdbid and everything should work...

the most easy part to fix this problem: put a tvshow.nfo file in your The Colony folder example:

/volume1/video/series/The Colony/tvshow.nfo /volume1/video/series/The Colony/Season 02/The Colony US S02E01.avi

then it will get the tvdb and name from the tvshow.nfo file, the seasion end ep still from filename...

nfo should look like this: `

The Colony
     <id>105521</id>
 </tvshow>`
pwerspire commented 11 years ago

yes it's working now ! Thank you for your work and support :)

This is great!

cytec commented 11 years ago

no problem, im glad u got it working :)

pwerspire commented 11 years ago

hey new problem =P

19.11.2012 00:01:00 INFO : Sending infos for movie "Sinister" to trakt 19.11.2012 00:01:00 DEBUG : Sending infos to trakt: URL: http://api.trakt.tv/movie/scrobble/860f1d1eda847c3b934a2d942eef110e13d21b12, Data: {'username': 'xxxx', 'title': 'Sinister', 'imdb_id': 'tt1922777', 'year': u'2012', 'progress': 96, 'password': 'xxxxx'}

This is the last message i got in the log. And the movie is not marked in trakt. For tv shows is still working fine and in the movies until now was working and then stop in the last days

cytec commented 11 years ago

yeah i got this issue some times when no duration is given for the movie files... my test looks like this:

20.11.2012 11:36:17 DEBUG : Sending infos to trakt: URL: http://api.trakt.tv/movie/scrobble/860f1d1eda847c3b934a2d942eef110e13d21b12, Data: {'username': 'xxxxx', 'title': 'Sinister', 'imdb_id': 'tt1922777', 'year': 2012, 'duration': 0, 'progress': 96, 'password': 'xxxxx'} 20.11.2012 11:36:27 DEBUG : response: {'status': 'failure', 'error': 'Nothing matches the given URI'} 20.11.2012 11:36:27 DEBUG : Scrobble failed, trying to mark as seen manually... 20.11.2012 11:36:27 INFO : Sending infos for movie "Sinister" to trakt 20.11.2012 11:36:27 DEBUG : Sending infos to trakt: URL: http://api.trakt.tv/movie/seen/860f1d1eda847c3b934a2d942eef110e13d21b12, Data: {'username': 'xxxxx', 'movies': [{'title': 'Sinister', 'year': 2012, 'imdb_id': 'tt1922777'}], 'password': 'xxxxxxx'} 20.11.2012 11:36:36 DEBUG : response: {u'status': u'success', u'skipped': 0, u'already_exist': 0, u'skipped_movies': [], u'already_exist_movies': [], u'inserted': 1}

with the duration: 20.11.2012 11:39:42 DEBUG : Sending infos to trakt: URL: http://api.trakt.tv/movie/scrobble/860f1d1eda847c3b934a2d942eef110e13d21b12, Data: {'username': 'xxxxxx', 'title': 'Sinister', 'imdb_id': 'tt1922777', 'year': 2012, 'duration': 11, 'progress': 96, 'password': 'xxxxxxxxx'} 20.11.2012 11:39:42 DEBUG : response: {u'status': u'success', u'movie': {u'year': u'2012', u'tmdb_id': u'82507', u'imdb_id': u'tt1922777', u'title': u'Sinister'}, u'twitter': False, u'tumblr': False, u'facebook': False, u'message': u'scrobbled Sinister (2012)'}

duration seems to be a needed field when scrobbleing stuff to trakt... that sucks but atm there is nothing i can do about this... if there is no duration for the file it "should" be marked as seen manually by SynoDLNAtrakt.

sorry my fault... i uploaded the current up-to-date version again... seems like there went something wrong :D now it should work perfectly...

pwerspire commented 11 years ago

i'm getting this error with last version

24.11.2012 16:07:53 DEBUG : Fileid: 1475 24.11.2012 16:07:53 DEBUG : Viewed: 0:00:02 24.11.2012 16:07:53 DEBUG : Viewed Timestamp: 2 24.11.2012 16:07:53 DEBUG : Last viewed: 2012-11-20 21:24:54, for: 0:00:02 24.11.2012 16:07:53 DEBUG : 48 seems to be a timestamp already 24.11.2012 16:07:53 DEBUG : 2 seems to be a timestamp already Traceback (most recent call last): File "SynoDLNAtrakt.py", line 182, in scrobbledict = buildMediaElement(mediaelement, key) File "SynoDLNAtrakt.py", line 72, in buildMediaElement mediaelement["process"] = helper.getProcess(mediaelement["duration"], mediaelement["viewed"]) File "/usr/local/traktsynology/SynoDLNAtrakt/synodlnatrakt/helper.py", line 75, in getProcess percent = int(viewed) / (int(length) / 100) ZeroDivisionError: integer division or modulo by zero

update: the error disappear alone

cytec commented 11 years ago

yep wasnt really an error .... just wanted to divide by zero

"ZeroDivisionError: integer division or modulo by zero"

btw im making huge stept towards 2.0 ;)

pwerspire commented 11 years ago

hey,

until now everything is work perfect :)

I saw the images that you put to version 2, and they are great!

Keep the good work ;)

cytec commented 11 years ago

nice to hear :)

version 2 is going in private beta version by the time i write this... ill hopefully get some nice feedback from my testers/friends soon and im really looking forward to release it :)

there are some nice new features like the 2way sync, movie ratings, and streaming :+1: its stimm more or less a trakt.tv "client" but much more "mediacenter like"

pwerspire commented 11 years ago

WoW very nice!

Can wait to try it ;)

It looks and sound a big big improvement regarding the version 1 :+1:

cytec commented 11 years ago

thought i give you a short update... ive got a public beta version up and running on my SPK repo.

so no more git cloneing and ipkg stuff needet, simple install via DSM :) just add this url to your Package center sources and your ready to go: http://cytec.us/spk/

i would love to get some feedback from you...

pwerspire commented 11 years ago

Hey,

I will put it right now running in my system and disable the old one ;) . i'm very excited to try it.

Good work!

I will give feedback ;)

pwerspire commented 11 years ago

Hey,

I can't start it. i instaled in package center and when i try to run it, i receive a error that can´t start the service :S

cytec commented 11 years ago

Sorry my fault, forget to mention that you currently also need the python spk installed.

you can grab it here: http://www.synocommunity.com/packages or add their repo as well – as written here: http://www.synocommunity.com/repository

this should fix the issues, but you may will be asked for an user/pass if you open the website first, if just hitting enter did not work, try to write in something else, if that still not works you have to change the config file...

so basically just open "/usr/local/synodlnatrakt/var/config.ini" in a txt editor or nano/vi on your DS and enter some values for "username" and "password"

im sorry for that, but i just found out about that and working on a fix ;)

Thanks for the response and happy testing :)

pwerspire commented 11 years ago

Now it's run fine and the hitting enter when ask for the login did the trick ;).

I will try to give feedback in nextdays ;)

thanks

cytec commented 11 years ago

Nice to hear :)

Looping forward to hear your thoughts ;)

pwerspire commented 11 years ago

Something strange is happen in the settings. I receive when saving, the green popup and the red at same time. And another time i receive like 6 green and 1 red.

Other thing in setting for webserver there is username username, instead of username and password

cytec commented 11 years ago

Yeah the red one can be ignored thats because i changed some responses, already On my todo List. Tanks for pointing out the username/username Thing :)

cytec commented 11 years ago

Also the whole Notifikation System still seems to be a Bit buggy...

pwerspire commented 11 years ago

yes, the notification system is a little buggy. I need to check what i'm doing wrong with the movie folder, because they don't appear in the webpage

pwerspire commented 11 years ago

the notification now it's much better in the new version ;). I have some doubts, when should appear in the web page the movies that you have in a folder?after saving the folder path in the settings?

cytec commented 11 years ago

No, by Default it scans only for the last 20 entrys from all Folders.this is to avoid heavy memory usage. If you like to Import more entrys or entrys from a specific Folder you can do so by going to settings -> force and Klick in advanced, then you can select how much entrys to load and optionally select a single folder. If you Hit force import it should start Importing with your custom settings.

Maybe i should add an Option to Import all stuff by default? But this will most likely Take a Lot of Time and cost a Lot of CPU...

pwerspire commented 11 years ago

Default option no, but only the option to import everything with a warning that will be time and cpu consuming. That way the person can choose for example the night to do the first import all. But this can be achieve with the advance settings, so i'm not sure if it is necessary

Another thing, the Advanced Settings button if you didn't told me is a button i never would find out. I tought it was only the title

pwerspire commented 11 years ago

other thing the 0 in advance options is not working for ALL. It's importing 0 files

pwerspire commented 11 years ago

I have a sugestion for example when scrabling/importing if didn't find in tmdb/trakt the movie or tv show, can existe a page with the list of files that failed, and the possibility to add the correct code for the failed files and repeate operation

cytec commented 11 years ago

Thanks for pointing that button and 0 thing out.

I really like your error site idea ill add this for sure :)

pwerspire commented 11 years ago

Nice ;) . Right now i'm in holidays without acess to my synology, but when i go back, i will continue testing