Jump to content

Search the Community

Showing results for tags 'sharing'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements
    • Emby Premiere Purchase/Subscription Support
    • Feature Requests
    • Tutorials and Guides
  • Emby Server
    • General/Windows
    • Android Server
    • Asustor
    • FreeBSD
    • Linux
    • NetGear ReadyNAS
    • MacOS
    • QNAP
    • Synology
    • TerraMaster NAS
    • Thecus
    • Western Digital
    • DLNA
    • Live TV
  • Emby Apps
    • Amazon Alexa
    • Android
    • Android TV / Fire TV
    • Windows & Xbox
    • Apple iOS / macOS
    • Apple TV
    • Kodi
    • LG Smart TV
    • Linux & Raspberry Pi
    • Roku
    • Samsung Smart TV
    • Sony PlayStation
    • Web App
    • Windows Media Center
    • Plugins
  • Language-specific support
    • Arabic
    • Dutch
    • French
    • German
    • Italian
    • Portuguese
    • Russian
    • Spanish
    • Swedish
  • Community Contributions
    • Ember for Emby
    • Fan Art & Videos
    • Tools and Utilities
    • Web App CSS
  • Testing Area
    • WMC UI (Beta)
  • Other
    • Non-Emby General Discussion
    • Developer API
    • Hardware
    • Media Clubs

