Jump to content

A tool for tagging Emby content


VicMoore

Recommended Posts

VicMoore

Thanks Mbarylski...

I had all the fun programming it. Everybody on this forum has contributed, including you, to make the tool better.

Vic

  • Like 2
Link to comment
Share on other sites

VicMoore
Posted (edited)

 

Just for fun, and to learn a little about IPTV, I added a button to the "Playlist" screen titled "Print m3u8."  An Example of what it prints is given below. When you click this button the tool will print on the console the m3u8 and TV Guide XML that can be ingested by Emby from the "Live TV " tab in Emby. It only partially works. Each movie ends up as a channel. When clicked, the movie does play. The playlist also ends up as a channel, but it does not play.  No TV Guide info is displayed

I copied the m3u8 text into a folder and did the same for the TV Guide. I then added these folders to the Live TV tab in Emby. I then refreshed the TV Guide.. 

If anyone has any suggestions, corrections, additions or comments, I  would love to hear them.  The idea behind this is to learn the API's for Live TV and Playlists, and how IPTV technology works. I am sure that some of you will have practical uses for this code.

vic

 

===== m3u8=====

#EXTINF:-1 tvg-id="test_1" tvg-country="US" tvg-language="English" tvg-logo="http://192.168.1.201:8096/emby/Items/799019/Images/Primary?api_key=73d84bd1f81b447296cd3e2d299ed0fd" group-title="test_1" () []
http://192.168.1.201:8096/emby/Videos/799019/live.m3u8?api_key=73d84bd1f81b447296cd3e2d299ed0fd
#EXTINF:-1 tvg-id="The 5th Wave" tvg-country="US" tvg-language="English" tvg-logo="http://192.168.1.201:8096/emby/Items/873/Images/Primary" group-title="test_1" () []
http://192.168.1.201:8096/emby/Videos/873/live.m3u8?Container=mp4&api_key=73d84bd1f81b447296cd3e2d299ed0fd
#EXTINF:-1 tvg-id="The 6th Day" tvg-country="US" tvg-language="English" tvg-logo="http://192.168.1.201:8096/emby/Items/2128/Images/Primary" group-title="test_1" () []
http://192.168.1.201:8096/emby/Videos/2128/live.m3u8?Container=mp4&api_key=73d84bd1f81b447296cd3e2d299ed0fd
#EXTINF:-1 tvg-id="7 Faces of Dr. Lao" tvg-country="US" tvg-language="English" tvg-logo="http://192.168.1.201:8096/emby/Items/224190/Images/Primary" group-title="test_1" () []
http://192.168.1.201:8096/emby/Videos/224190/live.m3u8?Container=mp4&api_key=73d84bd1f81b447296cd3e2d299ed0fd
#EXTINF:-1 tvg-id="12 Angry Men" tvg-country="US" tvg-language="English" tvg-logo="http://192.168.1.201:8096/emby/Items/2256/Images/Primary" group-title="test_1" () []
http://192.168.1.201:8096/emby/Videos/2256/live.m3u8?Container=mp4&api_key=73d84bd1f81b447296cd3e2d299ed0fd
#EXTINF:-1 tvg-id="13 Ghosts" tvg-country="US" tvg-language="English" tvg-logo="http://192.168.1.201:8096/emby/Items/438/Images/Primary" group-title="test_1" () []
http://192.168.1.201:8096/emby/Videos/438/live.m3u8?Container=mp4&api_key=73d84bd1f81b447296cd3e2d299ed0fd

=== tvGuide ===


