MythTV / mythtv

The official MythTV repository
https://www.mythtv.org
GNU General Public License v2.0
706 stars 347 forks source link

Dots from series name are removed while scanning #247

Closed Vollstrecker closed 1 year ago

Vollstrecker commented 4 years ago

Hi,

I'm on debian with atm version 31.0+fixes20200906.gitb282809197-dmo0~bpo10+1

After adding "Marvel's Agents of S.H.I.E.L.D." to my collection, metadata retrieval failed for every single episode. The series was shown in mythfrontend as "Marvel's Agents of S H I E L D" with all dots replaced by spaces, and that name was given to ttvdb.py, so it was lookup for a wrong series name. After editing the series name in the metadata screen back to the version with dots it just worked as expected. Doing this for all 123 episodes isn't an option, and I see no reason for this modification of the name.

rcrdnalor commented 4 years ago

Searching for S.H.I.E.L.D on the user mailing list gives http://lists.mythtv.org/pipermail/mythtv-users/2014-June/365200.html which points to an open trac issue https://code.mythtv.org/trac/ticket/12012 with attached pull request #64 and a workaround on the wiki for filenames, which can't be parsed properly: https://www.mythtv.org/wiki/Ttvdb.py#User_configuration_file

There will be always filenames which can't be parsed correctly by MythTV's metadata lookup. Does the hint on the wiki work for you?

Vollstrecker commented 4 years ago

The config override would work, yes, and I took a look at the patch in the pr, too.

For the config, I don't see a reason on removing the periods, so let every user readd needlessly removed chars even sound wrong.

For the patch in #64, that's the most complicated way to do this. Just removing line 1092 in videometadata.cpp does the trick. At least in my library, maybe in other languages or on other plattforms this causes problems, but for now I see no reason for this.

rcrdnalor commented 3 years ago

Just removing line 1092 in videometadata.cpp does the trick

Please provide more exact information, either attach a patch or state the hash value of videometadata.cpp. Rationale: The mentioned line in your stated version ("31.0+fixes20200906.gitb282809197") is a comment.

maybe in other languages or on other plattforms this causes problems, but for now I see no reason for this.

Fact: Samba on Ubuntu 18.04 (Version 4.7.6) still dislikes folder names with multiple dots at the end. That is a known limitation with Windows as well..

bennettpeter commented 3 years ago

Something that may be relevant here: Some people use periods instead of spaces in file names, for example death.in.paradise.s01e01.dvdrip.xvid.avi. In this case, logic to remove periods is probably useful. I suspect that may be why the logic exists in the code.

jpoet commented 3 years ago

I would remove all punctuation and spaces from both sides of the match, before doing the final comparison. I would also collapse the case of both sides. Then, only match if it is exact.

On Sat, Nov 7, 2020 at 9:50 AM Peter Bennett notifications@github.com wrote:

Something that may be relevant here: Some people use periods instead of spaces in file names, for example death.in.paradise.s01e01.dvdrip.xvid.avi. In this case, logic to remove periods is probably useful. I suspect that may be why the logic exists in the code.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/MythTV/mythtv/issues/247#issuecomment-723467966, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAD4GYCZQBRI4LHWHAY6ALTSOV3EXANCNFSM4SAUL4JQ .

Vollstrecker commented 3 years ago

Just removing line 1092 in videometadata.cpp does the trick

Please provide more exact information, either attach a patch or state the hash value of videometadata.cpp. Rationale: The mentioned line in your stated version ("31.0+fixes20200906.gitb282809197") is a comment.

Right, this was on master 8some time ago). On fixes it is line 1080 https://github.com/MythTV/mythtv/blob/eb3c84de5fe12831d386d15452aeb7658841e072/mythtv/libs/libmythmetadata/videometadata.cpp#L1080 at least if position == 1.

Something that may be relevant here: Some people use periods instead of spaces in file names, for example death.in.paradise.s01e01.dvdrip.xvid.avi.

Right, but I'm sure these people don't throw this all into one dir. I would guess the have at least a dir for each Series, so I would suggest to use that instead.

I would remove all punctuation and spaces from both sides of the match

When? In case of Agents of S.H.I.E.L.D., you get no match returned. if you remove them before, that is the original problem, and afterwards removing just displays the (in my oppinion) wrong series name. Like (at least in Terra-theme) "Es war einmal das Leben...", where the dots haven't been displayed, but the cover needed the dots in it's filename to be displayed.