Blogs

  • Emby Blog

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Found 9 results

  1. Hello! Thanks to @Lukeand @hthgihwaymonkfor helping me troubleshoot some API difficulties in another thread (sessions are tough yo). In short, this code enables the following workflow: A user can favorite a trailer and get the movie added to the server without intervention by an admin. How it works: A user favorites a movie (requires the Trailers plugin), which triggers a webhook. The webhook calls on a localhost flask server. The flask server does some API calls to add the movie to Radarr and search for it. Emby pushes a popup notification to the user's client confirming whether it worked, or whether the movie is already being monitored (or couldn't be found). System/Software Requirements: Python, PIP (arrapi, flask). Works under the assumption that Radarr and Emby are running on the same host. Setting Requirements: Within Emby, Passwords must be disabled for users on localhost. There's probably a way to get around this using the admin api key, but I'm not going to fuss with it. Monk was able to get it working with the server api key, as seen here if you want to mess with it. Also, you also have to point a webhook to the flask server at URL http://127.0.0.1:5443/webhook. Make sure the "Add to favorites" option is checked. Need to have the Trailers plugin installed on Emby Limitations: It sends push notifications by plaintext username, instead of UserID. People with the same name are going to get random notifications. Again, I could probably fuss to fix this, but I only have 4 users and they don't have the same name. Installation: Drop the below code into a python file (your_file_name_here.py) and save it. Modify the emby_api_key, radarr_api_key, emby_base_url, and radarr_url values as appropriate. Running it: screen -dmS flask screen -r flask python3 your_file_name_here.py from flask import Flask, request from arrapi import RadarrAPI,exceptions import json import requests #https://pypi.org/project/requests/ import time from datetime import datetime, timezone from dateutil.parser import parse as timeparse emby_api_key = "emby api key" radarr_api_key = "radarr api key" static_dict_x_emby_token = {"X-Emby-Token":emby_api_key} emby_base_url = "http://127.0.0.1:EMBY_PORT/emby/" radarr_url = "http://127.0.0.1:RADARR_PORT/radarr" app = Flask(__name__) @app.route('/', methods=['POST']) def index(): return '<h1>Flask Receiver App is Up!</h1>',200 @app.route('/webhook', methods=['POST']) def webhook(): if request.method == 'POST': form_data = request.form["data"] data = json.loads(form_data) #get the type of item that was favorited, and the user who did it favorite_type = data['Item']['Type'] user_name = data['User']['Name'] #only handle trailers if favorite_type == "Trailer": radarr = RadarrAPI(url=radarr_url,apikey=radarr_api_key) root_folder_path = None for folder in radarr.root_folder(): root_folder_path = folder quality_profile_custom = None for profile in radarr.quality_profile(): quality_profile_custom = profile #find the url for tmdb external_urls = data['Item']['ExternalUrls'] movie_tmdb_id = "" for url in external_urls: if url['Name'] == "TheMovieDb": #extract the ID from the url movie_tmdb_id = url["Url"][url["Url"].index("movie/")+6:] #get the movie movie = radarr.get_movie(tmdb_id=int(movie_tmdb_id)) #sometimes the radarr api call fails, loop until it succeeds continue_loop = True while continue_loop == True: try: #best case scenario, works on first try. notifies user in emby. time.sleep(0.5) movie.add(root_folder=root_folder_path,quality_profile=quality_profile_custom,minimum_availability="announced") push_message(username=user_name,header="Emby Movie Download Service",message="Success! "+movie.title+" was added and, if available, will be downloaded soon!") continue_loop = False except exceptions.Exists: #movie is already monitored in radarr print("The movie already exists in Radarr - "+movie.folder) push_message(username=user_name,header="Emby Movie Download Service",message=movie.title+" is already being watched in the database. Once it's available, it'll be downloaded!") continue_loop = False except exceptions.Invalid: #couldn't find the tmdb print("The TMDB id was invalid or couldn't be found - "+movie_tmdb_id) push_message(username=user_name,header="Emby Movie Download Service",message="We couldn't find that movie with TMDB ID "+movie_tmdb_id+". Sorry!") continue_loop = False except exceptions.ArrException as e: #unknown exception, retry print("Exception encountered (retrying) - "+str(e)) finally: #suffer None return 'Webhook notification received', 202 else: return 'POST Method not supported', 405 """Pushes a message for all sessions for a single user, where the session was active within the last 5 seconds. This method expects a header for the popup, the message for the popup, and an optional delay. If no delay is given, the message is persistent. """ def push_message(username:str,header:str,message:str,delay_secs:int=-1): predata = {"Pw":""} user_sessions = [] #get all session sessions = requests.get( url=emby_base_url+"Sessions", headers=static_dict_x_emby_token ).json() #find any sessions for the user that were active within the last 5 seconds. Store the sessions in user_sessions for var in sessions: if var.get("UserName") is not None and var.get("UserId") is not None: if username == var.get("UserName"): activity_time = timeparse(timestr=var["LastActivityDate"],yearfirst=True) current_time = datetime.now(timezone.utc) time_difference = current_time-activity_time if time_difference.seconds < 5: user_sessions.append(var) #iterate through user_sessions and push the message to each session for session in user_sessions: user_authentication = requests.post( url=emby_base_url+"Users/"+session["UserId"]+"/Authenticate", headers=static_dict_x_emby_token, data=predata ).json() #provide the user's access token message_header = {"X-Emby-Token":user_authentication["AccessToken"]} message_params = {"Id":session["Id"],"Text":message,"Header":header,"TimeoutMs":delay_secs*1000} if message_params["TimeoutMs"] == -1000: del message_params["TimeoutMs"] requests.post( url=emby_base_url+"Sessions/"+session["Id"]+"/Message", headers=message_header, params=message_params ) app.run(host='127.0.0.1', port=5443, debug=False)
  2. Sorry to have to post this but after over an hour of searching and not finding a solid answer I'm getting frustrated. I am trying to move from Plex to Emby. I have a lot of users I wish to share my server with. I paid for Premier, which I understand gives me 25 "premier devices", which I understand to be the ones listed here: Emby Premiere Feature Matrix : Emby My question is... when I invite someone to join my server, are they just freely able to use up these 25 licenses as they please with no way for me to control it besides to approve every single new device manually? I do see an option in my user settings where I can untick "enable access from all devices", but I don't want my users to rely on my approval constantly. I want them to be able to sign in as they please. What I don't want, is for the first handful of users I invite to gobble up all of my device limits. I would like to reserve the premier device access I am paying for, for my family. And for my invited guest users to have the option to purchase premier themselves if they want to use a premier device. Otherwise, I want them restricted to devices that allow full playback without counting towards my quota. So...yeah, I guess that's my question. When I start inviting people, are they just going to have free reign to use up my access until it's all gone? What happens when the limit is reached? Will me and my family have no options besides to purchase even more licenses, which will then get eaten up like the other ones without my control? Any feedback greatly appreciated.
  3. radekk

    folder sharing

    Hello to everybody. Can Emby share folders or specific photos or videos via a link? That I could send someone a link to have access to a specific folder or play a particular video?
  4. hello so I have both a web server and emby running on the same network with one public IP so I have emby running through a reverse proxy to put it on a subdomain of my url in the share links emby generates a url as if it were the only thing on my network to be used for sharing if I try to tell it what url its on through the public url box it breaks the reverse proxy because then emby tries to bind to that. could you add a feature where you can tell emby what url its running at so that share urls work without it trying to bind to it incase you have something else managing that? also in the near future I will be building a server good enough to have both emby and my apache web server on the same machine (this machine also has zoneminer on it) so emby will have to be runnning on a different port from 80 because apache will be already be using it so the share urls will really be messed up then unless there is someway for me to tell emby that it is running on media.98seaturtles.net but just tell it to use that for self identification but actually run on localhost:8080 so I can use apache to deal with the subdomain if you have any advice it would be greatly appreciated
  5. I have issues with sharing of playlists and files on the webserver via webclient. Sharing files or playlists via FB or other soc. networks doesn´t work for me. I don´t have troubles with sharing on madsonic and ampache, but in emby - no luck. In older versions of emby I got the link as a website, but without working navigation buttons. Now in the latest 3.0.7100 it says following message : Error (FileNotFoundException): Could not find file "/usr/lib/emby-server/bin/dashboard-ui/dlg1473857573378". 404 Right link does work : http://5.9.61.125:80...47fa60eea0e6832 Generated link doesnt work : http://5.9.61.125:80...lg1473857573378
  6. tired dad

    Emby AND shared MySQL database?

    I have a silly question... I know Emby controls the play state and metadata for movies for Kodi, and that I can install Kodi with the Emby plugin on multiple machines. For each machine, do I have to configure the user(s) and do a full scan so there is a local Kodi database on that PC, or can I used advancedsettings.xml and point all machines to one Kodi DB so I don't have to create a local copy on each? Or... is all that irrelevant? I was pretty sure that even with Emby, you have to have a local Kodi database on each PC, which then gets synced via Emby each time you start up. Hope that's not too confusing of a question...
  7. One useful feature would be to create a temporary link to allow guest access to only one file for a limited time. This link could be emailed to a person or persons and allow them to access to stream only that one file. The link would allow them to see only that one file and stream it for a limited time. After the time expires the link no longer works. Access would have to be something simple, not going thru Connect or any extra steps except maybe putting in an email address and agreeing to some terms and conditions. We have friends that occasionally ask to watch tv shows we have recorded on our HTPC. I thought about creating temporary guest account with access to only a single folder/file but would require disabling it and tedious task of managing a number of accounts. Sorry if this has been asked in the past... I thought about this when at work and making a temporary FTP email to share large files to a client. Maybe something like this could be done for Emby streaming individual files.
  8. I have followed the suggestions given here, also started with adding one folder only but somehow it seems to be stuck at 56% in the logs I do see some errors but not sure if they relate to the error, put the log here http://paste.ubuntu.com/9147494/ anyone any clues? mb3 Version 3.0.5395.0 installed on ubuntu precise my first post pertaining this topic can be found here: http://mediabrowser.tv/community/index.php?/topic/13410-xbmc-mysql-library-and-mb3xbmb3c-library-sharing/
  9. bLaZeR666_uk

    Unable to play files

    Hi Just installed. Cant play films I have a small home network all running windows 7 professional. Have installed the server on my media server Installed the client on my media player PC Set up the server fine. For the time being I have just picked my film folder on my media server. All the movies were picked up fine. Ran the client on my media player. Films are there, however when I attempt to play them nothing happens. I have read the bit about shares and as far as I can see I have set the sharing up correctly, however I am a bit confused as my shares have worked fine for everything else including Windows Media Center. My share is set up as \\mediaserver\FILMS - all the films are contained in the FILMS folder in their own named folders. Checked the folder sharing settings and my username is there and has full access. Each PC on my network has my username on them including the media server. Bit stuck now.... Thanks
×
×
  • Create New...