Barronli 4 Posted December 14, 2024 Posted December 14, 2024 As the subject, I want to create two libraries with the same folder: one for English, one for other language. I haven't figured out a solution. Your helps are highly appreciated.
Happy2Play 9780 Posted December 14, 2024 Posted December 14, 2024 (edited) No as items are limited to one language, but can be done this way. Edited December 14, 2024 by Happy2Play 1
Barronli 4 Posted December 15, 2024 Author Posted December 15, 2024 Cool, looks like a clever solution. Will have a try tomorrow!
yocker 1247 Posted December 15, 2024 Posted December 15, 2024 10 hours ago, Happy2Play said: No as items are limited to one language, but can be done this way. Strm files only work with the apps and not from a web browser?
rbjtech 5284 Posted December 15, 2024 Posted December 15, 2024 3 hours ago, yocker said: Strm files only work with the apps and not from a web browser? strm files work with all apps as far as I am aware. 1
yocker 1247 Posted December 15, 2024 Posted December 15, 2024 8 hours ago, rbjtech said: strm files work with all apps as far as I am aware. Strange, i can't get it to work from a web browser but using the Emby app works perfectly.
Barronli 4 Posted December 15, 2024 Author Posted December 15, 2024 17 hours ago, Barronli said: Cool, looks like a clever solution. Will have a try tomorrow! Tried it today with the Emby server in my Synology NAS. Unfortunately it did not work as expected. 1. The codepage is not unicode by default, so path or filename with Chinese characters were not supported. - Adding "chcp 65001" at the beginning of libstrm.bat solved it. 2. Synology is Linux system that uses slash "/" as path separator instead of "\" in Windows - Using notepad++ can replace all the occurrences in a single operation. 3. The actual problem: After creating the new lib with all strm files, and setting it to be Chinese-variant wouldn't give expected metadata. - Haven't figured out the reason yet. I guess it is because the Emby server has stricter requirement for .strm files on the naming rules (pathname and filename). - Emby players can play the movies without problem in both browser and Emby apps. - Btw, If I created Chinese-variant lib with actual mkv folder, the metadata/artworks are produced correctly, although they have the same naming scheme as the .strm variant. Thoughts: 1. I am thinking to create a language-variant lib based on the actual mkv files, then move over the metadata/artworks to the folder generated by libstrm.bat, leaving the original actual mkv files for another language-variant lib. 2. Will try to craft a Linux shell script based on the same idea of libstrm.bat, assuming the linux version is not available yet. 3. Will refactor my media lib pathnames/filenames naming scheme, to keep Emby server happy with the .strm-based lib. In any case, @Happy2Play's idea definitely works. Kudos to the smart solution that probably should be adopted by Emby server for a plugin development. The idea is not only useful for language-variant libs, but also applicable to cross-referenced libs, since media libs are not always a tree structure, and tags/labels are not as convenient. Cheers! 1
rbjtech 5284 Posted December 16, 2024 Posted December 16, 2024 13 hours ago, Barronli said: In any case, @Happy2Play's idea definitely works. Kudos to the smart solution that probably should be adopted by Emby server for a plugin development. The idea is not only useful for language-variant libs, but also applicable to cross-referenced libs, since media libs are not always a tree structure, and tags/labels are not as convenient. It's wasn't H2P's idea - it was mine - he just linked to my post But yes, the concept is simple - and while it could be adopted easily into a plugin - adding the ability for multiple metadata languages/regions would be much better but as with most Feature Requests in emby, if it's only used by a small percantage of users - it highly unlikely to be implemented. 2
Barronli 4 Posted December 16, 2024 Author Posted December 16, 2024 @rbjtechOh my bad to credit incorrectly. I am a newcomer to Emby, was using Synology video station. It was sunset silently by Synology without any migration support. I tried Plex and Emby, and found Emby suits my need that gives more flexibility and control for a tech-minded user. Thanks! 1
Barronli 4 Posted December 18, 2024 Author Posted December 18, 2024 I've created a bash script libstrm.sh just in case someone needs it in bash-based systems. Notes: 1. It follows @rbjtech original libstrm.bat. And it needs a library.txt with path pairs of source/;target/ in each line. 2. It tried to identify all the video file extensions like .mp4, .mov., etc. If any of your video types are missing, you can simply add them as how I did in the code. 3. If you use a library.txt file created in Windows/DOS environment, it may have incompatible line-ending symbols that sometimes show as "^M" or "\r" or can be completely invisible. That will cause problem. You can use an editor that can product Unix text file like notepad++, or convert the file to Unix way with utility "dos2unix". (I will probably fix that issue in the script directly in future.) Cheers! libstrm.sh 1 1
robert powell 8 Posted December 21, 2024 Posted December 21, 2024 On 12/15/2024 at 7:23 AM, rbjtech said: strm files work with all apps as far as I am aware. i have made a couple .strm files so i can have a video in two locations without wasting the space of having two copies of the movie. that way i can take a movie that's also a "special episode" of a tv show and have it show up in the tv series and in movies. it shows up in both libraries just fine, but when you try to play the one that's an .strm file after a minute of trying to load it just pops up an error saying unable to find a compatible stream. it does this on my smart tv (Samsung) , web browser, on the pc and on the Emby android app. not sure why ... it used to work when i original made the strms about 4 years ago. i just noticed it no longer works, as after reading this thread i got curious and went to try and play them back
rbjtech 5284 Posted December 21, 2024 Posted December 21, 2024 10 hours ago, robert powell said: i have made a couple .strm files so i can have a video in two locations without wasting the space of having two copies of the movie. that way i can take a movie that's also a "special episode" of a tv show and have it show up in the tv series and in movies. it shows up in both libraries just fine, but when you try to play the one that's an .strm file after a minute of trying to load it just pops up an error saying unable to find a compatible stream. it does this on my smart tv (Samsung) , web browser, on the pc and on the Emby android app. not sure why ... it used to work when i original made the strms about 4 years ago. i just noticed it no longer works, as after reading this thread i got curious and went to try and play them back Just tested - I don't appear to have any issues (latest Server beta + Edge Browser) - it's direct playing just fine ? make sure the URL in the STRM itself does not contain quotes - ie \\MEDIA\TestLibrary\Films\2 Fast 2 Furious (2003) [tmdbId=584]\2 Fast 2 Furious (2003) - WEBDL-1080p STRM.strm \\MEDIA\Films\2 Fast 2 Furious (2003) [tmdbId=584]\2 Fast 2 Furious (2003) - WEBDL-1080p.mkv
Barronli 4 Posted December 21, 2024 Author Posted December 21, 2024 FWIW The path to the media file in the strm file has to be a full absolute path starting from the root.
visproduction 315 Posted December 21, 2024 Posted December 21, 2024 Of interest: I tried to find browser compatibility and found another streaming pointer file from DASH and a test page: https://reference.dashif.org/dash.js/latest/samples/dash-if-reference-player/index.html It works for Chrome and Firefox. === Organizing multiple links to content with either strm or mpd files would probably be a nice extra for a plug-in. Great idea! I think the linked pointer files would be more efficient than adding select filters in the main dbase, per media, to organize. Wouldn't all the custom select commands bloat the dbase and take longer to process than having the link info in each pointer file? How would the plug-in be user friendly? Or just run the script, create link files that work and then move them into whatever new library filled with pointer files. Just organize your library in file manager. Why even bother with a plug-in? What does everyone think? Am I missing something? 1
rbjtech 5284 Posted December 21, 2024 Posted December 21, 2024 27 minutes ago, visproduction said: === Organizing multiple links to content with either strm or mpd files would probably be a nice extra for a plug-in. Great idea! I think the linked pointer files would be more efficient than adding select filters in the main dbase, per media, to organize. Wouldn't all the custom select commands bloat the dbase and take longer to process than having the link info in each pointer file? How would the plug-in be user friendly? Or just run the script, create link files that work and then move them into whatever new library filled with pointer files. Just organize your library in file manager. Why even bother with a plug-in? What does everyone think? Am I missing something? Hi vis, It's been done many times this way - my scripts for things like recommendations and plugins such as Top Picks all do it this way - but using strm files has a major disadvantage - files are shown as duplicated in emby. What we need (and I'm hoping the smart views implements this) is a way to show a 'pointer' to a file - but not actually have it as a record in emby. This THEN opens up the possibilities no end - effectively allowing virtual libraries or smart views. We don;t know the detail behind 4.9 - but i'm hoping it allows this.... 1
visproduction 315 Posted December 21, 2024 Posted December 21, 2024 rbj, Possible some help? echo timeout /t 5 > 1.strm echo G:\Library01\USA\Family Trip (2017) - 1080P.mkv >> 1.strm For longer strm names you need quotes: echo timeout /t 5 > "Family Trip (2017) - 1080P.strm" echo G:\Library01\USA\Family Trip (2017) - 1080P.mkv >> "Family Trip (2017) - 1080P.strm" Timeout should work for Windows or use wait for Linux. I have no idea if this would keep Emby from listing a second version, but if so, then you still have the problem of Emby won't probably list the strm at all in a new linked library. Back to square one. === In the GUI, how would the user designate a strm link as virtual and stop multiple versions from appearing in searches? Would it be a checkbox? Should Emby have a search for duplicates page with the ability to check some or all and switch searchability off? Would this page be similar to find duplicate file apps? Tricky to design something user friendly. 1
rbjtech 5284 Posted December 21, 2024 Posted December 21, 2024 (edited) 1 hour ago, visproduction said: rbj, Possible some help? echo timeout /t 5 > 1.strm echo G:\Library01\USA\Family Trip (2017) - 1080P.mkv >> 1.strm For longer strm names you need quotes: echo timeout /t 5 > "Family Trip (2017) - 1080P.strm" echo G:\Library01\USA\Family Trip (2017) - 1080P.mkv >> "Family Trip (2017) - 1080P.strm" Timeout should work for Windows or use wait for Linux. I have no idea if this would keep Emby from listing a second version, but if so, then you still have the problem of Emby won't probably list the strm at all in a new linked library. Back to square one. === In the GUI, how would the user designate a strm link as virtual and stop multiple versions from appearing in searches? Would it be a checkbox? Should Emby have a search for duplicates page with the ability to check some or all and switch searchability off? Would this page be similar to find duplicate file apps? Tricky to design something user friendly. The creation of the strm has nothing to do with the duplicates - emby simply associates the strm pointer as another instance of that file - no different to say having a mp4 and mkv of the same file. What we need is a pointer without the duplicate.. My script for recommendations pretty much uses the above output redirection syntax - creating the strm from the file location. It's in this thread somewhere if you are interested. https://emby.media/community/index.php?/topic/99029-personalised-recommendations-library-work-in-progress/#comment-1033255 btw - this script no longer works as it used the xml from playlists - this has now been replaced and it's in the db. If we get a new method to reference the item (without dupes), then I'll actually write a proper plugin in c# to do this as I still think this is a solid concept... Edited December 21, 2024 by rbjtech
robert powell 8 Posted January 14, 2025 Posted January 14, 2025 I forgot report back .... shortly after i made my post I had a brain fart. a while back i got some new drives and rearranged some files, and drive letter assignments changed. i guess when that happens, the file location in the strm file just tends not to work any more. once i addressed that issue every thing worked fine on all platforms 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