<tv>
<channel id="test_1">
<display-name>test_1</display-name>
<icon src=http://192.168.1.201:8096/emby/Items/799019/Images/Primary?api_key=73d84bd1f81b447296cd3e2d299ed0fd></icon>
<url>http://192.168.1.201:8096/emby/Videos/799019/live.m3u8?api_key=73d84bd1f81b447296cd3e2d299ed0fd</url>
</channel>
<programme start="20220106045228 +0000" stop="20220106064451 +0000" channel="test_1">
<title lang="en">The 5th Wave</title>
<desc lang="en">16-year-old Cassie Sullivan tries to survive in a world devastated by the waves of an alien invasion that has already decimated the population and knocked mankind back to the Stone Age.</desc>
</programme>
<programme start="20220106064451 +0000" stop="20220106084826 +0000" channel="test_1">
<title lang="en">The 6th Day</title>
<desc lang="en">Futuristic action about a man who meets a clone of himself and stumbles into a grand conspiracy about clones taking over the world.</desc>
</programme>
<programme start="20220106084826 +0000" stop="20220106102804 +0000" channel="test_1">
<title lang="en">7 Faces of Dr. Lao</title>
<desc lang="en">An old Chinese man rides into the town of Abalone, Arizona and changes it forever, as the citizens see themselves reflected in the mirror of Lao's mysterious circus of mythical beasts.</desc>
</programme>
<programme start="20220106102804 +0000" stop="20220106120425 +0000" channel="test_1">
<title lang="en">12 Angry Men</title>
<desc lang="en">The defense and the prosecution have rested and the jury is filing into the jury room to decide if a young Spanish-American is guilty or innocent of murdering his father. What begins as an open and shut case soon becomes a mini-drama of each of the jurors' prejudices and preconceptions about the trial, the accused, and each other.</desc>
</programme>
<programme start="20220106120425 +0000" stop="20220106133513 +0000" channel="test_1">
<title lang="en">13 Ghosts</title>
<desc lang="en">Reclusive Dr. Zorba has died and left his mansion to his nephew Cyrus and his family. They will need to search the house to find the doctor's fortune, but along with the property they have also inherited the occultist's collection of 13 ghosts.</desc>
</programme>
</tv>

 

EmbyTagApp23.html

Edited by VicMoore
Link to comment
Share on other sites

mbarylski

@VicMoore I'm not able to use CTRL+click or SELECT+Click on some of my photos libraries. It works in my first photo library, but not my 2nd or 3rd. They have hyphens in the library name if that matters. Although, I can't use those functions for my Playlists either.

Link to comment
Share on other sites

VicMoore

Mbarylski,  are your photo folders grouped into one Emby view? Or, do you access them separately?  Do you have any problem with them in Emby?

Vic

Link to comment
Share on other sites

mbarylski
1 minute ago, VicMoore said:

Mbarylski,  are your photo folders grouped into one Emby view? Or, do you access them separately?  Do you have any problem with them in Emby?

Vic

I access them separately. They're 3 distinctly different libraries. No problems with them in Emby. 

Link to comment
Share on other sites

VicMoore

Thanks, are they similar in content and differ from the first folder only in having names with hyphens in them?

Link to comment
Share on other sites

mbarylski
16 minutes ago, VicMoore said:

Thanks, are they similar in content and differ from the first folder only in having names with hyphens in them?

They're all photos libraries, so yes, similar in content. The actual files in the libraries are different, but other than that they're the same except for the hyphens in the library name. 

Link to comment
Share on other sites

VicMoore

Great, I am going to build a test folder "test-1" and fill it with photos and add it to the Emby library. 

Vic

Link to comment
Share on other sites

mbarylski
8 minutes ago, VicMoore said:

Great, I am going to build a test folder "test-1" and fill it with photos and add it to the Emby library. 

Vic

Cool, thanks! Mine are named with spaces too, so "test - 1". Not sure if that would make a difference. 

Link to comment
Share on other sites

VicMoore

I tested the folder name without spaces and everything worked fine.  I will now add spaces and see what happens.

Link to comment
Share on other sites

VicMoore

I replicated your folders and everything still works ok.  Something is different. Can you explain in more detail the problem.

Vic

Link to comment
Share on other sites

mbarylski
18 minutes ago, VicMoore said:

I replicated your folders and everything still works ok.  Something is different. Can you explain in more detail the problem.

Sure, I just took another look and it appears that I can use CTRL+select on sub-folders that have other sub-folders, but I can't use CTRL+select on folders that have just photos.

So, my library looks like this:

  • Photos
    • 1980
      • photo.jpg
      • photo2.jpg
    • 1990
      • November
        • photo.jpg

CTRL+select works on 1990, but not on 1980. I'm trying to tag all the year folders so they're visible to users that I want to share with. Hope that makes sense?

Link to comment
Share on other sites

VicMoore

OK, I just found a  problem with selecting items. Also the cancel isnt working.  I will fix these problems and test again

vic

