Jump to content

Mixed content type library broken?


qta

Recommended Posts

Hi guys,

 

 

I have a mixed content type library, that was working before, I think before I upgraded to 4.3.0.26. Now, in the Library page, I see this (it is named "Shorts"):

 

5dd9d1232aca7_emby_lib_error.png

 

 

What happened? Emby still sees the content, and I can play them back, but I cannot do anything with this Library anymore: there is no three-dot menu, no options, no click is working...

Could you perhaps help me to clean it up, so I could recreate it? Or maybe how to fix it...?

 

Thanks

Link to comment
Share on other sites

Happy2Play

Have you done a full library scan?

 

Odd that you would still see the content.  But all the same discussion here.

 

https://emby.media/community/index.php?/topic/79481-43025-path-for-tv-shows-lost/

 

 

You will probably have to look at the libraries options.xml directly.  Don't know your OS but you will need to look in your Emby programdata path.  In Windows it is "C:\Users\username\AppData\Roaming\Emby-Server\programdata\root\default\libraryname".  Is the path correct in the options.xml?

 

Example

  <PathInfos>
    <MediaPathInfo>
      <Path>C:\Users\user\Desktop\Videos\Movies - nfo</Path>
    </MediaPathInfo>
    <MediaPathInfo>
      <Path>C:\Users\user\Desktop\Videos\Kids Movies</Path>
    </MediaPathInfo>
  </PathInfos>
Link to comment
Share on other sites

I'm on Linux...

qta@htpc:~$ cat /var/lib/emby-server/root/default/Shorts/options.xml
<?xml version="1.0"?>
<LibraryOptions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <EnableArchiveMediaFiles>false</EnableArchiveMediaFiles>
  <EnablePhotos>true</EnablePhotos>
  <EnableRealtimeMonitor>true</EnableRealtimeMonitor>
  <EnableChapterImageExtraction>false</EnableChapterImageExtraction>
  <ExtractChapterImagesDuringLibraryScan>false</ExtractChapterImagesDuringLibraryScan>
  <DownloadImagesInAdvance>false</DownloadImagesInAdvance>
  <PathInfos>
    <MediaPathInfo>
      <Path>/mnt/Shorts</Path>
      <NetworkPath>\\OMV\export\Shorts\</NetworkPath>
    </MediaPathInfo>
  </PathInfos>
  <SaveLocalMetadata>false</SaveLocalMetadata>
  <SaveLocalThumbnailSets>false</SaveLocalThumbnailSets>
  <ImportMissingEpisodes>false</ImportMissingEpisodes>
  <EnableAutomaticSeriesGrouping>true</EnableAutomaticSeriesGrouping>
  <EnableEmbeddedTitles>false</EnableEmbeddedTitles>
  <EnableAudioResume>false</EnableAudioResume>
  <AutomaticRefreshIntervalDays>0</AutomaticRefreshIntervalDays>
  <PreferredMetadataLanguage />
  <MetadataCountryCode />
  <SeasonZeroDisplayName>Specials</SeasonZeroDisplayName>
  <MetadataSavers />
  <DisabledLocalMetadataReaders />
  <LocalMetadataReaderOrder>
    <string>Nfo</string>
  </LocalMetadataReaderOrder>
  <DisabledSubtitleFetchers />
  <SubtitleFetcherOrder>
    <string>Open Subtitles</string>
  </SubtitleFetcherOrder>
  <SkipSubtitlesIfEmbeddedSubtitlesPresent>false</SkipSubtitlesIfEmbeddedSubtitlesPresent>
  <SkipSubtitlesIfAudioTrackMatches>false</SkipSubtitlesIfAudioTrackMatches>
  <SubtitleDownloadLanguages />
  <RequirePerfectSubtitleMatch>false</RequirePerfectSubtitleMatch>
  <SaveSubtitlesWithMedia>true</SaveSubtitlesWithMedia>
  <ForcedSubtitlesOnly>false</ForcedSubtitlesOnly>
  <TypeOptions>
    <TypeOptions>
      <Type>Series</Type>
      <MetadataFetchers>
        <string>TheTVDB</string>
        <string>TheMovieDb</string>
      </MetadataFetchers>
      <MetadataFetcherOrder>
        <string>MyAnimeList</string>
        <string>Proxer</string>
        <string>AniSearch</string>
        <string>AniList</string>
        <string>AniDB</string>
        <string>TheTVDB</string>
        <string>TheMovieDb</string>
        <string>The Open Movie Database</string>
      </MetadataFetcherOrder>
      <ImageFetchers>
        <string>TheTVDB</string>
        <string>FanArt</string>
      </ImageFetchers>
      <ImageFetcherOrder>
        <string>Proxer</string>
        <string>MyAnimeList</string>
        <string>AniSearch</string>
        <string>AniList</string>
        <string>AniDB</string>
        <string>TheTVDB</string>
        <string>FanArt</string>
        <string>TheMovieDb</string>
      </ImageFetcherOrder>
      <ImageOptions />
    </TypeOptions>
    <TypeOptions>
      <Type>Season</Type>
      <MetadataFetchers />
      <MetadataFetcherOrder>
        <string>AniDB</string>
        <string>TheMovieDb</string>
      </MetadataFetcherOrder>
      <ImageFetchers>
        <string>TheTVDB</string>
      </ImageFetchers>
      <ImageFetcherOrder>
        <string>Proxer</string>
        <string>MyAnimeList</string>
        <string>AniSearch</string>
        <string>AniList</string>
        <string>AniDB</string>
        <string>TheTVDB</string>
        <string>FanArt</string>
      </ImageFetcherOrder>
      <ImageOptions />
    </TypeOptions>
    <TypeOptions>
      <Type>Episode</Type>
      <MetadataFetchers>
        <string>TheTVDB</string>
      </MetadataFetchers>
      <MetadataFetcherOrder>
        <string>AniDB</string>
        <string>TheTVDB</string>
        <string>The Open Movie Database</string>
        <string>TheMovieDb</string>
      </MetadataFetcherOrder>
      <ImageFetchers>
        <string>TheTVDB</string>
        <string>Screen Grabber</string>
      </ImageFetchers>
      <ImageFetcherOrder>
        <string>TheTVDB</string>
        <string>TheMovieDb</string>
        <string>The Open Movie Database</string>
        <string>Screen Grabber</string>
      </ImageFetcherOrder>
      <ImageOptions />
    </TypeOptions>
    <TypeOptions>
      <Type>Movie</Type>
      <MetadataFetchers>
        <string>TheMovieDb</string>
      </MetadataFetchers>
      <MetadataFetcherOrder>
        <string>TheMovieDb</string>
        <string>The Open Movie Database</string>
      </MetadataFetcherOrder>
      <ImageFetchers>
        <string>TheMovieDb</string>
        <string>FanArt</string>
        <string>Screen Grabber</string>
      </ImageFetchers>
      <ImageFetcherOrder>
        <string>TheMovieDb</string>
        <string>FanArt</string>
        <string>The Open Movie Database</string>
        <string>Screen Grabber</string>
      </ImageFetcherOrder>
      <ImageOptions />
    </TypeOptions>
  </TypeOptions>
  <CollapseSingleItemFolders>false</CollapseSingleItemFolders>
  <MinResumePct>5</MinResumePct>
  <MaxResumePct>90</MaxResumePct>
  <MinResumeDurationSeconds>180</MinResumeDurationSeconds>
  <ThumbnailImagesIntervalSeconds>-1</ThumbnailImagesIntervalSeconds>
