cjmanca / plex-credits-detect

Augments plex's built in intro detection, additionally detecting credits.
MIT License
113 stars 5 forks source link

Bad Configuration for docker #29

Closed bozoweed closed 2 years ago

bozoweed commented 2 years ago

hello i get this message : A library section has invalid information: /data/movies

but i give all volumes access .... /plex=/data /plex2=/data2 /plex3=/data3 /plex4=/data4

can you made a better exemple of use for full docker environement ?

this is my config for docker-compose.yml

plex-server:
    container_name: plex-server
    image: plexinc/pms-docker:latest
    restart: unless-stopped
    environment:
      - TZ=${TZ} # timezone, defined in .env
    network_mode: host
    volumes:  
      - /var/run/docker.sock:/var/run/docker.sock
      - ${ROOT}/config/plex/db:/config # plex database
      - ${ROOT}/config/plex/transcode:/transcode # temp transcoded files
      - ${ROOT}/complete:/data # media library
      - ${ROOT2}/complete:/data2 # media library
      - ${ROOT3}/complete:/data3 # media library
      - ${ROOT4}/complete:/data4 # media library

  plex-credits-detect:
    container_name: plex-credits-detect
    image: cjmanca/plex-credits-detect:main
    restart: unless-stopped
    environment:
      - PUID=${PUID} # default user id, defined in .env
      - PGID=${PGID} # default group id, defined in .env
      - TZ=${TZ} # timezone, defined in .env
    network_mode: host
    volumes:  
      - /var/run/docker.sock:/var/run/docker.sock
      - ${ROOT}/config/plex-credits-detect:/config # plex-credits-detect database
      - ${ROOT}/config/plex/db/Library/Application Support/Plex Media Server/Plug-in Support/Databases/:/PlexDB # plex database
      - ${ROOT}/complete:/plex # media library
      - ${ROOT2}/complete:/plex2 # media library
      - ${ROOT3}/complete:/plex3 # media library
      - ${ROOT4}/complete:/plex4 # media library
cjmanca commented 2 years ago

Take a look at my answer to this issue and see if it provides what you're needing regarding the paths: https://github.com/cjmanca/plex-credits-detect/issues/27#issuecomment-1213635886

If not, I'd like to see your ini file to troubleshoot further.

bozoweed commented 2 years ago

i have all ready seen it but that not solved my bug

bozoweed commented 2 years ago
[directories]

[intro]
introStart = 0
introEnd = 0.5
introMaxSearchPeriod = 900

[credits]
creditsStart = 0.75
creditsEnd = 1.0
creditsMaxSearchPeriod = 600

[matching]
useAudio = true
useVideo = false
introMatchCount = 0
creditsMatchCount = 1
quickDetectFingerprintSamples = 5
fullDetectFingerprintMaxSamples = 10
audioAccuracy = 4
stride = 512
sampleRate = 5512
minFrequency = 100
maxFrequency = 2750
videoAccuracy = 2
videoSizeDivisor = 50
frameRate = 1

[silence]
detectSilenceAfterCredits = true
silenceDecibels = -55

[blackframes]
detectBlackframes = true
blackframeOnlyMovies = true
blackframeUseMaxSearchPeriodForEpisodes = true
blackframeUseMaxSearchPeriodForMovies = false
blackframeScreenPercentage = 75
blackframePixelPercentage = 2
blackframeMovieMinimumMatchSeconds = 20

[timing]
shiftSegmentBySeconds = 2
minimumMatchSeconds = 20
PermittedGap = 3
PermittedGapWithMinimumEnclosure = 10

[redetection]
crawlDirectoriesOnStartup = false
recheckBlackframesOnStartup = false
recheckSilenceOnStartup = false
recheckUndetectedOnStartup = false
forceRedetect = false
redetectIfFileSizeChanges = true

[monitoring]
monitorPlexIntros = true
monitorDirectoryChanges = true

[paths]
databasePath = /config/plex-credits-detect/database
PlexDatabasePath = /PlexDB/com.plexapp.plugins.library.db
TempDirectoryPath = /config/plex-credits-detect/temp
ffmpegPath = ffmpeg
bozoweed commented 2 years ago

also try this one

[directories]
/plex/movies=/data/movies
/plex/tv=/data/tv
/plex2/movies=/data2/movies
/plex2/tv=/data2/tv
/plex3/movies=/data3/movies
/plex3/tv=/data3/tv
/plex4/movies=/data4/movies
/plex4/tv=/data4/tv

[intro]
introStart = 0
introEnd = 0.5
introMaxSearchPeriod = 900

[credits]
creditsStart = 0.75
creditsEnd = 1.0
creditsMaxSearchPeriod = 600

[matching]
useAudio = true
useVideo = false
introMatchCount = 0
creditsMatchCount = 1
quickDetectFingerprintSamples = 5
fullDetectFingerprintMaxSamples = 10
audioAccuracy = 4
stride = 512
sampleRate = 5512
minFrequency = 100
maxFrequency = 2750
videoAccuracy = 2
videoSizeDivisor = 50
frameRate = 1

[silence]
detectSilenceAfterCredits = true
silenceDecibels = -55

