MediaBrowser / Emby

Emby Server is a personal media server with apps on just about every device.
https://emby.media
GNU General Public License v2.0
4.14k stars 805 forks source link

Filename not showing properly if between two tags #598

Closed LukePulverenti closed 10 years ago

LukePulverenti commented 10 years ago

Say I have media files with tags stored as: \fs\TV\Show 1 (2013)\ [tag1] file 01 [tag2].avi [tag1] file [tag2] 02.avi

In both MB Web MediaPortal and MB Classic, file 01 would not show filename while file 02 would just show 02. MB seems to be ignoring any characters in between the 1st open and last close square brackets: [tag1] filename 01 [tag2].avi --> [tag1] filename [tag2] 02.avi --> 02

MB Server version: 3.0.5031.21343 MB Classic version: 3.0.74.0 B10-3.1

lalmanzar commented 10 years ago

So you want only the tags striped.. No matter what they are. Right?

LukePulverenti commented 10 years ago

Yea only the tmdb, tvdb and boxset ones. Couple examples:

My Movie [boxset] [blah blah]

should output

My Movie [blah blah]

Then

[tag1] file 01 [tvdbid=12345].avi

should output

[tag1] file 01.avi

ebr11 commented 10 years ago

No, that's not right. Anything in brackets is supposed to be stripped. If you don't do that we'll never find the titles with the meta fetchers.

lalmanzar commented 10 years ago

Ok.. so just strip anything?

LukePulverenti commented 10 years ago

No Luis - keep what you did, but go back to the movie db provider and update that name regex method to handle it.

LukePulverenti commented 10 years ago

Well if possible. If not possible then revert this. But I'm sure you can handle it.

ebr11 commented 10 years ago

Why make the regex more complex and slower. The whole point of me implementing this logic in the first place was to allow for all the things that put special stuff like origin and format inside square brackets. All of that is supposed to be ignored for the purposes of determining the real name.

LukePulverenti commented 10 years ago

The regex is a one time operation that never gets called again once we have the tmdb id. I think it's unintuitive to have parts of the name reserved as unsupported. And inflexible. The bracket identifiers that we support are an advanced trick and not known to very many people. Everyone else is just left guessing why the name doesn't match the filename.

ebr11 commented 10 years ago

The name will never match the file name because we replace it with the real name when we find it. This is a four year old feature of MB. For reference: http://community.mediabrowser.tv/permalinks/r/450/1206/text-bewteen-is-no-longer-ignored#1206

LukePulverenti commented 10 years ago

For movies, yea. For all other types the information between brackets is lost. If you have a game with [u] in the name there's no way to preserve that identifier, which tells you the language. Or if you name your home videos that way, unsupported. We're attracting a lot of new people who will not know about that and all it's going to do is create guess work.

LukePulverenti commented 10 years ago

Luis, why don't we do this. Let's just solve the original issues, which says that

[tag1] file 01 [tag2].avi

results in an empty file name because everything between the first [ and last ] is lost.

Can this be fixed to output

file 01

?

lalmanzar commented 10 years ago

Sure, give me 2 mins.