Jump to content


Photo

TSmedia enigma2 plugin 1.0


  • This topic is locked This topic is locked
2611 replies to this topic

Re: TSmedia enigma2 plugin 1.0 #661 dirocca

  • Senior Member
  • 1,667 posts

+59
Good

Posted 5 March 2014 - 15:02

hello mfaraj57

 

i have noticed something very strange. ;)

if i download a movie, it´s not visible in movielist ( on the box)

when i check with ftp i see de movie in movie directory but not with full name;

example, i download movie " I, Frankenstein " in movie directory it´s named " I " .

movielist only shows files of known type, so i have to change the name from " I " to

" I, Frankenstein.mpg " then the movie is visible in movielist.

 

any idea why this is happening?

 

grtz Philip


vuduo2 openpli6.1 1TB HDD 2xdualS2tuner

av receiver denon - samsung 4k hdr+ 65inch UE65MU7000 - bose accoustimas 7.1 :rolleyes:

tvv kaart & schotel(64cm), duo lnb, OSCAM

logitech harmony ultimate

 

 

 


Re: TSmedia enigma2 plugin 1.0 #662 mfaraj57

  • Senior Member
  • 1,605 posts

+286
Excellent

Posted 5 March 2014 - 17:22

This is technical problem and need to be fixed
now for coding not every character allowed in filename as example ","
when the plugin tried to give box filename for downloaded material it extracts the un allowed character  so sometimes give unusual file name like what happened with you
 
i put here my code to do that may be someone has better idea to do that

 

 

def makevalid_filename(s):
    import re
    badchars= re.compile(r'[^A-Za-z0-9_. ]+|^\.|\.$|^ | $|^$')
    badnames= re.compile(r'(aux|com[1-9]|con|lpt[1-9]|prn)(\.|$)')        
    try:    
      name= badchars.sub('_', s)
      if badnames.match(name):
        name= '_'+name
      try:name=name.split("_")[0]
      except:pass  
      return name
    except:
      try:name=s.split("_")[0]
      except:pass           
           
      return name 

Edited by mfaraj57, 5 March 2014 - 17:23.


Re: TSmedia enigma2 plugin 1.0 #663 mfaraj57

  • Senior Member
  • 1,605 posts

+286
Excellent

Posted 5 March 2014 - 17:29

def makevalid_filename(s):
    import re
    badchars= re.compile(r'[^A-Za-z0-9_. ]+|^\.|\.$|^ | $|^$')
    badnames= re.compile(r'(aux|com[1-9]|con|lpt[1-9]|prn)(\.|$)')        
    try:    
      name= badchars.sub('_', s)
      if badnames.match(name):
        name= '_'+name
      try:name=name.split("_")[0]
      except:pass  
      return name
    except:
      try:name=s.split("_")[0]
      except:pass           
           
      return name 

print makevalid_filename("I,Frankenstein")
>>>I


Re: TSmedia enigma2 plugin 1.0 #664 MiLo

  • PLi® Core member
  • 14,055 posts

+298
Excellent

Posted 5 March 2014 - 19:42

from Tools import Notifications, ASCIItranslit

filename = ASCIItranslit.legacyEncode(filename)
Real musicians never die - they just decompose

Re: TSmedia enigma2 plugin 1.0 #665 JDean

  • Member
  • 1 posts

0
Neutral

Posted 6 March 2014 - 00:41

Hi everyone, 

 

is ratotv and wareztuga working? I am trying to test it, but I can't find how to put the username and password,

 

sorry for the newbie question 



Re: TSmedia enigma2 plugin 1.0 #666 mfaraj57

  • Senior Member
  • 1,605 posts

+286
Excellent

Posted 6 March 2014 - 06:47

from Tools import Notifications, ASCIItranslit

filename = ASCIItranslit.legacyEncode(filename)

Thanks milo

it did the job partially

 def startdownload(self,action='download'):
            from tsdownload import startdownload
            dlocation=config.plugins.tstube.downloadlocation.value ###download location
            success,txt=checkdownloadPath(dlocation) ####check if download path is mounted and exists
            if success==False:
               self.session.open(MessageBox,txt,MessageBox.TYPE_ERROR)
               return
            
            print "movie name before conversion",self.name  ##print the name of movie as it is  
            from Tools import  ASCIItranslit
            
            self.name = ASCIItranslit.legacyEncode(self.name)##convert movie name to valid file name 
            #####add extension to downloaded movie
            extension='.mpg' ##if no extesnion add .mpg as extension
            if self.url.endswith('.flv'):
               extension='.flv'
            elif self.url.endswith('.avi'):
                extension='.avi' 
            elif self.url.endswith('.mp4'):    
                 extension='.mp4'
            elif self.url.endswith('.mp3'):    
                 extension='.mp3'               
            title=self.name+extension                 
            print "movie name converted to valid filename",title     
            if dlocation.endswith('/'):
               target= dlocation+self.name 
            else:            
              target= dlocation+"/"+self.name
            startdownload(self.session,action,self.url,target,title,plugin_path)

 

   
