NaPs / Kolekto

Kolekto is a really KISS movie catalog software

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

No links created for views

tetraf opened this issue · comments

With ArchLinux, python 2.7.6, last Kolekto from git (commit 77f348f). I use symlinks.

Before:

$ tree -a
.
└── .kolekto
    ├── config
    ├── metadata.db
    └── movies
        ├── b45cd3bc48c91e84b6758fe805cb5f609f7ffb1e -> ../Movies/movie.1.avi
        └── b997d57d4c5f01e28b8745e520c42280a00f4939 -> ../Movies/movie.2.avi
2 directories, 4 files

Links creation?

$ kolekto -d -V link
[debug] Executing command <bound method Link.run of <kolekto.commands.link.Link object at 0xee7f50>>
 100% [=====...=====] 2 of 2 | Time: 0:00:00
Found 0 links to delete, 0 links to create

After:

$ tree -a
.
└── .kolekto
    ├── config
    ├── metadata.db
    └── movies
        ├── b45cd3bc48c91e84b6758fe805cb5f609f7ffb1e -> ../Movies/movie.1.avi
        └── b997d57d4c5f01e28b8745e520c42280a00f4939 -> ../Movies/movie.2.avi
2 directories, 4 files

Views config:

view 'Titres' {
    pattern = '{title} ({year}).{ext}'
}
view 'Acteurs' {
    pattern = '{cast}/{title} ({year}).{ext}'
}
view 'Qualité' {
    pattern = '{quality}/{title} ({year}).{ext}'
}
view 'Année' {
    pattern = '{year|"inconnue"}/{title}.{ext}'
}
view 'Genre' {
    pattern = '{genres}/{title} ({year}).{ext}'
}
view 'Directeur' {
    pattern = '{directors}/{year} - {title}.{ext}'
}
view 'Titre français' {
    pattern = '{title_fr|original_title} ({year}).{ext}'
}
view 'Collection' {
    pattern = '{collection}/{year} - {title}.{ext}'
}
view 'Score TMDB' {
    pattern = '{tmdb_votes}/{title} ({year}).{ext}'
}
view 'Pays' {
    pattern = '{countries}/{title} ({year}).{ext}'
}
view 'État' {
    pattern = '{watched|"a.voir"}/{title} ({year}).{ext}'
}
view 'Score perso' {
    pattern = '{favorite|crap|"non.note"}/{title} ({year}).{ext}'
}

Like #17. With absolute symlinks, I don't have this bug. But I need relative symlinks, the tree is on a network mountpoint.

Ok.

I got strange result using dot in views patterns while trying to reproduce your problem:

In [5]: f = {u'ext': u'mkv', u'year': 1995, u'watched|"a.voir"': u'a.voir', u'title': u'...'}

In [6]: '{watched|"a.voir"}/{title} ({year}).{ext}'.format(**f)
---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
<ipython-input-6-9d24ab9baaac> in <module>()
----> 1 '{watched|"a.voir"}/{title} ({year}).{ext}'.format(**f)

KeyError: 'watched|"a'

I'm using the same Python version you use. Are you really using dot in your views patterns?

No. I've got the same error then I've replaced the dot by a dash.

Yes, the original problem is not related to this one. I just experienced it while trying to reproduce it. What is strange is that it doesn't seem to occur with you... It is possible to provide me a tar.gz of your tree. You can sent it to me using my email address antoine@inaps.org. Thanks.