Author Topic: Make () and [] tags obsolete for media assets  (Read 11967 times)

dustind900

  • Full Member
  • ***
  • Posts: 104
  • Karma: +9/-3
    • View Profile
Make () and [] tags obsolete for media assets
« on: April 17, 2017, 08:49:08 AM »
When the front-end is looking for media it should look for whatever media with and without tags.

When loading assets look first for the full name then look for the name without the tags.

This is where a lot of naming problems come from. The actual romname is correct but the tags are different. This is true if someone downloads the story files on emumovies and uses newer versions of HyperList xmls to name their roms.

It would make media assets more universal to ignore the tags except when launching roms. All media and story files made as a shareable collection could be named without tags making them universal among different versions of a given naming convention.

Make sense?

Sent from my LG-H950 using Tapatalk


Pieter Hulshoff

  • Administrator
  • Hero Member
  • *****
  • Posts: 1543
  • Karma: +46/-14
    • View Profile
    • Towel 42
Re: Make () and [] tags obsolete for media assets
« Reply #1 on: April 17, 2017, 11:05:50 AM »
That doesn't sound too hard to do; I'll put it on the list for after 0.8.0 is complete. Unfortunately such an art set would only be useable with RetroFE.

I did see that truRIP's busy creating complete sets.
« Last Edit: April 17, 2017, 12:09:22 PM by Pieter Hulshoff »

ryuuji

  • Full Member
  • ***
  • Posts: 166
  • Karma: +1/-0
    • View Profile
Re: Make () and [] tags obsolete for media assets
« Reply #2 on: April 17, 2017, 01:22:50 PM »
RetroFE definitely needs some option to speed up the setting up of the collections

Pieter Hulshoff

  • Administrator
  • Hero Member
  • *****
  • Posts: 1543
  • Karma: +46/-14
    • View Profile
    • Towel 42
Re: Make () and [] tags obsolete for media assets
« Reply #3 on: April 17, 2017, 01:25:42 PM »
RetroFE definitely needs some option to speed up the setting up of the collections
Setting up the collections generally is not a problem, though MAME takes some time. Most of the delay is caused by the massive amount of graphical data that needs to be read. Try it on an SDD sometime.

Sent from my SM-G920F using Tapatalk


ryuuji

  • Full Member
  • ***
  • Posts: 166
  • Karma: +1/-0
    • View Profile
Re: Make () and [] tags obsolete for media assets
« Reply #4 on: April 17, 2017, 01:45:46 PM »
It takes pretty much and I m thinking on new people... those who don't know about setting arguments for launchers/edit paths and so on ...

dustind900

  • Full Member
  • ***
  • Posts: 104
  • Karma: +9/-3
    • View Profile
Re: Make () and [] tags obsolete for media assets
« Reply #5 on: April 17, 2017, 04:59:07 PM »
You are right. It would only be usable by RetroFE for now, but other frontends could do the same to make the art sets work. You would need multple boxart images for multidisc games and you could still have individual cd art by using the full romname.

Example:
    Sega CD - Roms
        Slam City with Scottie Pippen (USA) (Disc 1).7z
        Slam City with Scottie Pippen (USA) (Disc 2).7z
        Slam City with Scottie Pippen (USA) (Disc 3).7z
        Slam City with Scottie Pippen (USA) (Disc 4).7z

    Boxart
        Slam City with Scottie Pippen.png

    Story
        Slam City with Scottie Pippen.txt

    Cart
        Slam City with Scottie Pippen (USA) (Disc 1).png
        Slam City with Scottie Pippen (USA) (Disc 2).png
        Slam City with Scottie Pippen (USA) (Disc 3).png
        Slam City with Scottie Pippen (USA) (Disc 4).png

In this example we can save 6 unneeded images and 3 videos if we want. I'm not saying that all the media "should" be like this, but rather it "could" be and RetroFE will still work.

I'm not sure how you strip tags Pieter but a simple Regex like this works
Code: [Select]
Regex.Replace(source, @"\s*?(?:\(.*?\)|\[.*?\]|\{.*?\})", "").Trim()

ryuuji

  • Full Member
  • ***
  • Posts: 166
  • Karma: +1/-0
    • View Profile
Re: Make () and [] tags obsolete for media assets
« Reply #6 on: April 17, 2017, 05:57:17 PM »
It will be perfect if the full filename would have priority and if there is not a perfect match RetroFE to use the closest match .. for example:
Super Mario Bros (USA) (REV B).zip  ---   can't find match Super Mario Bros (USA) (REV B).png   ----- set to use --------> Super Mario Bros (USA).png

also ,as a layout maker, it would help a lot if RetroFE would choose the first word to match genre images .... instead of creating manually about 150 pngs I would need to make just a fraction of that
« Last Edit: April 17, 2017, 06:03:30 PM by ryuuji »