movie name before conversion !Women Art Revolution
movie name converted to valid filename !WOMEN_ART_REVOLUTION.flv
 
movie name before conversion "Du Opfer!" Wenn Gewalt Ein Leben Verändert
movie name converted to valid filename ''DU_OPFER!''_WENN_GEWALT_EIN_LEBEN_VERAENDERT.flv
 
movie name before conversion Abbott and Costello Meet the Killer, Boris Karloff (1949)
movie name converted to valid filename ABBOTT_AND_COSTELLO_MEET_THE_KILLER,_BORIS_KARLOFF_(1949).avi
 
movie name before conversion Nahno La Nazraa El Shouk Movie / Ùيلم نحن لا نزرع الشوك
movie name converted to valid filename NAHNO_LA_NAZRAA_EL_SHOUK_MOVIE_________________________.mpg

 

as noticed 

- capatilize all characters

-convert spaces to _

-replace unicode characters by _

 

may be good solution to movie containing unacceptable characters in filename but we should also pass only these movie name to the function not all movies

we care not to change movie name because this makes searching for subtitle is difficult

now the typical use for the function should be like this

 

if validfilename(movie_name)==False: ##the movie_name is invalid for filename
           
          from Tools import  ASCIItranslit
            
           final_movie_name = ASCIItranslit.legacyEncode(movie_name)##convert movie name to valid file name    

but we have to search for function like validfilename to check for validity of string to use as filename 


Edited by mfaraj57, 6 March 2014 - 06:49.


Re: TSmedia enigma2 plugin 1.0 #667 MiLo

  • PLi® Core member
  • 14,055 posts

+298
Excellent

Posted 6 March 2014 - 08:24

Linux allows everything in a filename, except a slash "/" (directory separator) and a null character ('\0'). Unicode, comma, space, tab, semicolon and smileys are just fine as filenames.

Your "validfilename" should be as simple as: Replace '/' with something else and just try to create the file without bothering about anything else. If it fails to create the file, you're probably writing to a more restrictive disk (e.g. NAS or Windows machine) and then you can start encoding.
Real musicians never die - they just decompose

Re: TSmedia enigma2 plugin 1.0 #668 mfaraj57

  • Senior Member
  • 1,605 posts

+286
Excellent

Posted 6 March 2014 - 09:35

Linux allows everything in a filename, except a slash "/" (directory separator) and a null character ('\0'). Unicode, comma, space, tab, semicolon and smileys are just fine as filenames.

Your "validfilename" should be as simple as: Replace '/' with something else and just try to create the file without bothering about anything else. If it fails to create the file, you're probably writing to a more restrictive disk (e.g. NAS or Windows machine) and then you can start encoding.

Thanks milo, it thought filename restriction is general regardless operating system

now the matter is simple by replacement "/" and better to avoid troubles of conversion



Re: TSmedia enigma2 plugin 1.0 #669 mfaraj57

  • Senior Member
  • 1,605 posts

+286
Excellent

Posted 6 March 2014 - 10:18

Hi everyone, 

 

is ratotv and wareztuga working? I am trying to test it, but I can't find how to put the username and password,

 

sorry for the newbie question 

 

hi
tell me if portuguese movies d'ont work yest ? thanks


both ratotv and wareztuga are working but both needs username and password if you have
you can fill your log info in etc/TSmedia_login like that restart browse the sites

### sign for free in rotatv and wareztuga sites and fill required info down ratotv:username:password
ratotv:mfaraj57:dxcf
wareztuga:mfaraj57:cfgdh
youtube:mfaraj1:mkfhrgt


Re: TSmedia enigma2 plugin 1.0 #670 sm1120

  • Member
  • 1 posts

0
Neutral

Posted 6 March 2014 - 15:11

using user and passwd why have always this message " no valid link available 2 " ?



Re: TSmedia enigma2 plugin 1.0 #671 mfaraj57

  • Senior Member
  • 1,605 posts

+286
Excellent

Posted 6 March 2014 - 22:50

using user and passwd why have always this message " no valid link available 2 " ?

last time i checked it was working, i will check again



Re: TSmedia enigma2 plugin 1.0 #672 andyd123

  • Member
  • 4 posts

0
Neutral