bennettpeter commented 3 years ago

I just tested this against master, and I do not see the same problem you describe. I have mythfrontend->setup->artwork and data sources having TheMovieDB.org selected for both Movie and TV databases. I added this recording to my system on the backend (/home/storage/Video/mythtv-local/Videos is my videos storage group): "/home/storage/Video/mythtv-local/Videos/Marvel's Agents of S.H.I.E.L.D./S02E04 Face My Enemy.mkv" I ran mythutil --scanvideos On mythfrontend->Watch Videos I see Marvel's Agents of S.H.I.E.L.D. listed with a picture of the emblem as well as Coulson and his crew. When I press right arrow into the directory I see the episode plot described and the list of cast members. The name S.H.I.E.L.D is spelt correctly with its dots in the name and description. Am I doing something different or is the problem solved?

Vollstrecker commented 3 years ago

Just retried. I usually use "Season N/EE - Name" format (the german version of it), but also tried your version. I got a result when using tmdb and tvmaze but ttvdb failed. I changed localization (all three) to english but ttvdb is still called with "-l en -a DE"

Adding :  : Marvel's Agents Of S.H.I.E.L.D./S02E04 - Der Getarnte Feind.mkv : b74bbd4609313ec3
2021-05-27 08:57:53.403296 I  Running Grabber: /usr/share/mythtv/metadata/Television/ttvdb.py -l de -a DE -N Marvel's Agents Of S H I E L D Der Getarnte Feind
2021-05-27 08:57:54.338435 I  Running Grabber: /usr/share/mythtv/metadata/Television/ttvdb.py -l de -a DE -M Marvel's Agents Of S H I E L D
2021-05-27 08:57:55.540991 I  Running Grabber: /usr/share/mythtv/metadata/Movie/tmdb3.py -l de -a DE -M Marvel's Agents Of S H I E L D
2021-05-27 08:57:55.791959 I  Metadata Lookup Failed: No Results Marvel's Agents Of S H I E L D 2 4
2021-05-27 08:57:55.800881 I  No results found for Marvel's Agents Of S H I E L D 2 4
Adding :  : Marvel's Agents Of S.H.I.E.L.D./S02E04 - Der Getarnte Feind.mkv : b74bbd4609313ec3
2021-05-27 08:58:56.276334 I  Running Grabber: /usr/share/mythtv/metadata/Television/tmdb3tv.py -l de -a DE -N Marvel's Agents Of S H I E L D Der Getarnte Feind
2021-05-27 08:58:58.376978 I  Running Grabber: /usr/share/mythtv/metadata/Television/tmdb3tv.py -l de -a DE -M Marvel's Agents Of S H I E L D
2021-05-27 08:58:58.580009 I  Result Found, Season 2 Episode 4
bennettpeter commented 3 years ago

So are you saying the problem is solved if you use tmdb3? Or does tmdb3 lack a German translation?. As far as I know, tmdb3 and ttvdb support multiple languages but tvmaze does not. The tvdb support is being rewritten, but the new version apparently is very slow, so it may be best to use tmdb3 if possible. Also i do not know if the new ttvdb implementation will have the same problem with periods in the name.

Vollstrecker commented 3 years ago

I didn't check the metadata itself when trying this, but at least I got some data with tmdb3. But a short check with Arrow showed me that there are translated episode-titles but the episode description is not translated yet. So I have to wait until ttvdb.py rewrite is done. Hopefully the translated (or the english one if no localized one is present) coverart will work then, too.

I meanwile solved this by giving the series-id and fetching the metadata again. Unfortunately Terra theme doesn't support this, so it's always a long way to correct data.

Vollstrecker commented 3 years ago

It's just, the ttvdb command you see up there doesn't give anything in this command the dots are replaced by spaces. If I readd the dots like

/usr/share/mythtv/metadata/Television/ttvdb.py -l en -a EN -N "Marvel's Agents Of S.H.I.E.L.D." "Face My Enemy"

or if I just remove them:

/usr/share/mythtv/metadata/Television/ttvdb.py -l en -a EN -N "Marvel's Agents Of SHIELD" "Face My Enemy"

it works. So the current way is the only one that doesn't work.

bennettpeter commented 1 year ago

Closing this as it is very old.