visproduction 315 Posted August 22, 2022 Posted August 22, 2022 (edited) I ran into this glitch in the .js code when I manually changed the media file names, so they no longer matched the folder name. When I did that, audio files in the theme-music directory fail to play. With missmatched name: console.log shows viewmanager.js?v=4.7.6.0.1 viewManager.onBeforeChange - processing path: isBack: undefined Looking inside viewmanager.js, I noticed that isBack does not have var isBack= 0; Just a guess, maybe that is part of the problem? Variable undefined, often comes from no variable declaration and the name mismatch stops isBack from getting declared, so maybe isBack is out of scope. Media playback is fine, but this file name change seems to kill the theme-music. The reason to edit the media title comes from another code issue: If you have an extra - in the media title, it seems to cause problems with recognizing that there are two versions of media resolution. For Example: Media-title - 720P.mp4 and Media-title - 1080P.mp4 stops drop down choice from being just '1080P' and '720P'. If the user fixes that by removing the first dash, then theme-music fails. I fixed theme-music by renaming the media folder to be the same as the media file before the dash, infront of the video size, ('-720P'). Theme music fails with isBack error Folder Name/Changed Media Name-720P.mp4 Folder Name/Changed Media Name-1080P.mp4 Theme music works with matched folder and media names Folder Name/Folder Name -720P.mp4 Folder Name/Folder Name -1080P.mp4 This is the sort of glitch that you would hardly ever notice and leaving file names alone seems to avoid this. So, perhaps not bothering to fix, is correct. I don't like authoring code that can cause out of scope, undefined errors, when a user makes a file name update. Anyway, thought you would like to know, even as a troubleshoot solution. Edited September 29, 2022 by visproduction
Luke 42080 Posted August 23, 2022 Posted August 23, 2022 Hi, can you please provide a specific example of the folder name and show the complete folder contents? Thanks.
visproduction 315 Posted August 25, 2022 Author Posted August 25, 2022 Theme-music fails Folder: John Smith War and Peace (1949) Media file name: John Smith - War and Peace (1949) - 1080P (Extra dash after John Smith) Sub folder: theme-music: Media File name: Music from War and Peace.mp3 === Theme-music works: Just change media file name to match foloder name with no extra dash after John Smith: Folder: John Smith War and Peace (1949) Media file name: John Smith War and Peace (1949) - 1080P Sub folder: theme-music Nothing is changed, the file name is the same: Music from War and Peace.mp3 You have to manually change the media file name to cause this error. If you let Ebmy pull from the media name, I think it works. If you have two dashes in a name, then the pull down choices are no longer just 720P and 1080P. That is what caused me to edit the file names. Only Media name - 1080P and Media name - 720P results in seeing only 1080P and 720P in the pull down selection on the media page. Obviously this is an edge case and probably can be ignored.
Luke 42080 Posted August 26, 2022 Posted August 26, 2022 Quote and show the complete folder contents? Thanks.
Happy2Play 9782 Posted September 1, 2022 Posted September 1, 2022 4 hours ago, Luke said: @Happy2Play are you able to reproduce? Little confused here as this change breaks multi-versioning. But yes breaking multi-versioning cause Theme to stop working for the items that now show separately. Manually grouping them does not correct the issue.
visproduction 315 Posted September 2, 2022 Author Posted September 2, 2022 It continues to happen multiple times, whenever the folder name does not match the media content file name before the dash. Try just changing the main media name in a folder so it no longer matches the folder name and see if the theme-music fails to play.
Luke 42080 Posted September 27, 2022 Posted September 27, 2022 Are you still having an issue with this?
Happy2Play 9782 Posted September 27, 2022 Posted September 27, 2022 On 9/1/2022 at 8:08 PM, visproduction said: It continues to happen multiple times, whenever the folder name does not match the media content file name before the dash. Try just changing the main media name in a folder so it no longer matches the folder name and see if the theme-music fails to play. But that is the Rule for Multi-versions so breaking that rule breaks the folder. Each version must begin with the folder name, followed by " - ". So the question here is do you have the same issue on an item without multi-versioning?
visproduction 315 Posted September 28, 2022 Author Posted September 28, 2022 I understand the rules and I can get theme-music to work. I just wanted to point out that when you have media content with 2 dashes in the name, for example, music-theme subdirectory audio stops and will not play. Was that mentioned anywhere in the instructions for theme-music?
Luke 42080 Posted September 28, 2022 Posted September 28, 2022 32 minutes ago, visproduction said: I understand the rules and I can get theme-music to work. I just wanted to point out that when you have media content with 2 dashes in the name, for example, music-theme subdirectory audio stops and will not play. Was that mentioned anywhere in the instructions for theme-music? @Happy2Play are you able to reproduce?
Happy2Play 9782 Posted September 28, 2022 Posted September 28, 2022 2 minutes ago, Luke said: 34 minutes ago, visproduction said: I understand the rules and I can get theme-music to work. I just wanted to point out that when you have media content with 2 dashes in the name, for example, music-theme subdirectory audio stops and will not play. Was that mentioned anywhere in the instructions for theme-music? @Happy2Play are you able to reproduce? From a non multi-version no. Works as not versioned so name does not have to match From multi-version yes as it breaks the rules. Fails On 8/22/2022 at 12:41 PM, visproduction said: Theme music fails with isBack error Folder Name/Changed Media Name-720P.mp4 Folder Name/Changed Media Name-1080P.mp4 Theme music works with matched folder and media names Folder Name/Folder Name -720P.mp4 Folder Name/Folder Name -1080P.mp4 Expected behavior do to breaking the rules. Automatic grouping technically broken and will present separate items, but with plugin item is grouped and still broken. Am I misunderstanding here?
Happy2Play 9782 Posted September 28, 2022 Posted September 28, 2022 Now correcting the mismatch works fine as Folder and File MUST match.
visproduction 315 Posted September 29, 2022 Author Posted September 29, 2022 (edited) Your examples work. Those are not the examples that break Theme-music. A user could rename a folder or media file name for some reason and if they no longer match, theme-music stops. I admit it can be rare, but it is still a bug. Edited September 29, 2022 by visproduction
Solution roaku 842 Posted September 29, 2022 Solution Posted September 29, 2022 5 minutes ago, visproduction said: Your examples work. Those are not the examples that break Theme-music. A user could rename a folder or media file name for some reason and if they no longer match, theme-music stops. I admit it can be rare, but it is still a bug. You are triggering multi-version mode based on your filenames. This *requires* that the filename before the '-' match the directory name. When you fail to meet this requirement, you break things. This isn't a bug. 1
visproduction 315 Posted September 29, 2022 Author Posted September 29, 2022 Aha, OK. Thanks. This sounds like this breaks anytime a user adds a new resolution. It would be nice to explain how you fix it so theme-music works again. I have not seen a FAQ how to fix theme-music for multi-version content.
roaku 842 Posted September 29, 2022 Posted September 29, 2022 (edited) 7 minutes ago, visproduction said: Aha, OK. Thanks. This sounds like this breaks anytime a user adds a new resolution. It would be nice to explain how you fix it so theme-music works again. I have not seen a FAQ how to fix theme-music for multi-version content. It won't break anything as long as the new file is named properly (matches the existing directory name before the multi-version dash). Adding a new file that *doesn't* match the directory name causes Emby to stop seeing the parent folder as a container for the item. It becomes a 'dumb' folder that hosts multiple, unrelated items. That's why you start seeing '[item]-poster.jpg' per movie file instead of just one 'poster.jpg' for the entire folder. The 'theme-music' folder is associated with the 'smart', multiversion parent folder. When the parent directory is 'dumb', the theme-music folder becomes 'dumb' too. Edit: And I'm just speaking from personal experience using this feature. Devs/testers/etc. are welcome to correct any of my inferences. Edited September 29, 2022 by roaku 1
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now