Posted 6 March 2014 - 22:53

I have updated from version 4.9 to the new 5.0 using the update panel now nothing plays. On my other box i still run 4.9 and most streams play no problem.

Is there a problem using the update panel ? Do you recommend deleting TSMedia 4.9 and fresh install ?

 

Thanks for all your hard work

 

Andy



Re: TSmedia enigma2 plugin 1.0 #673 mfaraj57

  • Senior Member
  • 1,605 posts

+286
Excellent

Posted 7 March 2014 - 01:19

yes may use telnet command after moving TSmedia 5.0 package to tmp 

 

opkg update  && opkg install  -force-overwrite  /tmp/*.ipk



Re: TSmedia enigma2 plugin 1.0 #674 andyd123

  • Member
  • 4 posts

0
Neutral

Posted 7 March 2014 - 09:35

I use tenet command to install from after removing 4.9 but still the same problem :(


Edited by andyd123, 7 March 2014 - 09:36.


Re: TSmedia enigma2 plugin 1.0 #675 andyd123

  • Member
  • 4 posts

0
Neutral

Posted 7 March 2014 - 11:42

I have now gone through a few of the movie listings and it seems the only server that will play is movreel 
nowvideo TSmedia 5.0 stream not found TSmedia 4.9 plays

sockshare TSmedia 5.0 unable to get video link TSmedia 4.9 plays

 

Maybe this will give some clues to the cause.

Thanks again

 

Andy



 



Re: TSmedia enigma2 plugin 1.0 #676 cj1558

  • Member
  • 2 posts

0
Neutral

Posted 8 March 2014 - 19:52

if you look at the picture on page 30 the one that has spring across the front.

my problem is when watching filmon and say bbc1 when the program starts up the running bar at the bottom the red dot goes to the

right handside and the time only says say 0.07 and the tv channel runs for 5 min then stops.so I have to press the exit button back to

tv list press bbc1 again and it starts but only for 5 min.

this on nettv,tried simplyseries breaking bad 24 the l word and the timer on the right then says 45.00 which is the min the programme runs for,but on filmon it does have the full time.

any help much app.

dm800hd openpli 2.1  #84  d I think tsmedia 5.0

 



Re: TSmedia enigma2 plugin 1.0 #677 andyg1988

  • Member
  • 24 posts

0
Neutral

Posted 9 March 2014 - 09:32

hello mfaraj57

i have noticed something very strange. ;)
if i download a movie, it´s not visible in movielist ( on the box)
when i check with ftp i see de movie in movie directory but not with full name;
example, i download movie " I, Frankenstein " in movie directory it´s named " I " .
movielist only shows files of known type, so i have to change the name from " I " to
" I, Frankenstein.mpg " then the movie is visible in movielist.

any idea why this is happening?

grtz Philip


Did you get this sorted it's happening to me now

Re: TSmedia enigma2 plugin 1.0 #678 mfaraj57

  • Senior Member
  • 1,605 posts

+286
Excellent

Posted 9 March 2014 - 13:35

in next close update will be fixed



Re: TSmedia enigma2 plugin 1.0 #679 andyg1988

  • Member
  • 24 posts

0
Neutral

Posted 9 March 2014 - 15:21

in next close update will be fixed


Any time frame on that? Who is the main dev on it?

Re: TSmedia enigma2 plugin 1.0 #680 gorski

  • Senior Member
  • 1,699 posts

+46
Good

Posted 9 March 2014 - 16:20

'Talking to him... :D


<span style='font-family: comic sans ms,cursive'>"Enlightenment is man's emergence from his self-incurred immaturity. Immaturity is the inability to use one's own understanding without the guidance of another. This immaturity is self-incurred if its cause is not lack of understanding, but lack of resolution and courage to use it without the guidance of another. The motto of enlightenment is therefore: Sapere aude! Have courage to use your own understanding!</span><br /> <br /><span style='font-family: comic sans ms,cursive'>Laziness and cowardice are the reasons why such a large proportion of men, even when nature has long emancipated them from alien guidance..." I. Kant, "Political writings" (1784)</span><br /> <br /><span style='font-family: comic sans ms,cursive'><a class='bbc_url' href='<a class='bbc_url' href='http://eserver.org/p...lightenment.txt'>http://eserver.org/p...ent.txt</a>'><a class='bbc_url' href='http://www.english.upenn.edu/~mgamer/Etexts/kant.html</a>'>http://www.english.upenn.edu/~mgamer/Etexts/kant.html</a></a> - the jolly text on Enlightenment, at the basis of Modernity...</span>


13 user(s) are reading this topic

0 members, 12 guests, 0 anonymous users


    Bing (1)