Req Detect tmdb#id in filename
#16
i was editing my revious message while you wrote yours. !!
yes i test
Reply
#17
a small remark
at the beginning of file tmdb.py don't forget to add

import re
Reply
#18
Hi,
(cannot post earlier : this forum have a limit to 9 posts per 24h Sad )

So I have test and it looks perfectly on a lot of test #id (to try I have just create some empty files named "dummy (tmdb#id).avi" )

BUT ... there is a but : some #id don't works ??!! ... exemples :
"dummy(tmdb#85870).avi" = KO
"dummy(tmdb#285).avi" = OK

I will randomly check more #id and will post KO tomorrow ... to help found the problem ...
Reply
#19
2022-05-31 07:42:25.495 T:10404    INFO <general>: [metadata.themoviedb.org.python]: Find movie with title 'dummy [tmdb#85870]' from year 'None'
2022-05-31 07:42:25.690 T:10404    INFO <general>: [metadata.themoviedb.org.python]: Find mo1vie tmdb with title 'dummy [tmdb#85870]'  media '{'type': 'tmdb', 'id': '85870'}' result '{'adult': False, 'backdrop_path': ........

'dummy [tmdb#85870]'  is Ok
'dummy (tmdb#85870)' is Not OK
'dummy (tmdb#285)' => dummy (2002)    is Not OK because it search for dummy (year=none)

i guess that with () kodi first thought is was a year  and  search for title=dummy,  year=tmdb#85870 (ie none)
when it found a movie without year it's "dummy (2002)"
try with
dummy (tmdb#38700) => dummy (2002)
dummy [tmdb#38700]= > bad boys for life (2020)
but
dummy (tmdb#38700) (2020) => dummy (2020) it's a real movie name !
dummy [tmdb#38700] (2020) => bad boys for life (2020)
dummy tmdb#38700 => bad boys for life (2020)

so don't use () for the moment use [] or nothing
Reply
#20
OK, I will try to use [ ] for tmdb#id instead of ( ) ... I will test tonight ...  just need a batch filerenamer ... Rofl
Reply
#21
Sad ... still don't work, looks like the bug is in the scrapper ou the tmdb API ...

Some not working files :
clo [tmdb#85870].mkv
in the forest [395452].avi
HP1 [tmdb#671].mkv


but this one works fine :
tmdb#672.mkv

More ... if I rename 'clo [tmdb#85870].mkv' to 'tmdb#85870.mkv' ... it's working ... the true is elsewhere ... ??!?

Any idea ?!
Reply
#22
More tests ... less understandable ...

Need tests from another Kodi user.

Bye.
Reply
#23
sorry for you but
clo [tmdb#85870].mkv ) => cloclo (2012)
same for tmdb#85870.mkv
same for HP1 [tmdb#671].mkv==> harry potter à l'ecole des sorciers (2001)

are you sure your code are ok ?
...but i stop as you want another user

my mistake :
in advancedsettings.xml
for your examples working, i need to add
<cleanstrings> <regexp>\(.*\)?</regexp> </cleanstrings>
Reply
#24
(2022-05-31, 20:12)michelb2 Wrote: sorry for you but
clo [tmdb#85870].mkv ) => cloclo (2012)
same for tmdb#85870.mkv
same for HP1 [tmdb#671].mkv==> harry potter à l'ecole des sorciers (2001)

are you sure your code are ok ?
...but i stop as you want another user

my mistake :
in advancedsettings.xml
for your examples working, i need to add
<cleanstrings> <regexp>\(.*\)?</regexp> </cleanstrings>

oh it's working for you ? ... nice, so the problem is here !
Quote:...but i stop as you want another user
"an other user" = "not me" !!!  Angel
... you are fine, I like your help, thanks (but I'm not 100% sure to correctly understand what you wrote ?!  Tongue ... feel like you was angry ... Sad )

...
...
...

so I will check with <cleanstrings> <regexp>\(.*\)?</regexp> </cleanstrings>

you add it in advancedsettings.xml ? ( where ? Wink ... the <cleanstrings> tag already exist ? )
Reply
#25
Hi world,

any news about this request ?

Does anybody have try this ?

Thanks,
bye.
Reply

Logout Mark Read Team Forum Stats Members Help
Detect tmdb#id in filename0