</LibraryOptions>qta@htpc:~$

And one of the files on the path...

qta@htpc:~$ cat /mnt/Shorts/The.Story.of.Petroleum.1923.720p.BluRay.x264-fty.mkv.sha
37895cbe2806e9944a6c82321edd9a0919c9a015 *The.Story.of.Petroleum.1923.720p.BluRay.x264-fty.mkv
qta@htpc:~$

So the path is fine...

 

Also:

qta@htpc:~$ cat /var/lib/emby-server/root/default/Shorts/Shorts.mblink
/mnt/Shortsqta@htpc:~$

Tried to see what is the difference with other Library items, and the option file is nearly identical, have you made some changes in the library structure? I have seen some items in the release-notes about mixed libraries, as I have many other libraries, and every other is perfectly fine.

 

Is there any other entry anywhere that could get corrupt?

Link to comment
Share on other sites

Happy2Play

Please try remove the trailing slash in the network path as discussed in the other topic.  Shut down Emby, edit the options.xml, restart Emby, perform a library scan.

 

I haven't tested the combination of that with folder and network paths with trailing slashes though.

 

Note the .mblinks have been deprecated.

Edited by Happy2Play
Link to comment
Share on other sites

I did what @@Happy2Play suggested, but still nothing has changed: I edited the paths and removed the trailing slash, and restarted Emby, then ran a Library scan.

 

I have read the linked topic, and my issue is a bit different: I cannot click on this library in any way, shape or form, there is no little tree-dot menu, cannot click on the name, etc... it seems internally something got borked.

Edited by qta
Link to comment
Share on other sites

I only have the Emby config backup plugin generated last 10 dumps, which does not contain everything I believe, but if you can use the oldest one, I can upload it somewhere.

 

I was fiddling with debug logs, and also looked into the library.db file with SQLite:

 

I remember once /var/lib/emby was renamed /var/lib/emby-server. Then I created a symbolic link between the two, to continue to use Emby and everything was great. And now I have seen in the debug logs that the only options.xml that was parsed back with the /var/lib/emby folder was the Shorts library (only one, so correlates very well with the issue). And peeking into the DB (I made a dump and grepped a bit) I see many rows have this old folder in it (and not just this library, but others as well), so I presume that over time, this totally blew the DB away, and now is the time that you guys were not expecting this at all.

 

I think I will start over, the library for me is nothing sort of golden territory, so no big deal redoing everything from scratch. Not that I need to do it often, this is my biggest problem in this year using Emby :D

 

Thanks anyway, I think this does not require too much digging deep, as it might be a mess.

Link to comment
Share on other sites

Hi,

 

I figured I will doctor a little with the DB if I will dump it, to see maybe if I can fix it...

 

What I did:

  • Stopped emby-server
  • Made sure /var/lib/emby-server is the only folder there, I removed /var/lib/emby softlink
  • Edited /etc/passwd for emby, fixed his home folder, and made him loginable, gave him a password as well
  • Used sqlite3 to dump the whole DB, and started searching for '/var/lib/emby' marks, notied the database
  • Switched to emby user
  • For each DB I found, I dumped the DB to a file, and used sed to replace all occurrences of this folder, then dropped the table and reloaded the fixed one from the file (I had to fix two tables: MediaItems and TypedBaseItems only)
  • Started emby-server

Now I have my Library back :D

And I hope everything will be smooth in the future. Definitely the issue was I was using Emby for 2 years now, and a lot has changed, and I also fiddled with the config in ways you guys did not expect it.

 

 

Thanks

Link to comment
Share on other sites

Happy2Play

FYI MediaItems table replaced TypeBaseItems I believe in v4.  So old databases can be bloated with all tables that are depreciated.

Edited by Happy2Play
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...