[solved] No Fanart when playing (2 Viewers)

horned_reaper

Test Group
  • Team MediaPortal
  • January 7, 2011
    1,233
    461
    Munich
    Home Country
    Germany Germany
    this build should fix double for thumbs
    This works as well! Thank you!
    Can we use a database query to delete duplicates from the past (one-time cleanup)?
     

    ajs

    Development Group
  • Team MediaPortal
  • February 29, 2008
    15,617
    10,545
    Kyiv
    Home Country
    Ukraine Ukraine
    If this select
    SQL:
    SELECT FullPath, COUNT(Category) FROM Image WHERE SubCategory= 'MusicArtistThumbScraped' GROUP BY UPPER(FullPath) HAVING COUNT(UPPER(FullPath)) > 1 ORDER BY FullPath;
    return duplicated then this should delete it:
    SQL:
    DELETE FROM Image WHERE SubCategory= 'MusicArtistThumbScraped' AND UPPER(FullPath) IN (SELECT UPPER(FullPath) FROM Image WHERE SubCategory= 'MusicArtistThumbScraped' GROUP BY UPPER(FullPath) HAVING COUNT(UPPER(FullPath)) > 1);
    But I did not check it :whistle::coffee:
     

    horned_reaper

    Test Group
  • Team MediaPortal
  • January 7, 2011
    1,233
    461
    Munich
    Home Country
    Germany Germany
    Thanks!
    This query deletes both entries of a duplicate. Can we delete only the second occurrence?
     

    ajs

    Development Group
  • Team MediaPortal
  • February 29, 2008
    15,617
    10,545
    Kyiv
    Home Country
    Ukraine Ukraine
    If record have different providers like FanartTV and AudioDB then may be like this:
    SQL:
    DELETE FROM Image WHERE SubCategory= 'MusicArtistThumbScraped' AND Provider = 'AudioDB' AND UPPER(FullPath) IN (SELECT UPPER(FullPath) FROM Image WHERE SubCategory= 'MusicArtistThumbScraped' GROUP BY UPPER(FullPath) HAVING COUNT(UPPER(FullPath)) > 1);
     

    horned_reaper

    Test Group
  • Team MediaPortal
  • January 7, 2011
    1,233
    461
    Munich
    Home Country
    Germany Germany
    The following query doesn't return any record. Is it correct?
    SQL:
    SELECT * FROM Image WHERE SubCategory = 'MusicArtistThumbScraped' AND Provider = 'AudioDB' AND UPPER(FullPath) IN (SELECT UPPER(FullPath) FROM Image WHERE SubCategory = 'MusicArtistThumbScraped' GROUP BY UPPER(FullPath) HAVING COUNT(UPPER(FullPath)) > 1);

    1589535132053.png
     
    Last edited by a moderator:

    horned_reaper

    Test Group
  • Team MediaPortal
  • January 7, 2011
    1,233
    461
    Munich
    Home Country
    Germany Germany
    It's TheAudioDB. The following query works:
    SQL:
    Delete FROM Image WHERE SubCategory = 'MusicArtistThumbScraped' AND Provider = 'TheAudioDB' AND UPPER(FullPath) IN (SELECT UPPER(FullPath) FROM Image WHERE SubCategory = 'MusicArtistThumbScraped' GROUP BY UPPER(FullPath) HAVING COUNT(UPPER(FullPath)) > 1);

    In my opinion you can add it to the database maintenance tasks for other users having this issue.
     

    ajs

    Development Group
  • Team MediaPortal
  • February 29, 2008
    15,617
    10,545
    Kyiv
    Home Country
    Ukraine Ukraine
    In my opinion you can add it to the database maintenance tasks for other users having this issue.
    I don’t see the point, I do not have such records in the database. And if they were, they do not affect anything, they only slightly increase the size of the database. :whistle:
     

    Users who are viewing this thread

    Top Bottom