Jump to content

home videos and photos PhotoAlbum tab


leftcausedit

Recommended Posts

leftcausedit

when I search items in my emby library, I noticed that there is a "photoalbums" tab. when I go through the logs, I found that there is a type called "photoalbum".

Thus I wonder if there is a way to view the photoalbum type of item directly, like we can access It via tab "photoalbum", just like we access the existing tabs "videos" "photos" "folders". 

now the "folder" tab is the closest one, but it have a complex structure, and I have to analyze the folder name and think about which subfolders are in this folder balabala... sometimes I just want to randomly browse the photoalbums and don't wanna bother exploring the complicated folder.

plus, in the folder tab, you sort the photoalbums ranged in the current folder, not ranged in the whole library.

and the "video" tab can't browse photo, "photo" tab can't watch video and both of them can't organize the folder they are in. when we a photo or video and we want to see the other photos or videos related to them, which means in the same folder or photoalbum as them. There is no way to easily get to the related items, because you can't open a video's menu and just press a button to get into its folder or photoalbum, there is no such button. Also, when we sort in a specific way(date added) to display the related items together, you will see that each photoalbum will take a big place, which means when you wanna jump to the just photoalbum, you have to scroll back and forth, especially on the photo, which is annoying. And when you sort by date add to display the related items together, is not possible to sort by random to browse different items every time.

now the photoalbum contain both videos and photos. I think it's the minimal unit to organize a group of related media items, it's a naturally existing collections that the user already organized. 

Link to comment
Share on other sites

leftcausedit

will, don't know if anyone need it, but this is my solution.

# go through the whole emby library and add photoalbums to the collections
import requests

url = "https://xxxx.xxxxxxx.xxx/emby/Items?Recursive=true&IncludeItemTypes=PhotoAlbum&api_key=<your_api_key>"
headers = {'accept' : 'application/json'}
r = requests.get(url,headers=headers)

items = r.json()["Items"]

for item in items:
    url = "https://xxxx.xxxxxxx.xxx/emby/Collections/508814/Items?Ids=%s&api_key=xxxxxxxxxxxxxxxx" %(item['Id'])
    headers = {'accept':'*/*'}
    data = {}
    requests.post(url, headers=headers, data=data)

 

Edited by GrimReaper
Domain & API key masked
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...