[blackframes]
detectBlackframes = true
blackframeOnlyMovies = true
blackframeUseMaxSearchPeriodForEpisodes = true
blackframeUseMaxSearchPeriodForMovies = false
blackframeScreenPercentage = 75
blackframePixelPercentage = 2
blackframeMovieMinimumMatchSeconds = 20

[timing]
shiftSegmentBySeconds = 2
minimumMatchSeconds = 20
PermittedGap = 3
PermittedGapWithMinimumEnclosure = 10

[redetection]
crawlDirectoriesOnStartup = false
recheckBlackframesOnStartup = false
recheckSilenceOnStartup = false
recheckUndetectedOnStartup = true
forceRedetect = false
redetectIfFileSizeChanges = true

[monitoring]
monitorPlexIntros = true
monitorDirectoryChanges = true

[paths]
databasePath = /config/plex-credits-detect/database
PlexDatabasePath = /PlexDB/com.plexapp.plugins.library.db
TempDirectoryPath = /temp/plex-credits-detect
ffmpegPath = ffmpeg
cjmanca commented 2 years ago

The message "A library section has invalid information: /data/movies" means that the plex database has an entry with invalid or unexpected information in it for the library root. So far, the times I've heard of this happening is usually old entries that don't exist anymore, but for whatever reason were never removed from the Plex Database. The message means it's ignoring that library section, but is informing you that it's invalid.

If that library section is actually in use (and should be valid), then it may be a good idea to try doing a repair on the plex database, by first doing an "Optimize Database" from within plex, and then closing both Plex Media Server and plex-credits-detect and following the guide here: https://support.plex.tv/articles/repair-a-corrupted-database/

bozoweed commented 2 years ago

okey i will try thanks,

but that not seem work , i'm gona try to fix flex db

in case my log can help

Loading global config file: /config/plex-credits-detect/fingerprint.ini First time run detected. The first run can take a long time to build up the database from your plex database. It may appear to be frozen, but give it time. Syncing newly added episodes from plex... Couldn't get tag_id from Plex Database. Make sure you've set up intro scanning and Plex has scanned at least one show before turning off Plex's default scanning.

cjmanca commented 2 years ago

As for the paths - you can either use the second ini, or change your docker-compose so that the paths are the same for plex-credits-detect as they are for Plex and use the first ini with no directories entered. Ie. use this format for both plex and PCD for the media paths:

      - ${ROOT}/complete:/data # media library
      - ${ROOT2}/complete:/data2 # media library
      - ${ROOT3}/complete:/data3 # media library
      - ${ROOT4}/complete:/data4 # media library
cjmanca commented 2 years ago

Couldn't get tag_id from Plex Database. Make sure you've set up intro scanning and Plex has scanned at least one show before turning off Plex's default scanning. That's your issue there - there's no intro tag_id in the database. Plex needs to have done it's own intro scanning on at least one TV show to generate this.

If you do have TV shows and it has detected intros before, then it may be having trouble connecting to the plex database (although usually it would give a different error in that case). The repair you're doing now may fix that, otherwise double check the path being passed via docker compose to make sure it's valid for your plex database

If you don't have any TV shows in your library, you can temporarily add one "TV Shows" library with a fake (or real) tv show that has enough "episodes" to trigger an intro scan. Once plex has done an intro scan on it, you can safely delete the library. It just needs to do at least one intro scan to create that intro tag. I'm currently unsure if it actually has to find intros for this to work, but I suspect it does, so a real TV show which has intros would be your best bet.

bozoweed commented 2 years ago

all ready have some series

image image

cjmanca commented 2 years ago

And has it done intro scanning on those series? Do you get a "skip intro" button during the intro when playing episodes from those series?

bozoweed commented 2 years ago

he didn't

cjmanca commented 2 years ago

Ok, then please turn on intro scanning in Plex:

  1. Settings > Library > "Generate intro video markers" > "as a scheduled task and when media is added") > Save Changes
  2. Edit your TV shows library > Advanced > "Enable Intro Detection" > Checked > Save Changes
  3. Then do a plex dance on one of the tv show episodes to prompt plex to generate intro markers
cjmanca commented 2 years ago

Remember - the plex-credits-detect utility isn't intended to completely replace the plex intro scanning, but rather is supplemental to it, only generating the credits while preserving the plex generated intros.

bozoweed commented 2 years ago

I didn't see the "Enable Intro Detection" in my tv show's advanded options 0_o

Ok, then please turn on intro scanning in Plex:

1. Settings > Library > "Generate intro video markers" > "as a scheduled task and when media is added") > Save Changes

2. Edit your TV shows library > Advanced > "Enable Intro Detection" > Checked > Save Changes

3. Then do a plex dance on one of the tv show episodes to prompt plex to generate intro markers
cjmanca commented 2 years ago

You don't have that option? That's strange. It should be right at the bottom: image

bozoweed commented 2 years ago

finaly found ( i have it in french the label does not seem the same thing )

cjmanca commented 2 years ago

Ok, good. Once you've done the plex dance and verified that there's intros generated, you can give the PCD utility a try again

bozoweed commented 2 years ago

oh ... my bad ... need to get a Plex Pass to use the skip intro ^^'

sorry about this x)