[solved] Mixed artist pictures (3 Viewers)

ajs

Development Group
  • Team MediaPortal
  • February 29, 2008
    15,688
    10,650
    Kyiv
    Home Country
    Ukraine Ukraine
    I'm looking for a SQL command to delete the local source record if an online record exists with the same file name.
    Select record in SQL Expert and press minus button on navigation control (above table) ...
    With this approach I would loose all Fanart pictures which are not online anymore.
    Currently I've over 7,000 Fanart pictures.
    Delete missing delete all pictures from DB, when picture present in DB but not present in Fanart folder ...
     

    horned_reaper

    Test Group
  • Team MediaPortal
  • January 7, 2011
    1,233
    461
    Munich
    Home Country
    Germany Germany
    Thanks, but with over 24,000 DB records I can't do this manually. Hence, I'm looking for a SQL command (query) to clean-up.
     
    Last edited:

    horned_reaper

    Test Group
  • Team MediaPortal
  • January 7, 2011
    1,233
    461
    Munich
    Home Country
    Germany Germany
    I partially corrected the descriptions in the configurator. The new version is available in the repository. I can add a full description to read me, or somewhere here in the forum. But I do not know in what form and whether it is necessary.

    Two typos:
    1586876004583.png

    Exception Options (delete first s)
    Don't download Fanarts for Various Artists (add t)
     

    horned_reaper

    Test Group
  • Team MediaPortal
  • January 7, 2011
    1,233
    461
    Munich
    Home Country
    Germany Germany
    I wrote a PowerShell script to clean up 586 double entries. Now let's see if the issue reoccurs.

    The issue has been reappeared, with 26 Fanarts so far. Two database records of a Fanart refer to the same picture file.
    I already had deleted all duplicate values e. g.
    Deleted local source record 10878:
    1587557892282.png

    Reappeared:
    1587556975992.png

    By the row ID 19607 you see that the online source record remained but the local record was recreated to a new record.
    I see the same issue with only local source records as well:

    Highly probable the issue is related to case-sensitivity because all duplicates have different spellings:
    FullPath
    C:\ProgramData\Team MediaPortal\MediaPortal\Thumbs\Skin FanArt\Scraper\music\Jeanette (10729).jpg
    C:\ProgramData\Team MediaPortal\MediaPortal\Thumbs\Skin FanArt\Scraper\Music\Jeanette (10729).jpg

    C:\ProgramData\Team MediaPortal\MediaPortal\Thumbs\Skin FanArt\Scraper\Music\Him (5886).jpg
    C:\ProgramData\Team MediaPortal\MediaPortal\Thumbs\Skin FanArt\Scraper\Music\HIM (5886).jpg

    C:\ProgramData\Team MediaPortal\MediaPortal\Thumbs\Skin FanArt\Scraper\music\Jeanette (5).jpg
    C:\ProgramData\Team MediaPortal\MediaPortal\Thumbs\Skin FanArt\Scraper\Music\Jeanette (5).jpg

    I did not do a FH full scan or other special things, I just played music.

    Could you please make the path check case-insensitive?
     

    Attachments

    • 1587557680904.png
      1587557680904.png
      16.4 KB
    • 1587557713167.png
      1587557713167.png
      18.5 KB
    • 1587557772185.png
      1587557772185.png
      17.6 KB
    • 1587559446038.png
      1587559446038.png
      7.6 KB

    ajs

    Development Group
  • Team MediaPortal
  • February 29, 2008
    15,688
    10,650
    Kyiv
    Home Country
    Ukraine Ukraine
    @horned_reaper
    try this select:
    SQL:
    SELECT Provider, FullPath FROM Image WHERE Provider = 'Local' AND FullPath COLLATE NOCASE IN (SELECT FullPath FROM Image WHERE Provider <> 'Local')
    or
    SQL:
    SELECT * FROM Image WHERE Provider = 'Local' AND FullPath COLLATE NOCASE IN (SELECT FullPath FROM Image WHERE Provider <> 'Local')
    if return only duplicated pictures for Local provider, then possible delete it like:
    SQL:
    DELETE FROM Image WHERE Provider = 'Local' AND FullPath COLLATE NOCASE IN (SELECT FullPath FROM Image WHERE Provider <> 'Local')
     

    horned_reaper

    Test Group
  • Team MediaPortal
  • January 7, 2011
    1,233
    461
    Munich
    Home Country
    Germany Germany
    Thank you, I have a PowerShell script to delete the duplicates as well.
    But can you fix this bug in FH?
     

    ajs

    Development Group
  • Team MediaPortal
  • February 29, 2008
    15,688
    10,650
    Kyiv
    Home Country
    Ukraine Ukraine
    But can you fix this bug in FH?
    I add NOCASE property for Column, but how its work i dont know ...
    Thank you, I have a PowerShell script to delete the duplicates as well.
    If possible, then run this SELECT, if it returns the correct value, I will add it to the database upgrade procedure.
     

    horned_reaper

    Test Group
  • Team MediaPortal
  • January 7, 2011
    1,233
    461
    Munich
    Home Country
    Germany Germany
    Many duplicate items have been found, but with both SELECT queries duplicate items with the same (local) source are not found e. g.:
    FullPathMBIDSourcePath
    C:\ProgramData\Team MediaPortal\MediaPortal\Thumbs\Skin FanArt\Scraper\music\Boney M. (7278).jpgC:\ProgramData\Team MediaPortal\MediaPortal\Thumbs\Skin FanArt\Scraper\music\Boney M. (7278).jpg
    C:\ProgramData\Team MediaPortal\MediaPortal\Thumbs\Skin FanArt\Scraper\Music\Boney M. (7278).jpgC:\ProgramData\Team MediaPortal\MediaPortal\Thumbs\Skin FanArt\Scraper\Music\Boney M. (7278).jpg
     

    Users who are viewing this thread

    Top Bottom