Plex wont play movies

  • There are some issues in their package.


    I install their latest plexmediaserver version 1840. Then after install I purge. The plex user still exists and the /var/lib/plexmediaserver folder. This is without any changes. Just straight install and then purge. So the library folder is not deleting either. When I did the locate before I used plexmediaserver.service, that is why I didn't notice this. Maybe this is to protect the database and users have to delete manually. I don't know.

    • Offizieller Beitrag

    Why do they include the default file in the package if they don't use it?? That is really stupid. I know it worked on Wheezy because the init script specifically called it. The unit file should call it as well. I have no problem with the plex user being left but I didn't want the unit file left when the service was not there.


    Their unit and default files should look like this (the default file could be moved to a .conf file somewhere in /etc too):



    And then the default file should look like this:


    Then the plugin could just write the entire default file like all the plugins do. More reliable than sed'ing for something that may or may not be there.

    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • Well, I am just telling you the reality of the situation. They just have not made necessary changes yet. The unit file does get removed when the plugin is uninstalled via the plugin section or purged manually with the sed fix.


    I think the snippets thing is good remember.

  • sed -i 's#.*{HOME}.*#PLEX_MEDIA_SERVER_SUPPORT_DIR="${HOME}/Library/Application Support"#' /etc/default/plexmediaserver


    Code
    if ! grep "EnvironmentFile" /etc/systemd/system/plexmediaserver.service ; then
        sed -i '/Service/a EnvironmentFile=/etc/default/plexmediaserver' /etc/systemd/system/plexmediaserver.service
        systemctl daemon-reload
    fi
  • @ryecoaaron can you put the latest plex version in the repo. They changed a variable name and the 1714 package is messing things up.


    Code
    if [ ! -d "${DB_FOLDER}/Library" ]; then
            cp -rfp "${PLEX_HOME}" "${DB_FOLDER}"
            rm -rf "${PLEX_HOME}"
            if ! grep "EnvironmentFile" /etc/systemd/system/plexmediaserver.service ; then
                sed -i '/Service/a EnvironmentFile=/etc/default/plexmediaserver' /etc/systemd/system/plexmediaserver.service
                systemctl daemon-reload
            fi
            sed -i "s#${PLEX_HOME}#${DB_FOLDER}#" /etc/default/plexmediaserver
            usermod -d "${DB_FOLDER}" plex
    fi


    One other line in the postinst to replace /var/lib/plexmediaserver instead of ${HOME}.
    The 2nd sed above needs to be able to search for the plex home string.


    Done except plex user not deleting and library not being removed on uninstall.

  • Aaron, I got the override working for the unit file. I don't know if you noticed. I think it would be better to install that file than write it though. Then use the sed command to replace the path to the library. That way the override folder and file would be removed when the plugin is removed without something added to postrm. On initial install the default path can be in the override file /var/lib/plexmediaserver.


    @ryecoaaron


    sed -i "s#${PLEX_HOME}#${DB_FOLDER}#" /etc/systemd/system/plexmediaserver.service.d/db_folder.conf

    • Offizieller Beitrag

    The override did work. It just didn't use the defaults file. Didn't think we needed to use it since the current unit file doesn't use it. That file should only need to override the settings you want to change. The defaults file duplicates some settings. You shouldn't need an override file until you change something so no need to install it on package installation.


    I disagree with using sed. OMV and the plugins write (not edit) the entire config file except for the few config files that are modified by multiple services (grub, fstab come to mind). It would be one line in postrm to remove the override dir and file - rm -rf /etc/systemd/system/plexmediaserver.service.d. That file/dir being left would cause any problems like leaving the unit file. It would be like leaving the defaults file.

    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

    • Offizieller Beitrag

    I must have had the edited service file leftover on my development VM. I planned on testing on a clean install before releasing and would've have found that. Just didn't have the time yet.

    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • @ryecoaaron
    Aaron, I was thinking about you writing the file. It is not a config file. I don't think we really need to rewrite all different kinds of files. Especially files where we are going to only make 1 or 2 changes. I really think sed commands can be useful. The sed command searches for an exact match too. In the unit file there will not be another match. My first solution to this issue was very short in coding. I also think Plex will fix errors in the unit file eventually. I don't really care about how this is done as long as it is stable but I think if coding is stable using sed I don't see a problem with it. Staying consistent on config files I understand. But we can try new ideas on other things.


    Something that also might be considered when using sed is where the variables being used are coming from or if they exist already somewhere in the config.xml

  • I also have Firestick with Kodi on it. And it's my love. I have recently installed my favourite addon - Yoda https://www.firesticktricks.com/yoda-kodi-addon.html, and it's amazing. It gives me total freedom in what I actually need. What I like about this addon mostly is the fact that it has been steadily updated. Yoda gives freedom to watch Movies, TV shows, Documentaries, Networks and more.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!