Link to comment
Share on other sites

VicMoore

hello Mbarylski...

I duplicated your folder structure and everything works OK. There must be another difference between the folders. Jusy click on the pictures and see if they are displayed properly.

Vic

 

Link to comment
Share on other sites

mbarylski
1 hour ago, VicMoore said:

I duplicated your folder structure and everything works OK. There must be another difference between the folders. Jusy click on the pictures and see if they are displayed properly.

Hmmm, I'm not sure. The pictures look fine. I can't figure out what else might be different. I'll keep looking.

Link to comment
Share on other sites

Would it be possible to get a 'lock all' option for the external id's?

I currently don't allow emby to auto refresh metadata as there are times where shows/movies decide they want to be something else, which is a PITA for a massive collection.

Emby seriously needs some love on the admin side of things, this would help a great deal though if i could lock all those id's down, please and thank you in advance.

Link to comment
Share on other sites

Happy2Play
7 minutes ago, Brendon said:

Would it be possible to get a 'lock all' option for the external id's?

I currently don't allow emby to auto refresh metadata as there are times where shows/movies decide they want to be something else, which is a PITA for a massive collection.

Emby seriously needs some love on the admin side of things, this would help a great deal though if i could lock all those id's down, please and thank you in advance.

But Emby has no options for these fields so there isn't anything vicmoore can do as there is no way for Emby to honor it if he could.  So for these fields it requires entire file/metadata to be locked.  Luke would need to expand to every field having the ability to be locked.

  • Agree 1
Link to comment
Share on other sites

51 minutes ago, Happy2Play said:

But Emby has no options for these fields so there isn't anything vicmoore can do as there is no way for Emby to honor it if he could.  So for these fields it requires entire file/metadata to be locked.  Luke would need to expand to every field having the ability to be locked.

Ahh of course, would be a good thing to have @Happy2Play, as i said, if i let emby auto update metadata i have movies and shows that decide to just be something they are not, when initially added they had to be manually identified so they will revert on a full meta update (or at least they have in the past). Now as i have been using emby for the better part of a decade (correction over a decade, just realised the emby we now know is almost 10yrs old now and i was using the previous incarnation as well haha) there is a decent amount of outdated metadata that could do with updating but definitely not worth the pain of scouring through 10K of files to fix what gets broken, a universal lock on those id's would be perfect.

Edited by Brendon
Link to comment
Share on other sites

Happy2Play
8 minutes ago, Brendon said:

Ahh of course, would be a good thing to have @Happy2Play, as i said, if i let emby auto update metadata i have movies and shows that decide to just be something they are not, when initially added they had to be manually identified so they will revert on a full meta update (or at least they have in the past). Now as i have been using emby for the better part of a decade (correction over a decade, just realised the emby we now know is almost 10yrs old now and i was using the previous incarnation as well haha) there is a decent amount of outdated metadata that could do with updating but definitely not worth the pain of scouring through 10K of files to fix what gets broken, a universal lock on those id's would be perfect.

May need to open your own topic but don't believe I have ever had an item with external ids change.  Maybe a mismatch if all ids don't exist but Emby reuses existing ids unless using Indentify.

  • Agree 1
Link to comment
Share on other sites

VicMoore

Thanks Happy2Play for handling this. My knowledge about the internals of Emby are limited at best. 

Vic

Link to comment
Share on other sites

Good morning Mbarylsk...

Are you still having problems? I would like to help more if I can.

Vic

Link to comment
Share on other sites

horstepipe

Hey

@VicMoore

I have a request if you are willing to add more features.

It would be really handy for mass movie edit if we could enter a bunch of imdb links like
 

tt7888964, tt11083552, tt8367814

which your tool then check against the emby library and makes the desired changes.

Is there a chance that this could be added?

Link to comment
Share on other sites

mbarylski
2 hours ago, VicMoore said:

Good morning Mbarylsk...

Are you still having problems? I would like to help more if I can.

Hi @VicMoore, yea, I can't figure out what the difference is. All I know is that if I add sub-folders it works fine. I've tried renaming the files so their all distinct (right now they're Photo1, Photo2, ...), but that doesn't make a difference. The only thing that helps is adding a folder. I'm not sure what else to try. Is there anything special about the query or the CTRL+click function? 

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...