Pieter Hulshoff

  • Administrator
  • Hero Member
  • *****
  • Posts: 1543
  • Karma: +46/-14
    • View Profile
    • Towel 42
Re: Make () and [] tags obsolete for media assets
« Reply #7 on: April 17, 2017, 08:28:53 PM »
Please don't underestimate the performance impact of doing fuzzy matching on a large amount of files. I'm not sure you'd be happy with the results.

Sent from my SM-G920F using Tapatalk


dougan78

  • Full Member
  • ***
  • Posts: 159
  • Karma: +4/-0
    • View Profile
Re: Make () and [] tags obsolete for media assets
« Reply #8 on: April 17, 2017, 10:00:08 PM »
Please don't underestimate the performance impact of doing fuzzy matching on a large amount of files. I'm not sure you'd be happy with the results.

Sent from my SM-G920F using Tapatalk
Like commodore 64 with over 8k entries...  yeesh..  that would be slow

Sent from my SM-G920V using Tapatalk


dustind900

  • Full Member
  • ***
  • Posts: 104
  • Karma: +9/-3
    • View Profile
Re: Make () and [] tags obsolete for media assets
« Reply #9 on: April 18, 2017, 02:36:43 AM »
A combination of Jaccard distance and longest common subsequence is all that's needed to fuzzy match roms. Its lightning fast and very accurate. I really don't see why a fuzzy match would be needed anyway. As long as a standard naming convention is used just stripping the tags would be enough. As far as what ryuuji mentioned about genres we could use a name mapping file. There would of course have to be a default set of names that RetroFE uses, then just use the mapping file to match user genre names to RetroFE names.

Sent from my LG-H950 using Tapatalk


Dunuin

  • Newbie
  • *
  • Posts: 20
  • Karma: +0/-0
    • View Profile
Re: Make () and [] tags obsolete for media assets
« Reply #10 on: April 18, 2017, 02:42:46 AM »
Isn't it possible to cache the results so the fuzzy logic needs to be run only once?

Pieter Hulshoff

  • Administrator
  • Hero Member
  • *****
  • Posts: 1543
  • Karma: +46/-14
    • View Profile
    • Towel 42
Re: Make () and [] tags obsolete for media assets
« Reply #11 on: April 18, 2017, 06:57:29 AM »
A combination of Jaccard distance and longest common subsequence is all that's needed to fuzzy match roms. Its lightning fast and very accurate. I really don't see why a fuzzy match would be needed anyway. As long as a standard naming convention is used just stripping the tags would be enough. As far as what ryuuji mentioned about genres we could use a name mapping file. There would of course have to be a default set of names that RetroFE uses, then just use the mapping file to match user genre names to RetroFE names.

The performance impact is not in the algorithm; it's in the reading of the directory. As Dunuin indicated: the way to avoid that would be to read all the art file names as I enter the collection (causing delay there, but only once), and then store that for future matching.

ryuuji

  • Full Member
  • ***
  • Posts: 166
  • Karma: +1/-0
    • View Profile
Re: Make () and [] tags obsolete for media assets
« Reply #12 on: April 18, 2017, 10:30:43 AM »
Wouldn't that be a good enough option ? It's like when the metadb is created, but this will affect only once each collection

Pieter Hulshoff

  • Administrator
  • Hero Member
  • *****
  • Posts: 1543
  • Karma: +46/-14
    • View Profile
    • Towel 42
Re: Make () and [] tags obsolete for media assets
« Reply #13 on: April 18, 2017, 10:49:53 AM »
Wouldn't that be a good enough option ? It's like when the metadb is created, but this will affect only once each collection

I'm not sure; I'd have to do a check on the MAME directory to get an indication of how much time would be involved to read all the file names. Even half a second delay in opening a collection can already be felt as irritating; that's why e.g. the recursive rom directory search is an option per collection.

dustind900

  • Full Member
  • ***
  • Posts: 104
  • Karma: +9/-3
    • View Profile
Re: Make () and [] tags obsolete for media assets
« Reply #14 on: April 18, 2017, 12:53:31 PM »
I don't think MAME would be an issue. It doesn't use tags at all. So either it matches or it doesn't.

I really think this is turning into something more than it needs to be. As far as performance goes there would be little to no noticable impact to look for full romname then fallback to clean romname if no match exists. Technically unless it's a multi disc game tags aren't needed at all.

So just to reiterate my original suggestion.

When scrolling to "GameName (Tag1) (tag2).zip" inside the front-end look for media assets that match either full romname or clean romname nothing else. So if you have BoxArt that is "GameName (tag1).png" you would still get a match. This will solve missing media problems between different versions of Rom sets. The Rom names hardly ever change its the tags that get changed most.


Sent from my LG-H950 using Tapatalk