Jump to content

Notifications of shows with and/& in the title.


Hitsville

Recommended Posts

Hitsville

Hey all.

I just stumbled across something tonight when a friend was watching Gavin and Stacey remotely.

My pushover notification said " Sharon is playing Gavin" ...No full title, client, season or episode.

 

Curious if it was an oddity of the client they were using I tried the same show and got the same notification.

I then tried an old 80's UK show called George and Mildred.. and got "Dave is playing George"

Next up was Hatfields & McCoys...  "Dave is playing Hatfields"

 

So from what I can see Something really doesn't like "And" or "&" in the title. Anyone with any shows like that who can confirm this..

Pretty sure its not a pushover issue as I just tried all three shows in Plex and got full notifications.

 

 

Oh and to make it even more peculiar... George and Mildred has a movie spinoff. I use TVDB naming so this actually shows in my TV Shows as S00E01  ... This one reports fully to pushover. Title, Episode, Season and client

No episode of the other five seasons does. It simply says I'm watching "George" All other shows without and/& in the title are fine  :o

Edited by davehobson
Link to comment
Share on other sites

Hitsville

The full title is passed to pushover but the pushover plugin may need adjustment to handle the special character. 

 

Is there a community member who might like to look at it?

 

https://github.com/MediaBrowser/Emby.Plugins/tree/master/MediaBrowser.Plugins.PushOverNotifications

 

Thanks for the reply Luke. Hopefully someone can look.. But if anyone does pick up on it, it does seem that it isn't restricted to "&" .

The two British shows affected use "and" in my filenames and within Emby (according to the metadata) which well to me aren't special characters lol. :) 

Link to comment
Share on other sites

llygoden

Luke,

 

I'm unsure how to make the change and test it, but I think all that would be required is for:

if (string.IsNullOrEmpty(request.Description)) 
    parameters.Add("message", request.Name); 
else 
{ 
    parameters.Add("title", request.Name); 
    parameters.Add("message", request.Description); 
} 

request.Name and request.Description in the lines above from Notifier.cs to be URL Encoded before being sent to Pushovers API:

if (string.IsNullOrEmpty(request.Description)) 
	parameters.Add("message", HttpUtility.UrlEncode(request.Name)); 
else 
	{ 
    parameters.Add("title", HttpUtility.UrlEncode(request.Name)); 
    parameters.Add("message", HttpUtility.UrlEncode(request.Description)); 
} 

  • Like 1
Link to comment
Share on other sites

Awesome, thanks. I assume it is url encoding related. I do not have a pushover test setup to verify this with though. Are you able to install visual studio community to try out the change?

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